How to Set Up an Ethereum Node on Raspberry Pi

·

Introduction

The Raspberry Pi—a compact single-board computer—offers an affordable way to run a local Ethereum node. Unlike cloud-based solutions, this setup minimizes long-term costs and energy consumption while supporting expandable storage via external HDDs or SSDs.

Key Takeaways


Requirements

Hardware

Software


Step-by-Step Guide

Step 1: Install Ubuntu on Raspberry Pi

  1. Follow Ubuntu’s official Raspberry Pi installation guide.
  2. Use nmap to locate the Pi’s IP address if needed:

    sudo apt install nmap && nmap -sn 192.168.1.0/24

Step 2: Initial Server Setup

  1. Update System:

    sudo apt-get update && sudo apt-get upgrade -y
  2. Install Essentials:

    sudo apt install unzip htop build-essential
  3. Configure Static IP:
    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]}
      version: 2

    Apply changes:

    sudo netplan apply && sudo reboot

Step 3: Mount External Storage

  1. Identify Disk:

    sudo fdisk -l
  2. Format & Mount:

    sudo mkfs.ext4 /dev/sda
    sudo mkdir /mnt/ssd && sudo mount /dev/sda /mnt/ssd
  3. Auto-Mount on Boot:
    Add to /etc/fstab:

    UUID=[DISK_UUID] /mnt/ssd ext4 defaults 0 0

Step 4: Add Swap Space

Follow DigitalOcean’s swap guide to allocate 2GB swap:

sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile
sudo mkswap /swapfile && sudo swapon /swapfile

Step 5: Install Core-geth

  1. Build from Source:

    git clone https://github.com/etclabscore/core-geth.git
    cd core-geth && make geth
    sudo mv build/bin/geth /bin/
  2. Verify Installation:

    geth version

Step 6: Run Core-geth

Monitor Sync Status:

geth attach ipc:/mnt/ssd/classic/geth.ipc
> eth.syncing

FAQs

Q1: Can I use a Raspberry Pi 3 for this setup?

A1: While possible, the Pi 4’s 4GB RAM is strongly recommended due to higher memory demands during sync.

Q2: How long does initial sync take?

A2: Sync time varies by network (1–7 days). Fast sync mode reduces this significantly.

Q3: What’s the power consumption of this setup?

A3: Typically 5–10W, making it 10x more efficient than a desktop node.

👉 Explore more blockchain node guides


Final Tips

By following this guide, you’ve built a low-cost, energy-efficient Ethereum node—ideal for developers and enthusiasts alike.

👉 Need a reliable crypto exchange? Try OKX