Skip to content

Bring your own Validator

Introduction

This page explains how to install and setup a Raspberry Pi 4 running Ubuntu 20.04 as a ETH 2.0 Prysm Validator.

We will use the following tools:

  • Ubuntu 20.04 as the base OS
  • hypriot/flash to install Ubuntu 20.04 you the SD card
  • Cloud-init to automatically provision 90% of your Raspberry Pi
  • Docker engine and Docker-compose to run Prysm docker image
  • Prysm as the Validator software
  • Stunnel to open an encrypted tunnel till the Cryptouille Beacon node
  • Prometheus for monitoring your Raspberry Pi

Installing your Raspberry Pi 4

Configure the Cloud-init user-data.yml file

This file is automating the startup of your Raspberry Pi. The more we put in, the less manual command will be needed afterwards

So please add and configure the following in user-data.yml file:

#cloud-config

hostname: my-validator-01

# Disable password authentication with the SSH daemon
ssh_pwauth: false

users:
  - name: validator
    gecos: "Validator"
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash
    groups: adm,sudo,docker
    lock_passwd: false
    chpasswd: { expire: false }
    ssh_authorized_keys:
      - XXXXXXXX YOUR SSH PUBLIC KEY HERE XXXXXXXXX

packages:
  - apt-transport-https
  - ca-certificates
  - curl
  - gnupg-agent
  - software-properties-common
  - git
  - openssh-server

runcmd:
  - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
  - add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  - apt-get install -y docker-ce docker-ce-cli containerd.io
  - systemctl start docker
  - systemctl enable docker

package_update: true
package_upgrade: true

power_state:
  mode: reboot

Flash your SD card

Now our user-data.yml file is ready, we can flash the SD card to write all this on it.

curl -LO https://github.com/hypriot/flash/releases/download/2.7.0/flash
chmod +x flash

./flash --userdata user-data.yml https://cdimage.ubuntu.com/releases/20.04.2/release/ubuntu-20.04.2-preinstalled-server-arm64+raspi.img.xz

Start your Raspberry Pi

You can now start your Raspberry Pi and give it a bit of time to boot and setup. It can be up to 5 minutes since it will perform a complete OS upgrade.

You can then SSH to your Raspberry Pi:

ssh validator@my-validator-01

Configure the validator

TODO

Profit!

That's it, you're done. You can enjoy your ETH reward!