How to run a Bitcoin Lightning node on a Raspberry Pi — and connect it to your phone

Quick Take

  • A guide to setting up a Bitcoin Lightning node on a Raspberry Pi and opening your first channel.
  • Plus how to connect your phone to the node so you can spend satoshis wherever you are.

The growth of the Bitcoin Lightning network — which promises to help Bitcoin become a more efficient payment network — has picked up the pace this year. It’s also getting easier to use.

On June 14, the amount of bitcoin in the Lightning network broke 1,500 bitcoin, worth more than $60 million. And there are now more than 12,000 active nodes across the network, all connected by 50,300 channels. 

To get a sense of how it works, imagine there are 12,000 pins on a board, connected by 50,300 intertwining and overlapping wires. And all these wires are sending information to each other, enabling the flow of money between the pins. 

But despite this growth, many people interested in trying out the Lightning network don’t know where to start.

If you are interested in dipping your toes into the Lightning network, below is a rough roadmap for how to set up your own node using just a Raspberry Pi — and how to spend money using Lightning once you are up and running.

Setting up a Bitcoin Lightning node

In order to access the Bitcoin network and set up a Lightning channel in a truly decentralized and non-custodial way, you’re going to need to run your own node. No need to panic! It’s actually pretty simple. 

If you’re running a node on a computer, you can just download Bitcoin Core for Windows, Mac or Linux. But if you want a separate bit of kit to run it on — something you can leave running all day and that won’t use up a ton of space on your computer — then you can use a Raspberry Pi. 

Running a node on a Raspberry Pi is the same as running one on a larger computer. The only difference is that you need specific software to account for the differences in hardware. You can either program this yourself or use one of the pi-focused bitcoin node software clients that offer their own implementations of Bitcoin Core. 

Some Raspberry Pi nodes, like myNode and RaspiBlitz offer a wide range of features and customization options. Umbrel, on the other hand, provides a limited, controlled environment that is much easier for a novice user to set up. That’s why for this guide we have chosen to set up an Umbrel node.

According to the Umbrel website, to fire up your node you will first need around $240 worth of parts: a Raspberry pi 4, a 1 terabyte solid-state drive (SSD), an SSD enclosure, a 16 gigabyte or larger microSD, an ethernet cable and a power source. 

The Raspberry pi when pieced together. Source: The Block.

Once you piece together all the parts, connect the Raspberry Pi to the SSD and your internet router and connect the power, you are ready to download the software.

First, you’ll have to download Balena Etcher — an open-source program for adding data to SD cards — and plug the micro SD card into your laptop. Then you'll need to download the Umbrel software from its website. Follow the instructions on the Etcher app to flash the Umbrel software onto the SD card. Once that’s done, you can transfer the SD card into the Raspberry Pi.

When the Umbrel device loads up, you can connect to it from your computer by typing in Umbrel.local into your URL bar in your internet browser. (If it doesn’t come up you might need to find your node’s IP address using Angry IP Scanner.) 

A step-by-step guide will take you through the process of setting up a Bitcoin wallet. Make sure to write down and save your seed phrase in a safe place (those words enable you to access your funds). Once that’s done, it’s all set up and you should see the Umbrel dashboard.

Now you actually have to download the blockchain. The Bitcoin blockchain takes a few days to download. You can watch its progress on the dashboard. Note that the percentage downloaded will increase more quickly at first, but slow down as blocks become slower to process. That's because over the years they have become fuller with more transactions, and your node will have to check the validity of each transaction. 

Once the blockchain data is on board, you’ll want to transfer a small amount of bitcoin to the wallet on your node. Since it’s connected to the Internet, it is a hot wallet — so is slightly more risky. (You can also connect your node to a hardware wallet if you happen to have one). But this will enable you to spend bitcoin from your node at home, with your phone. 

Opening a Lightning channel

At this point, your node will already be connected to the Lighting network, since Umbrel sets one up in the background. But in order to start sending money over it, you need to open a channel. 

This involves making a specific kind of bitcoin transaction that effectively tells the network that you’re opening a channel with another person on the network.

THE SCOOP

Keep up with the latest news, trends, charts and views on crypto and DeFi with a new biweekly newsletter from The Block's Frank Chaparro

By signing-up you agree to our Terms of Service and Privacy Policy
By signing-up you agree to our Terms of Service and Privacy Policy

To open a channel you want to click the Lightning tab and select “open channel.” (You can also download one of the Lightning apps in the in-built app store on your node and use that instead.) 

A visualization of the Lightning network. Source: Lightning Network Explorer.

Now you need to find a Lightning address of a node to connect to. You can find these on Lightning explorer 1ML, like Wallet of Satoshi’s address. Then you want to set the amount of bitcoin you want to put into your channel and roughly how much you’re willing to pay.

Once you’ve set up a channel, you are connected to the network through that channel. That means you can send satoshis to anyone else on the network, as long as there is a suitable path from your node to their node. 

After about 30 minutes, your channel will be open and you can start sending satoshis to anyone over the Lightning network from your node.

Connecting your phone to your Lightning node

This is the pretty cool bit, because it means you can spend your bitcoin from your node, no matter where you are in the world. In short, you can connect to your node through the Tor network, which obfuscates web traffic, and it lets you control your node — and therefore your channels and payments — from your phone.

In this guide, I’m going to use Zap but Umbrel also has an app for Blue Wallet, which offers the same functionality (only for some reason it wouldn’t work for me). Zap is a Bitcoin Lightning wallet — that lets you connect to your own node. It was created by Jack Mallers, who also built Lightning-based payments app Strike. 

Once you’ve downloaded Zap, you can go to the “Connect Wallet” tab on the Umbrel dashboard. Then select Zap for whatever mobile phone platform you use. For Android, it tells you that you need to download Orbot on your phone, which lets Zap connect through a VPN.

This page will also show a QR code. All you need to do is scan that QR code from inside the Zap app and it will connect your node. Once it’s connected, it will show the balance on your node.

Spending bitcoin over Lightning

Now you’ve set up a Bitcoin Lightning node and connected it to your phone, you can spend bitcoin over the Lightning network anywhere. 

It’s pretty simple. When you want to pay someone an amount of satoshis, they need to generate a Lightning invoice on their phone or other device. If you scan the invoice with your phone using the Zap app, it will then show a confirmation message checking if you want to send those funds. 

Once you choose to do so, it will transfer your satoshis over Lightning. Typically the payment will be confirmed within a few seconds and fees are usually just a couple of satoshis, which are each worth $0.00035.

What it looks like to send a Lightning payment. Source: The Block/Zap.

The Lightning network is good for small payments in general (it’s still a fairly experimental network and liquidity is still growing on it) but it also lets you do tiny payments, or micropayments. 

For example, once I set this up — and tweeted about it asking to test it out — I then sent a single satoshi to a software developer in Lisbon, Portugal, who volunteered to help. Because the payment was so miniscule, it was actually smaller than the fees I paid (about $0.0007) to send it. (Each lightning node sets its own fees for routing payments, so transaction fees depend on the route the payment takes.)

You wouldn’t normally send such a small amount. The important thing here is that such tiny payments can be made at all. Micropayments have long been a technical challenge, both in and out of the cryptocurrency world. 

It also puts the $60 million on the Lightning network into perspective. On the main network, where transactions are often massive, this may not seem like much. But on Lightning, where most of the money is moving from node to node in tiny pieces, it stands for a lot more.


© 2023 The Block. All Rights Reserved. This article is provided for informational purposes only. It is not offered or intended to be used as legal, tax, investment, financial, or other advice.

About Author

Tim is the Editor-In-Chief of The Block. Prior to joining The Block, Tim was a news editor at Decrypt. He has earned a bachelor's degree in philosophy from the University of York and studied news journalism at Press Association Training. Follow him on X @Timccopeland.