Configure Lnd

academy lnd

Configure LND

Before we start LND for the first time, we are going to configure it with the minimal settings. This is also the time we will need to amend some settings to Bitcoin Core!

First, we are going to create a configuration file and place it in the directory where Bitcoin Core can find it as we start it up.

Useful resources:

Configure Bitcoin Core

Our Bitcoin Core configuration file should be in their default position. We can open it with the following command:

nano ~/.bitcoin/bitcoin.conf

We will mainly have to amend two settings. One allows LND to connect to Bitcoin Core remotely, for example to look up blocks, transactions and publish channel openings. The other allows LND to subscribe to new blocks and transactions without having to specifically query for them.

Before you paste the below into your configuration file, generate a user and password using a random number generation tool, such as your local password manager. You can also use an online tool such as Lastpass. Then replace the user and password with your own.

# Enabling remote procedure calls

# Enabling ZMQ

Configure LND

First we will make a folder for the configuration file, then we can edit it with the text editor.

mkdir ~/.lit
nano ~/.lit/lit.conf

Here’s a sample configuration file that you can use. Don’t forget to edit

# Basic Configuration

# Node alias

# Bitcoin Core Options

Test LND

We can test our installation and connection with the command:


If it doesn’t stop or crash with an error, great! We’ve completed our configuration process!

You can stop the process by pressing Ctrl + C. That should send the shutdown signal and litd should shut down gracefully.

If you’re running your node on clearnet and have a static IP address, you can listen for incoming connections on that IP address. You can also advertise an IPv4 and IPv6 address at the same time. Be aware of the privacy implications! In case you are running your node at home or an office, making it available over its clearnet IP might make the node’s location know to a sophisticated attacker.

To advertise our IP address, we simply add the following to our lit.conf file. Don’t forget to replace the values in externalip with your own! If your node does not have a IPv4 or IPv6 address, simply leave out that line.


We will once again start litd to test our configuration:

© 2024 Vancouver Bitcoiners   •  Powered by Bitdevs Vancouver   •   Theme  Moonwalk