Full Node on Raspberry Pi
In this guide we'll learn:
- How to install a Raspberry Pi 4
- How to run a docker'ized instance of Alephium full node on Raspberry Pi 4
How to install a Raspberry Pi 4β
This first section will detail my personal way of installing Ubuntu 20.04 server on a Raspberry Pi 4. It requires to have a Raspberry Pi 4 (obviously), a SD Card (8 GB is the minimum) and an SD Card reader to flash the SD Card. It will be illustrated using shell command from macOS, but you'll find the equivalent in Windows.
![Getting ready for the hard work](/assets/images/flashing-4c9615b66b02f440d408a1b5442e59ae.jpeg)
First of all we will configure the installation Ubuntu. We're using cloud-init for that since it is built in Ubuntu 20.04 and above.
This configuration creates a user (different from the ubuntu
default) and installs a few packages.
Configure the bootβ
Put the snippet below in a file named user-data.yml
and save it. This one creates a user alephium
with the password installfest2021
.
You can customize the content of this file if you know what you're doing.
#cloud-config
hostname: alephium
ssh_pwauth: true
users:
- name: alephium
gecos: "alephium"
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
groups: adm,sudo,docker
plain_text_passwd: installfest2021
lock_passwd: false
chpasswd: { expire: false }
# ssh_authorized_keys: # Optionally ad ssh key here, if you don't want the password.
# - ssh-ed25519 xxxxxxxxxxxxxxxxxx
packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- git
- openssh-server
- docker.io
- docker-compose
runcmd:
- systemctl start docker
- systemctl enable docker
package_update: true
package_upgrade: true
power_state:
mode: reboot