This repo contains the Docker tools for running go-lightning over a local + pruned Bitcoind instance on a Raspberry Pi. Very useful for setting up small micro services which can accept and make lightning payments. Hope you enjoy.
- Raspberry Pi3 (Pi) with internet connectivity. (see: pi-README.md for help)
- Docker (Step 1)
- Docker-Compose (Step 2)
- This Repo + prunned Bitcoin data. (Step 3)
Note Steps for setting up a Pi are in pi-README.md
Docker is used to contanerize the LND and Bitcoind background services.
- Install Docker..
- Add the current user (pi) into the docker user group.
- Confirm the install.
curl -ssl https://get.docker.com | sh
sudo usermod -a -G docker $USER
docker --version
Docker-compose is used to build and connect our backends.
- Install python-pip.
- Pip install docker-compose.
- Add the current user (pi) into the docker-compose user group
- Confirm the install.
sudo apt-get -y install python-pip
sudo pip install docker-compose
sudo usermod -a -G docker-compose $USER
docker-compose --version
A fresh PI is not capable of holding the entire unpruned Bitcoin blockchain. Instead, to speed up the process of syncing the blockchain we pull a pruned version from somewhere else (i.e. your desktop). Note it is dangerous to use our pruned data since we could have corrupted the pruned files. It is better to sync and prune your own files and copy them across.
- Clone this Git repo
- Download the Pruned data from another computer.
- Unzip the data into the bitcoind/bitcoin folder.
git clone https://github.com/unconst/DockerBitcoindLND.git && cd DockerBitcoinLND
# DOWNLOAD THE PRUNED DATA (HOWEVER YOU WANT, maybe SCP? or even IPFS) into bitcoin.zip
unzip bitcoin.zip -d bitcoind/bitcoin_data
- Compose and build the containers.
- Alias lncli.
- Alias bitcoind cli.
sudo docker-compose up --build
sudo alias lndcli='docker exec -i -t lnd_container lncli'
sudo alias bitcoin-cli='docker exec -i -t bitcoind_container bitcoin-cli'
After this step you will need to wait for the Bitcoin container to finish syncing. Check this progress through the logs.
docker logs bitcoind_container
docker logs lnd_container
:wq