Skip to content

Instantly share code, notes, and snippets.

@thunderbiscuit
Last active Nov 20, 2021
Embed
What would you like to do?
Installing Umbrel on a RockPro64 Using a DietPi Distro

Installing Umbrel on a RockPro64 Using a DietPi Distro

Tested on DietPi v6.32.2

These two scripts aim to generalize the installation of Umbrel on a RockPro64 Single Board Computer using an awesome lightweight distro for SBCs: DietPi.

Notes

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.

Prerequisite steps

Prior to running the scripts you should:

  1. Flash the OS on an microSD card and pop it in the RockPro
  2. Make sure the RockPro is connected to your router with an ethernet cable
  3. Power it on!
  4. You'll need to have mounted an external ssd drive to the RockPro to host the chain data. You can easily set that up in the TUI provided by DietPi. Simply start the dietpi-launcher and use the DietPi-Drive_Manager to format and mount your ssd.

How to use the scripts

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.

An important thing to remember is that you need to run the first script as root and the second script as umbrel.

Part 1:

# 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

Part 2:

Exit the ssh session and ssh back in with the umbrel user (e.g. ssh umbrel@<ip_address>).

# umbrel@DietPi
# make sure you are in the home directory for the umbrel user (it's called 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:

sudo reboot

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:

sudo ./scripts/start                    # mainnet
sudo NETWORK=testnet ./scripts/start    # testnet
sudo NETWORK=regtest ./scripts/start    # regtest
sudo ./scripts/stop                     # stop node

What is the script doing?

The scripts prepare the distro for Umbrel by accomplishing 6 distinct tasks:

  1. Changing default dietpi user to umbrel and 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).
  2. Install docker
  3. Install docker-compose using pip3. This is necessary because docker-compose does not support the ARM architecture as of yet.
  4. Give docker-compose executable permissions
  5. Install other dependencies
  6. Create a directory for the umbrel software stack called umbrel-node and download umbrel into it
#!/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
mkdir umbrel-node
cd umbrel-node/
curl -L https://github.com/getumbrel/umbrel/archive/v0.2.13.tar.gz | tar -xz --strip-components=1
@SardaCZ
Copy link

SardaCZ commented Mar 26, 2021

Great work, I am beginner in linux and in bitcoin and this article helped me a lot. I had a little issue with Python (i had to install actual version manually), but everything else worked. Thank you very much.

@thunderbiscuit
Copy link
Author

thunderbiscuit commented Mar 27, 2021

Cheers! Just be careful if you're on mainnet. Umbrel is still in alpha. Have fun, and don't be shy to start with testnet first!

@Ao55HF
Copy link

Ao55HF commented Nov 20, 2021

Would be great if this could be updated.
Some changes to repo and what's available e.g new 64bit bullseye, docker compose, etc.

I don't know enough to amend the script, but creating a separate account would be my pref, not replacing default user. Wouldn't all that impact on dietpi scripts and optimised software?

@thunderbiscuit
Copy link
Author

thunderbiscuit commented Nov 20, 2021

Yes agreed I think this script is really dated at this point. I use the RockPro for other things now, and have no way to test/update unfortunately.

Of note is how much Umbrel has evolved since this (two major releases I think), and DietPi as well (now on 7.8). You're also correct that docker-compose now support ARM architecture, so that would change things.

I would consider merging changes if anyone is interested in fixing it up. This gist and the companion blog posts (post 1, post 2) really do get a fair bit of action (people tweet at me about it sometimes!), so I know there is real demand for Umbrel on the RockPro64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment