How to Run a Bitcoin Full Node and Lightning Node on a Raspberry Pi

·

Running your own Bitcoin full node empowers you with financial sovereignty, privacy, and direct participation in the decentralized network. When combined with a Lightning Network node, you gain the ability to send and receive fast, low-cost Bitcoin transactions—ideal for everyday use. The best part? You can achieve this using a Raspberry Pi, an affordable, low-power device that keeps costs minimal.

This comprehensive guide walks you through setting up both a Bitcoin Core full node and an LND (Lightning Network Daemon) node on a Raspberry Pi. Designed for users with limited technical background, it simplifies complex steps while ensuring accuracy, security, and long-term usability.

Whether you're new to self-custody or expanding your crypto infrastructure, this tutorial makes running your own node accessible, secure, and rewarding.

👉 Start building your financial independence with a secure crypto platform today.


Hardware Selection and System Setup

The Raspberry Pi 4B (8GB RAM) is the ideal choice for hosting a Bitcoin and Lightning node. It offers sufficient processing power, runs cool with passive cooling, consumes only about 15W of power, and costs significantly less than traditional desktops or servers.

Recommended Hardware Configuration

💡 Why not use an SSD? While SSDs offer faster read/write speeds, they are more expensive and may wear out over time due to constant blockchain writes. A high-quality external hard drive offers better value and durability for this use case.

Although the Pi has no built-in storage, the microSD card serves as the operating system drive. For blockchain data—currently over 500GB and growing—you’ll need a separate USB-connected hard drive. Choose a reliable external drive formatted in NTFS, which works natively on both Linux and Windows.

For optimal performance and stability, consider pairing your drive with a powered USB hub if power delivery becomes an issue.


Preparing the Operating System

We'll use Raspberry Pi OS (32-bit)—a stable, Debian-based system optimized for the Pi.

Step 1: Flash the SD Card

  1. Insert your microSD card into your computer.
  2. Download Raspberry Pi Imager from raspberrypi.com/software.
  3. Open the app and select:

    • Operating System > Raspberry Pi OS (Other) > Raspberry Pi OS Full (32-bit)
    • Storage > Your SD card
  4. Click “Write” to flash the OS.

Once complete, safely eject the card and insert it into your Pi.

Step 2: Initial Setup

Connect your Pi to a monitor, keyboard, mouse, and power. On first boot:

📝 Tip: Write down your username and password. You’ll need them later.

Step 3: Enable Remote Access (Optional but Recommended)

If you plan to manage your node remotely (e.g., headless), enable SSH:

  1. Open Raspberry Pi Configuration from the Preferences menu.
  2. Go to Interfaces > Enable SSH.

Now you can access your Pi via PuTTY (Windows) or terminal (ssh pi@<ip_address>).

To find your Pi’s IP address:

ifconfig

Look for wlan0 (Wi-Fi) or eth0 (Ethernet). The IP will look like 192.168.x.x.

Alternatively, check your router’s admin panel for connected devices labeled “raspberrypi”.


Mounting the External Hard Drive

Bitcoin’s blockchain requires dedicated storage space. Even though your drive may auto-mount, manually mounting ensures consistent access.

  1. Plug in your external drive.
  2. Find its name:

    lsblk

    Look for something like sda1.

  3. Create a mount point:

    sudo mkdir /mnt/bitcoin
  4. Mount the drive:

    sudo mount /dev/sda1 /mnt/bitcoin
  5. Set ownership:

    sudo chown pi:pi /mnt/bitcoin

Your blockchain data will now reside safely on the external drive.

👉 Secure your Bitcoin journey with tools built for real-world use.


Installing and Configuring Bitcoin Core

Bitcoin Core is the reference implementation of the Bitcoin protocol. Running it validates every transaction independently.

Install Bitcoin Core

Run these commands in the terminal:

wget https://bitcoin.org/bin/bitcoin-core-0.21.1/bitcoin-0.21.1-arm-linux-gnueabihf.tar.gz
tar xzf bitcoin-0.21.1-arm-linux-gnueabihf.tar.gz
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.21.1/bin/*

This downloads, extracts, and installs Bitcoin Core binaries system-wide.

Create Configuration File

Create bitcoin.conf in /home/pi/:

nano /home/pi/bitcoin.conf

Add the following:

datadir=/mnt/bitcoin/blockchain
server=1
txindex=1
prune=0
rpcuser=mybitcoinuser
rpcpassword=mysecurepassword123
zmqpubrawblock=tcp://127.0.0.1:27500
zmqpubrawtx=tcp://127.0.0.1:27501

Save with Ctrl+O, exit with Ctrl+X.

Create .bitcoin folder and copy RPC credentials:

mkdir /home/pi/.bitcoin
nano /home/pi/.bitcoin/bitcoin.conf

Paste only:

rpcuser=mybitcoinuser
rpcpassword=mysecurepassword123

Start Bitcoin Core

Start syncing the blockchain:

bitcoind -conf=/home/pi/bitcoin.conf

Use bitcoin-cli -getinfo to monitor sync progress. Initial sync may take several days depending on your internet speed.


Installing and Configuring LND (Lightning Network Daemon)

LND enables fast off-chain payments via the Lightning Network.

Install LND

wget https://github.com/lightningnetwork/lnd/releases/download/v0.15.4-beta/lnd-linux-armv7-v0.15.4-beta.tar.gz
tar xzf lnd-linux-armv7-v0.15.4-beta.tar.gz
sudo mv lnd-linux-armv7-v0.15.4-beta/* /usr/local/bin/

Configure LND

Create lnd.conf:

nano /home/pi/lnd.conf

Add:

bitcoin.active=true
bitcoin.mainnet=true
bitcoin.node=bitcoind
bitcoind.rpcuser=mybitcoinuser
bitcoind.rpcpass=mysecurepassword123
bitcoind.zmqpubrawblock=tcp://127.0.0.1:27500
bitcoind.zmqpubrawtx=tcp://127.0.0.1:27501
rpclisten=0.0.0.0:10009
listen=0.0.0.0:9735

Start LND:

lnd --configfile=/home/pi/lnd.conf

First-time setup:

lncli create

Follow prompts to set a password and back up your 24-word recovery seed.

Unlock wallet after reboot:

lncli unlock

Connecting via Zap Wallet (Mobile)

Zap allows easy mobile management of your Lightning node.

Install lndconnect

lndconnect generates QR codes for secure pairing.

Install Go:

wget https://studygolang.com/dl/golang/go1.17.3.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.17.3.linux-armv6l.tar.gz
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc

Install lndconnect:

git clone https://github.com/LN-Zap/lndconnect.git
cd lndconnect
go build
sudo cp lndconnect /usr/local/bin/

Generate QR code:

lndconnect --configfile=/home/pi/lnd.conf -i -o

Scan the QR code with Zap Android/iOS app while on the same network.


Frequently Asked Questions (FAQ)

Q: Can I run this setup without a monitor?

Yes! Once initial setup is complete, you can operate your node headlessly using SSH or remote desktop tools.

Q: How long does blockchain sync take?

Initial sync typically takes 2–7 days depending on internet speed and storage performance.

Q: Is it safe to leave my node online 24/7?

Yes—nodes are designed for continuous operation. Ensure proper ventilation and use a UPS for power stability.

Q: Do I need a static IP or port forwarding?

For basic wallet use on local Wi-Fi, no. For public node participation or inbound liquidity, consider dynamic DNS and port forwarding (port 8333 for Bitcoin, 9735 for Lightning).

Q: Can I upgrade my node later?

Absolutely! You can migrate data to more powerful hardware or expand storage at any time.

Q: What happens if my node goes offline?

Your funds remain safe. Channels will resume when back online, though temporary downtime may affect routing earnings.


Final Thoughts

Running a Bitcoin and Lightning node on a Raspberry Pi is one of the most practical ways to embrace true self-custody and support network decentralization. With under $150 in hardware and a few hours of setup, you gain full control over your transactions—without relying on third parties.

From validating blocks to making instant payments, your node becomes a personal gateway to financial freedom.

👉 Take control of your digital assets with a trusted global exchange platform.

By contributing to the network, you’re not just securing your wealth—you’re helping build a more resilient, transparent financial future for everyone.

Stay sovereign. Stay secure. Keep running your node.