Skip to content

Instantly share code, notes, and snippets.

@alexbosworth
Last active October 24, 2019 00:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save alexbosworth/597f962ac67a10ff75eb3459a40a03fe to your computer and use it in GitHub Desktop.
Save alexbosworth/597f962ac67a10ff75eb3459a40a03fe to your computer and use it in GitHub Desktop.

Install LND

Install LND by cloning and building

Install Make

sudo apt-get install -y build-essential

Install LND

cd ~/
git clone https://github.com/lightningnetwork/lnd.git
cd lnd
make && make install tags="autopilotrpc chainrpc invoicesrpc routerrpc signrpc walletrpc"

Configure LND

mkdir ~/.lnd
emacs ~/.lnd/lnd.conf

[Application Options]
alias=ALIAS
color=#000000
debuglevel=CNCT=debug,HSWC=debug
externalip=DOMAIN.NAME
maxpendingchannels=10
minchansize=TOKENS
profile=PORT
rpclisten=0.0.0.0:10009
tlsextradomain=DOMAIN.NAME
tlsextraip=IP.ADDRESS
unsafe-disconnect=1

[Bitcoin]
bitcoin.active=1
bitcoin.feerate=1000 // === 0.1%
bitcoin.mainnet=1 // or testnet as appropriate
bitcoin.node=bitcoind

Start LND (only if chain backend is sync'ed)

nohup /home/ubuntu/go/bin/lnd > /dev/null 2> /home/ubuntu/.lnd/err.log &

Add to crontab

crontab -e
@reboot nohup /home/ubuntu/go/bin/lnd > /dev/null 2> /home/ubuntu/.lnd/err.log &

Link Logs

ln -s ~/.lnd/logs/bitcoin/mainnet/lnd.log ~/lnd-mainnet.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment