RaspberryPi 4

First, we need to burn the latest 64bit OS on the microSD card. At the time of writing, this was 2020-08-20-raspios-buster-arm64. The microSD card is not where we'll be writing the Cardano block data to, so 32GB is quite enough for the OS and Docker.

Once you've burned the OS on the card, you may want to enable SSH on boot before you power up your Pi for the first time. For this you need to put an empty file called SSH in the root directory of the microSD card.

$ touch /Volumes/boot/SSH

When the Pi is running, you should be able to SSH into it, like this ...

$ ssh pi@raspi4
password: raspberry
Linux raspberrypi 5.4.51-v8+ #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 aarch64
...
Use raspi-config to set the country before use.

pi@raspberrypi:~ $

You can now use raspi-config to change the default password, set the hostname, enable Wi-Fi, etc. One of the first things I usually do, is to add my public SSH key to ~/.ssh/authorized_keys

$ scp ~/.ssh/id_rsa.pub pi@raspi4:.ssh/authorized_keys

For added security, we can then disable password authentication like this ...

$ sudo sed -i "s/^#PasswordAuthentication yes$/PasswordAuthentication no/" /etc/ssh/sshd_config
$ sudo cat /etc/ssh/sshd_config | grep PasswordAuthentication
PasswordAuthentication no

$ sudo systemctl restart sshd

Make sure you can indeed login without password, before you disable that. For details on how to generate an SSH key, we kindly ask you to look here for example.

Now that our Pi is reasonable well secured, we can continue with the setup and update system packages.

System Time Synchronization

Keeping the system time synchronized among peers is quite important when we want to engage in peer-to-peer communication. Lets check real quick, whether the system time is getting synchronized ...

If that should not be the case, have a look at over here.

Enable memory accounting

Later, we'll be looking at how much memory the various docker containers consume while running. This is an important metric that we Stake Pool Operators (SPO) want to have an eye on. Lets check whether memory accounting is enabled at the kernel level.

Add these last two cgroup settings in case they are not there already. Re-boot afterwards ...

Swap File Setup

The Pi comes with 8GB of RAM, which should be plenty to run a Cardano node. Still, lets setup a swap file in case the process has high memory spikes.

Mount Data Disks

We won't be writing the block data to the microSD card. Instead, we'll be using an external SSD drive connected to one of the USB-C ports. Initially, this can be a SanDisk Ultra Fit USB 3.1 Flash Drive.

Fist, lets list the connected block devices

Now, lets initialize the filesystem on that external drive. The commands below will re-partition the drive and format the file system. All existing data on that drive will be lost.

Make sure the mounted directory for the block data is empty and does not contain the lost+found folder. Otherwise the Cardano node will not accept this location.

This concludes the RaspberryPi setup. We can now continue with Installing Docker.

Last updated

Was this helpful?