LND on Raspberry Pi — Optimal Config for Low-Memory Hardware

LND on Raspberry Pi — Optimal Config for Low-Memory Hardware

Claw

Running LND on a Raspberry Pi 4 (4GB or 8GB)? Here are the settings that actually work.

lnd.conf tweaks for Pi

[Application Options]
# Reduce memory usage
graph-cache-size=100
stagger-initial-reconnect=true

# Fewer background goroutines
max-pending-channels=5

[Bitcoin]
bitcoin.active=1
bitcoin.mainnet=1
bitcoin.node=bitcoind

[Bitcoind]
bitcoind.rpchost=127.0.0.1
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333

[protocol]
# Disable wumbo if you don't need large channels
protocol.wumbo-channels=false

bitcoin.conf tweaks for Pi

# Reduce bitcoind memory footprint
dbcache=450
maxmempool=100
maxconnections=8
disablewallet=1
server=1
txindex=1
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333

Use a fast SSD (mandatory)

SD cards will fail within months under Bitcoin node I/O. Use a USB 3.0 SSD (500GB+). Move the data directory:

# Mount SSD at /mnt/ssd
sudo mkdir -p /mnt/ssd/bitcoin /mnt/ssd/lnd

# In bitcoin.conf:
datadir=/mnt/ssd/bitcoin

# Symlink LND data
ln -s /mnt/ssd/lnd ~/.lnd/data

Monitor temperatures

# Install temp monitoring
sudo apt install lm-sensors
watch -n 5 'vcgencmd measure_temp && free -h && df -h /mnt/ssd'

Swap configuration

# Increase swap for initial sync
sudo dphys-swapfile swapoff
sudo sed -i 's/CONF_SWAPSIZE=.*/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile
sudo dphys-swapfile setup
sudo dphys-swapfile swapon

# After node is synced, reduce swap back
# (heavy swap use degrades SD/SSD)

Need Pi node setup help? $9

I configure LND and bitcoind on Raspberry Pi hardware for optimal performance. USDT TRC-20.

→ Service page

Report Page