Find file History
Failed to load latest commit information.
images Update for lnd-v0.5-beta (#203) Sep 15, 2018
resources Add support for Litecoin and other coins. (#231) Sep 22, 2018 Update Jul 12, 2018 Update Sep 20, 2018 Update on various issues, some for DietPi compatibility (#161) Aug 2, 2018 Bitcoind 0.16.3 (#225) Sep 20, 2018 lncli --network=testnet Sep 15, 2018 Update lnd0.5 (#206) Sep 15, 2018 init (#179) Aug 25, 2018 Update lnd0.5 (#206) Sep 15, 2018 Update on various issues, some for DietPi compatibility (#161) Aug 2, 2018 Restructured and extended bonus section (#30) Mar 30, 2018 added UFW config Sep 24, 2018 Update Apr 1, 2018 Embed Remote LNCLI Apr 17, 2018 Add lnchannels Jun 5, 2018 Added command for generating config QR for LND 0.5 (#243) Sep 27, 2018 update lncli-web macaroon folders (#229) Sep 21, 2018 Update lnd0.5 (#223) Sep 20, 2018 Fixed two typos (#213) Sep 21, 2018 Check public availability of Bitcoin Core (#121) Jul 12, 2018

[ Intro ] -- [ Preparations ] -- [ Raspberry Pi ] -- [ Bitcoin ] -- [ Lightning ] -- [ Mainnet ] -- [ Bonus ] -- [ FAQ ] -- [ Updates ]

Beginner’s Guide to ️⚡Lightning️⚡ on a Raspberry Pi

I love to tinker and build stuff. I am also fascinated with digital currencies, so I recently built my own Bitcoin / Lightning Full Node with a simple low-cost Raspberry Pi. I now basically run my own bank using free open-source software and some cheap hardware.

This project was as much about the learning process as about the result. And I think I succeeded: I learned a lot and my node runs very well. This guide is my attempt to share my learnings and encourage you to run a node yourself.

Why am I excited about Bitcoin and Lightning?

Bitcoin as new technology is an incredibly interesting endeavor, especially because of its interdisciplinary nature. Bitcoin as sound money is going to have a major impact on economic principles and society as a whole. In my opinion, a solid, anti-fragile base layer for this future monetary network is the killer app for blockchains and will be more important than the most novel feature of competing altcoin projects.

At the moment, Bitcoin is more of a store of value and not really suited for small everyday transactions. Due to limitations of the blockchain and the growth of its usage, fees have risen and business models relying on cheap transactions are being priced out. This is fine. Truly decentralized blockchains are a scarce resource and cannot scale to accommodate all global transactions. The current scaling pains are a great motivator to build better technology to scale exponentially, as opposed to just making everything bigger for linear scaling.

This is where the Lightning Network comes in. As one of several new blockchain “extensions”, its promise is to accommodate nearly unlimited transactions, with instant payment confirmation, minimal fees and increased privacy. It sounds almost too good to be true, but in contrast to ubiquitous ICO with their own token, this technology is well researched, committed to the cypherpunk open-source ethos and leverages the solid underpinnings of Bitcoin.

Bitcoin's security model requires both full nodes and miners to be decentralized. While the full-node-using economy must be decentralized to stop fake bitcoins that do not abide to consensus from being accepted as payments, the miners must be decentralized to stop censorship of transactions and to make transactions irreversible.

To preserve the decentralized nature of this monetary system, I think it is important that everybody can run their own trustless Bitcoin full node, preferably on cheap hardware like a Raspberry Pi. If Bitcoin is digital gold, then a full node wallet is your own personal goldsmith who checks for you that received payments are genuine.

RaspiBolt Logo

This is why I set out to build my RaspiBolt and think that I have now - through numerous iterations - quite a good configuration that I would like to share as my modest contribution to the community. I am not a systems specialist, so please feel free to point out improvements.

About this guide


  1. Introduction (this page)
  2. Preparations: get all required parts and start downloading the mainnet Blockchain
  3. Raspberry Pi: set up and configure the Pi as a secure Linux server
  4. Bitcoin: install and configure the Bitcoin Core software as a Full Node, on testnet
  5. Lightning: install and configure the Lightning Network Daemon (LND), on testnet
  6. Mainnet: after you are comfortable with your setup, switch to Bitcoin mainnet
  7. FAQ: frequently asked questions and further reading
  8. Updates: keep track of changes


My aim is to set up a Bitcoin and Lightning node that

  • is as fully validating Bitcoin Full Node and does not require any trust in a 3rd party,
  • is reliably running 24/7,
  • is part of and supports the decentralization of the Lightning network by routing payments and
  • can be used to send and receive personal payments using the command line interface.

This server is set up without graphical user interface and is used remotely using the Secure Shell (SSH) command line. In the future, this server should function as my personal backend for desktop and mobile wallets, but I haven’t found a good solution to this yet. So, command line it is for the moment.

Spoiler alert: this is the goal of this guide, simply buying a Blockaccino.

Wishlist for further enhancements

  • Bitcoin desktop wallet support: Electrum
  • Bitcoin mobile wallet support: Shango
  • Hardware wallet support: Electrum + HW wallet
  • Lightning web interface
  • Email alerts
  • Full backup, incl. Lightning channel states

Target audience

This guide strives to give simple and foolproof instructions. But the goal is also to do everything ourselves, no shortcuts that involve trust in a 3rd party allowed. This makes this guide quite technical and lengthy, but I try to make it as straightforward as possible and explain everything for you to gain a basic understanding of the how and why.

If you like to learn about Linux, Bitcoin and Lightning, this guide is for you.

A word of caution

All components of the Lightning network are still under development and we are dealing with real money here. So this guide follows a conservative approach: first setup and test everything on Bitcoin testnet, then - once you are comfortable to put real money on the line - switch to Bitcoin mainnet with a few simple changes.

Get started: Preparations >>