Running an Ethereum node on a Raspberry Pi is a cost-effective way to participate in blockchain networks without relying on expensive cloud services. The Raspberry Pi 4 Model B, with its low energy consumption and expandable storage via external drives, is ideal for hosting a lightweight Ethereum full node or Ethereum Classic node. This guide covers the setup process using Ubuntu LTS and Core-geth, optimized for efficiency.
Set up a Raspberry Pi 4 (4GB RAM) with Ubuntu LTS and Core-geth.
Configure Core-geth to sync with ETC, ETH, or test networks.
Optimize storage and memory usage for long-term node operation.
Raspberry Pi 4 Model B (4GB RAM) – Core-geth requires ≥4GB RAM.
MicroSD card (≥16GB) – For the OS.
External HDD/SSD (optional for mainnet) – Mainnet requires hundreds of GBs; testnets can use a large microSD.
USB-C power supply (5.1V/3A) – Stable power is critical.
Ethernet cable (recommended) – More reliable than Wi-Fi.
Ubuntu LTS (22.04 or later).
Core-geth (built from source).
👉 Explore Raspberry Pi 4 accessories
Follow Ubuntu’s official tutorial:
# Download and flash Ubuntu LTS to the microSD card.
Find the Pi’s IP address using nmap
if SSH fails:
nmap -sn 192.168.1.0/24
sudo apt-get update && sudo apt-get upgrade -y
sudo apt install unzip make htop build-essential
sudo snap install go --classic
Edit /etc/netplan/50-cloud-init.yaml
:
network:
ethernets:
eth0:
addresses: [192.168.1.144/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8, 1.1.1.1]
Apply changes:
sudo netplan apply && sudo reboot
Identify the disk (/dev/sda
):
sudo fdisk -l
Format and mount:
sudo mkfs.ext4 /dev/sda
sudo mkdir /mnt/ssd
sudo mount /dev/sda /mnt/ssd
Auto-mount on boot via /etc/fstab
:
UUID=b2907e9d-1a37-4f26-8d43-b51ff3e1c66f /mnt/ssd ext4 defaults 0 0
Prevent out-of-memory errors with a 2GB swap file:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Permanently enable it in /etc/fstab
:
/swapfile none swap sw 0 0
git clone https://github.com/etclabscore/core-geth.git
cd core-geth
make geth
sudo mv build/bin/geth /bin/
Verify installation:
geth version
geth --classic --syncmode fast --cache 256 --datadir /mnt/ssd/classic
For background operation:
nohup geth --classic --syncmode fast --cache 256 --datadir /mnt/ssd/classic &
geth attach ipc:/mnt/ssd/classic/geth.ipc
> eth.syncing
👉 Troubleshoot common node issues
--cache
(e.g., --cache 128
) and ensure swap is active.--datadir
paths (e.g., /mnt/ssd/eth
vs. /mnt/ssd/etc
).Use htop
to monitor CPU/RAM usage.
Regularly back up your datadir
to avoid re-syncing.
Join forums like Ethereum Stack Exchange for community support.
By following this guide, you’ve created a low-cost, energy-efficient Ethereum node—ideal for developers and enthusiasts alike!