Skip to content

How to run an LND Lightning node with Neutrino

LND is one of the most widely used Lightning Network implementations. Normally it talks to a local Bitcoin node, but it also has a built in light client called Neutrino. Neutrino downloads block headers and compact block filters from the Bitcoin network instead of the full chain, so LND runs on a small server with no bitcoind next to it. This guide installs LND on Ubuntu 24.04, creates a wallet and prepares the node for its first channel.

What you need

  • A VPS with 1 vCPU, 2 GB RAM and 32 GB of disk. On DataPasa that is the VPS-2 plan. See the crypto node VPS page for other node types.
  • Ubuntu 24.04 and root access over SSH. If this is new, read how to connect via SSH.
  • A small amount of BTC to fund channels later.

Server hosting itself can also be paid in BTC or stablecoins, see crypto VPS hosting.

A Lightning node is a hot wallet

The private keys of your LND wallet live on the server and must stay online to sign channel updates. Anyone who gets root on the VPS can move your funds. Keep only amounts you are ready to lose, secure the server first with UFW and fail2ban, and never reuse the root password.

Step 1. Download and verify LND

Open the LND releases page and pick the latest version without the "Pre-release" label. Set it in a variable including the v prefix and the -beta suffix, exactly as the release is named:

bash
VERSION=v0.21.3-beta
cd /tmp
wget https://github.com/lightningnetwork/lnd/releases/download/${VERSION}/lnd-linux-amd64-${VERSION}.tar.gz
wget https://github.com/lightningnetwork/lnd/releases/download/${VERSION}/manifest-${VERSION}.txt

Each release is signed by several developers. The assets list files like manifest-NAME-VERSION.sig. Pick one signer from that list, download their signature and import their public key from the LND repository. Replace SIGNER with the name, for example guggero or ziggie1984, if that name appears in the release assets:

bash
SIGNER=ziggie1984
wget https://github.com/lightningnetwork/lnd/releases/download/${VERSION}/manifest-${SIGNER}-${VERSION}.sig
curl -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/scripts/keys/${SIGNER}.asc | gpg --import
gpg --verify manifest-${SIGNER}-${VERSION}.sig manifest-${VERSION}.txt

Look for gpg: Good signature. Then check the archive against the signed manifest:

bash
sha256sum --ignore-missing --check manifest-${VERSION}.txt

The line for lnd-linux-amd64-VERSION.tar.gz must say OK. Install the binaries:

bash
tar -xzf lnd-linux-amd64-${VERSION}.tar.gz
install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-amd64-${VERSION}/lnd lnd-linux-amd64-${VERSION}/lncli
lnd --version

Step 2. Create a user and write lnd.conf

Run LND under its own user. Its data will live in /home/lnd/.lnd, the default LND directory on Linux:

bash
useradd --create-home --shell /bin/bash lnd
sudo -u lnd mkdir -p /home/lnd/.lnd
sudo -u lnd nano /home/lnd/.lnd/lnd.conf

Paste this configuration and change the alias:

ini
[Application Options]
alias=MyDataPasaNode
listen=0.0.0.0:9735
externalip=YOUR_SERVER_IP
debuglevel=info

[Bitcoin]
bitcoin.mainnet=true
bitcoin.node=neutrino

[fee]
fee.url=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json

What these settings do:

  • bitcoin.node=neutrino switches LND to the light client backend. Switching between Neutrino and a full backend later is not supported, so decide now.
  • fee.url points LND to an external fee estimator. The LND sample config says it must be set for Neutrino on mainnet.
  • externalip advertises your public address so other nodes can open channels to you. Remove it if you only want outgoing channels.
  • gRPC (10009) and REST (8080) stay on localhost by default. Do not expose them.

If you use UFW, allow the peer port:

bash
ufw allow 9735/tcp

Step 3. Create the systemd service

Create /etc/systemd/system/lnd.service. It is adapted from the sample unit in the LND repository, without the dependency on bitcoind:

ini
[Unit]
Description=Lightning Network Daemon
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/local/bin/lnd
ExecStop=/usr/local/bin/lncli stop
User=lnd
Group=lnd
Restart=on-failure
RestartSec=60
Type=notify
TimeoutStartSec=1200
TimeoutStopSec=3600
ProtectSystem=full
NoNewPrivileges=true
PrivateDevices=true
MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target

Start it:

bash
systemctl daemon-reload
systemctl enable --now lnd
journalctl -u lnd -f

LND starts and waits for a wallet. Press Ctrl+C to leave the log view.

Step 4. Create the wallet and back up the seed

Switch to the lnd user so lncli finds its certificate and macaroons, then create the wallet:

bash
sudo -iu lnd
lncli create
  1. Enter a wallet password of at least 8 characters. You will need it after every restart.
  2. Answer n to create a new seed.
  3. Optionally set a cipher seed passphrase. If you do, you need both the words and the passphrase to recover.
  4. LND prints 24 words. Write them down on paper and store them offline.

The seed is not enough on its own

The 24 words restore the on chain wallet. Funds in open channels are recovered with the static channel backup file ~/.lnd/data/chain/bitcoin/mainnet/channel.backup, which LND updates every time a channel opens or closes. Copy it off the server regularly. See how to back up your VPS.

After a reboot the wallet is locked. Unlock it with:

bash
sudo -iu lnd lncli unlock

LND can also unlock itself from a password file with the wallet-unlock-password-file option. That is convenient, but anyone with access to the server then also has the password.

Step 5. Wait for the sync

Neutrino first downloads all block headers and filter headers from its peers. This is far less data than the full chain, but it still takes a while, depending on the peers it finds. Check progress:

bash
sudo -iu lnd lncli getinfo

Wait until synced_to_chain and synced_to_graph are both true. RAM usage stays low, which is why a 2 GB plan is enough.

Step 6. Fund the wallet and open a first channel

Generate a deposit address and send a small amount of BTC to it:

bash
sudo -iu lnd lncli newaddress p2wkh
sudo -iu lnd lncli walletbalance

Once the deposit confirms, open a channel. In short:

  1. Choose a peer. Pick a well connected, reliable node. Public explorers show node capacity and uptime.
  2. Connect with lncli connect PUBKEY@HOST:9735.
  3. Open the channel with lncli openchannel --node_key PUBKEY --local_amt AMOUNT_IN_SATS. Many nodes set a minimum channel size, so check their policy first.
  4. Wait for confirmations. lncli pendingchannels shows the funding transaction, lncli listchannels shows the channel once it is active.

The opening and closing transactions are regular Bitcoin transactions and pay on chain fees. Your first channel gives you outbound capacity only. To receive payments you also need inbound liquidity, for example by spending through the channel or asking a peer to open a channel to you.

Keep the node healthy

  • Update LND when a new release comes out: verify it again, replace the binaries, run systemctl restart lnd and unlock.
  • Keep the server paid. If your DataPasa balance runs out, the server is suspended and later deleted with its disk. An offline Lightning node cannot defend its channels.
  • Stop LND with systemctl stop lnd, never with kill -9.

Summary

You now have LND running on Neutrino as a systemd service, with a verified binary, a wallet, a written down seed and a plan for channel backups. For a node that verifies every block itself, see the pruned Bitcoin Core guide.