This post explores the setup required to run an Umbrel bitcoin node (an easy and beginner-friendly node) on a Pine64 single board computer (SBC) called the RockPro64. The RockPro64 is a slightly more powerful version of a Raspberry Pi 4, and is built by the Pine64 organization, a non-profit that builds open hardware. They also happen to be very bitcoin-friendly.
A really great distro to run on a RockPro is DietPi. DietPi is based off of Armbian, but is stripped down and ships extremely lean. From the very basics you can then install everything you need, but keeping the initial install minimal (about 600MB) ensures maximum performance for small SBCs.
Tested on DietPi v6.32.2
This article aims to generalize the installation of Umbrel on a RockPro64 Single Board Computer using an awesome lightweight distro for SBCs: DietPi.
I describe two scripts that together install the requirements for Umbrel. I provide these two scripts as as GitHub Gist and explain how to download them using
curl for extra convenience, but you absolutely do not need to go that route. After installing DiepPi, simply running the two scripts below line by line will generate the same result.
Important: you need to run the first set of commands (script 1) as
root and the second set (script 2) as your newly created user
#!/bin/bash # change default user dietpi for umbrel and assign new home directory $ sudo cp -r /home/dietpi $PWD/umbrelhome/ $ sudo usermod -l umbrel dietpi $ sudo groupmod -n umbrel dietpi $ sudo usermod -d $PWD/umbrelhome/ -m umbrel $ sudo usermod -aG sudo umbrel $ sudo chown --recursive umbrel:umbrel $PWD/umbrelhome/
#!/bin/bash # dependencies $ sudo apt install --yes fswatch jq rsync curl make gcc libffi-dev libssl-dev python3-pip python3-dev # docker $ curl -fsSL https://get.docker.com/ | sh $ sudo usermod -aG docker umbrel # docker-compose $ sudo pip3 install setuptools wheel $ sudo pip3 install docker-compose $ sudo chmod +x /usr/local/bin/docker-compose # install umbrel software stack $ mkdir umbrel-node $ cd umbrel-node/ $ curl -L https://github.com/getumbrel/umbrel/archive/v0.2.13.tar.gz | tar -xz --strip-components=1
DietPi comes with dropbear (a lightweight ssh server) enabled, which means you can ssh into the RockPro64 out of the gate without any configuration from a computer on your local network, as long as the RockPro is connected to your router with an ethernet connection. Note that you'll need an IP scanner to discover the local IP address of the RockPro. You can of course also connect the RockPro to a screen and keyboard and work from there without sshing into it.
Prior to running the scripts you should:
dietpi-launcherand use the
DietPi-Drive_Managerto format and mount your ssd.
The first step is to navigate to the root directory of your external ssd (that's probably
/mnt/<name_of_your_ssd>/). Running the first script from that location will ensure that the home directory for the
umbrel user created is not on the micro SD card that has the operating system on (which would be too small for the chain data). Make sure your external hard drive has enough space for your needs (a 1TB ssd is fine for a full mainnet node).
The process consists of running two scripts. The first one creates the
umbrel user with a home directory on the ssd drive and the second downloads all dependencies for Umbrel as well as the Umbrel software stack itself. You can use the formula
curl hyperlink > filename.sh to recreate both scripts on your RockPro and then inspect them with
cat filename.sh. You should make sure that the scripts you downloaded are identical to the ones above (in the yellow boxes) before running them.
An important thing to know is that you need to run the first script as
root and the second script as
# root@DietPi # make sure you are in the root directory of the external drive you wish to use for Umbrel curl https://gist.githubusercontent.com/thunderbiscuit/e7f83cb62619e1368d6728e42949d21d/raw/aefd701106ed96eace760d4274d39ca6fa49ca63/create-umbrel-user.sh > create-umbrel-user.sh # inspect the script cat create-umbrel-user.sh # run the script source create-umbrel-user.sh
Exit the ssh session and ssh back in with the
umbrel user (e.g.
# umbrel@DietPi # make sure you are in the home directory for the umbrel user (umbrelhome/) curl https://gist.githubusercontent.com/thunderbiscuit/e7f83cb62619e1368d6728e42949d21d/raw/b426e3a60252453ee6956dc8c8a4ed3a98c65920/install-umbrel-dietpi-rockpro64.sh > install-umbrel.sh # inspect the script cat install-umbrel.sh # run the script source instal-umbrel.sh
Once that is done, you'll need to reboot the RockPro for Docker to work:
If the script above ran without any error, it will have created a directory called
umbrel-node. Make sure you are in that directory and start your node directly using the following commands:
# you should be somewhere that looks something like: # /mnt/<name_of_your_ssd>/umbrelhome/umbrel-node sudo ./scripts/start # mainnet sudo NETWORK=testnet ./scripts/start # testnet sudo NETWORK=regtest ./scripts/start # regtest sudo ./scripts/stop # stop node
The scripts prepare the distro for Umbrel by accomplishing 6 distinct tasks:
umbreland moving its home directory into the external drive outside of the SD card where your DietPi operating system is (this is necessary because Umbrel will add chain data and the electrs database to your home directory, which would fill up the SD card immediatly if it was kept there).
umbrel-nodeand download umbrel into it