Raspberry π + Lightning ⚡+ Docker 🐋 & no external drive (6 Steps).

Jacob Steeves
Coinmonks
3 min readDec 18, 2018

--

This is a 6 Step tutorial for getting a Raspberry Pi to run a fully functioning Lightning Node.

+ Docker

The trick is using Docker + Bitcoin with pruned data to allow everything to run in under 16 GB.

Step 0. Required Equipment

  1. A secondary computer with ~300 GB of free space.
  2. A Raspberry Pi3 (Pi) with internet connectivity. (See other tutorials for this)

Step 1. Download full Bitcoin blockchain.

We need the Bitcoin blockchain in prunned mode. We will copy it to the Pi in Step 3.

  1. Install Bitcoind (Linux) or Mac
  2. Start syncing Bitcoin blockchain.
  3. Wait for progress = 1.00.

*Note** The Blockchain data is stored in

  • /Library/Application Support/Bitcoin (Mac)
  • ~/.bitcoin/ (Linux)

Step 2. Install Docker on your Pi.

We use Docker to containerize the LND and Bitcoind background services.

  1. Install Docker..
  2. Add the current user (pi) into the docker user group.
  3. Confirm the install.

Step 3. Install Docker-Compose on your Pi

Docker-compose is used to build and connect our backends.

  1. Install python-pip.
  2. Pip install docker-compose.
  3. Add the current user (pi) into the docker-compose user group
  4. Confirm the install.

Step 4. Download this repository and copy pruned bitcoin data

A fresh PI with 16 BG is not capable of holding the entire unpruned Bitcoin blockchain (~300 GB) so we will copy the pruned data from our secondary computer (Step 1)

  1. Clone the docker files from DockerBitcoindLND
  2. Copy the blockchain data from the secondary computer onto the Pi.

Step 5. Compose the Backend.

  1. Compose and build the containers.
  2. Alias lncli.
  3. Alias bitcoind cli.

Step 6. Wait for Nodes to sync.

After this step, you will need to wait for the containers to finish syncing. Check this progress through the logs.

You can interface with the docker containers as if they are locally running using the CLIs.

Good luck. Hope this was useful.

😉

:wq

Get Best Software Deals Directly In Your Inbox

Click to read today’s top story

--

--