I have two instances of bitcoind running, one on mainnet, one on testnet, without any problems.

I can't seem to find any decent documentation on running two instances of LND at the same time on the same computer. Currently I switch between the two.

Is it possible? Are there caveats? Any pointers would be appreciated.

  • 1
    Have you tried creating two different lnd.conf files, having different ports specification and matching the bitcoin.conf spec, and running two instances of lnd specifing the parameter --configfile? Commented May 21, 2019 at 15:03
  • @StefanoAngieri Yup, you were right. I've answered my own question.
    – gijswijs
    Commented Jun 28, 2019 at 8:22

1 Answer 1


It's perfectly possible to run several LND nodes on the same computer.

This is how I did it:

  • create separate folders for each LND node
  • In each folder create a lnd.conf file
  • make sure you set the datadir and the logdir to point to the folders you just created
  • make sure that each configuration uses different ports for rpclisten, listen and restlisten
  • adjust all other configuration to your liking. You can have multiple clients point to the the same btcd client (that's the one I used, but I'm sure it also would work with bitcoind) and the same chain or different chains
  • run lnd --configfile=path/to/your/lnd.conf for each lnd client you want to run


I've made aliases in .bashrc for the lnd and lncli commands for each different node. So:

alias lnd-alice="lnd --configfile=path/to/alice/lnd.conf"
alias lnd-bob="lnd --configfile=path/to/bob/lnd.conf"
alias lncli-alice="lncli --rpcserver=localhost:10001 --macaroonpath=path/to/alice/data/chain/bitcoin/mainnet/admin.macaroon"
alias lncli-bob="lncli --rpcserver=localhost:10002 --macaroonpath=path/to/bob/data/chain/bitcoin/testnet/admin.macaroon"

To run the lnd node for alice I just type lnd-alice and then lncli-alice create if it's the first time or lncli-alice unlock if the wallet is already initialized. (The macaroon path isn't needed for create and unlock but it doesn't hurt either.) Same thing for Bob.

This guide was very helpful in finding the right info: https://dev.lightning.community/tutorial/01-lncli/index.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.