-
setup a bitcoind container following the guide on https://medium.com/@dougvk/run-your-own-mainnet-lightning-node-2d2eab628a8b Also setup bitcoin-cli. sync the chain
-
clone https://github.com/lightningnetwork/lnd, cd to the folder
-
do
docker-compose run -d --name alice lnd_btc
. It will create a lnd container and a btcd container.docker rm
them (instead, it would be possible to just create the lnd container and not start it) -
go to /scratch, edit the bitcoind configuration following instructions on that other guide: https://gist.github.com/itoonx/618ab3cba41252ccadcbf9ec54ecb71c
(guide to run lnd and bitcoind together, but not in docker)
-
restart bitcoind to take the new config into account (do not do docker stop because the default timeout is 10 seconds before force kill! you may corrupt your db. Do docker stop --timeout 300)
-
start lnd the first time with
docker run --name lnd_mainnet --network container:bitcoind_mainnet -d \
-v /scratch/bitcoin/mainnet/lnd/:/root/.lnd \
--entrypoint /go/bin/lnd lnd:latest --bitcoin.active --bitcoin.mainnet \
--externalip=138.68.52.74 --debuglevel=debug \
--bitcoin.node=bitcoind --bitcoind.rpcuser=bitcoin --bitcoind.rpcpass=<redacted> \
--bitcoind.zmqpath=tcp://127.0.0.1:28332
Observation: unlinke clightning, lnd does not require access to bitcoind file storage backend. Instead, it's using a combination of rpc and zeromq pubsub for all its operations.
To be continued...