I’m starting to research what can be done with Umrel service. I initially start to deal with it due to configuration of Bitcoin node and eventually learn how to deal with Lightning node. It was a big suprise, how much thigs can be installed as docker image over Umrel. I think that this servie worth to research so here is link to the project: https://umbrel.com/
How install umbrel app over command line
Sometimes, installation of umbrel app might failed and the reason cannot be found on the first seen. To get over it you might try to find app over shell, as result you might see an error message.
cd umbrel
sudo ./scripts/app install pi-hole
|
Reference: https://www.youtube.com/watch?v=2DFwWKp0nVo
Redirect Bitcoin Node with addional storage
Even Umrel can be configured over Raspberry 4. Due to lack of such hardware i rather decide to use my proxmox server and use Ubuntu to get it work. Everything was quite straightforward. The only issue i found is that Bitcon app does not have explicitly customizable storage that is used for Bitcon Node app data. Blockchain size is at time of writing this article about 500 GB. Therfore i have prepared separated virtual storage just for this purpose.
Prepare disk
Let´s assume that disk is physically connected to your Ubuntu system. You would need to logon to console with root or use sudo su to switch to root.
For easir setup i would suggest to install gparted and open it with following command:
apt install gparted
gparted
|
Once you open gparted, swith in right combo box device you want to adjust. In my case it was /dev/sdb with 1TB size. You would need to create new partition table with selecting Device-> Create Partition Table and on newly attached disk and create ext4 filesystem. After selecting everything to desired state click on Apply All Operation (green circle with check mark) for apply changes.
It is very helpful to get UUID of partition that can be used for automatic mount of disk to filesystem. So right-click partition and select Information option to find out this number.
Now just copy this UUID to you notes, you will need it in next steps!
Now we can configure mount file to allow automatic mount of newly created partition. Let´s create mount folder and set ownership of user where Umbrel is used.
Replace:johndoe with real name of user!!!
Note:Not sure if it is neded but i rather changed ownership of folder itsel as well as mounted disk. chown might not be needed but since i did not try it i rather writing it here to be sure that guide is working for sure.
Suppose the mount folder will be /media/data
mkdir /media/data
chown -R johndoe:johndoe /media/data
|
Edit fstab with your favouring editor.
Add there line for mounting for me working this (please adjust UUID to yours copied from gparted:
UUID=5b7fe1b3-93c8-4399-8a05-ef8653b2d13b /media/data ext4 defaults 0 2
|
After saving the file exit editor and perform following steps, mounting of partition and ensuring that disk is owned by user used for Umbrel.
mount /media/data
chown -R martin:martin /media/data
|
Adjust docker of Bitcon Node app
Installation of Umbrel is usually in the User Home foder. Once you install Bitcoin Node app you would need to adjust yaml file for Bitcoin Node app. In home folder you should have umbrel folder, you shoudl successfully with this commands that perform stop of docker service and open yaml file where path need to be adjusted. Please ensure that you have console opened in context of user under which you have installed umbrel otherwise command cd will swithc to actively used profile!!!
Please back your yml file before edit it!
cd
cd umbrel/
./scripts/stop
cd
cd umbrel/
cd app-data/
cd bitcoin/
nano docker-compose.yml
|
Adjust in cocker-compose.yml file locations regarding to service (here I´m not user if it was needed but rather check it).
What i definelty need to adjust is bitcoinid section where i modified path in volumes from ${PWD}:/data/.bitcoin to /media/data:/data/.bitcoin. And added line with /dev/sdb1:/dev/sdb1 to ensure that docker can find this device.
After saving docker-compose.yml file swithc back to umbrel folder and start docker service.
cd
cd umbrel/
./scripts/start |
If all goes well you should see that Bitcoin Node docker was started sucessfully. If something went wrong you should see it in console.
Electrs
This docker implementation does not work once you move db to different location.
Sympthoms:
Electrs dashboard writes still „waiting for bitcoin node to finish syncing“
When you run command:
~/umbrel/scripts/app compose electrs logs”
|
you get error:
failed to open bitcoind cookie file: /data/.bitcoin/.cookie
electrs_1 | 1: No such file or directory (os error 2)
electrs_1 | [2023-05-24T18:20:54.900Z INFO electrs::db] "/data/db/bitcoin": 17 SST files, 0.000013685 GB, 0.000000017 Grows
|
Solution:
Adjust Line in docker-compose.yml for Electrs app:
Under volumes:
Line:
– „${APP_BITCOIN_DATA_DIR}:/data/.bitcoin:ro“
To:
– „/media/data:/data/.bitcoin:ro“
Add (device name depends on where you have external drive for bitcoin app db)
devices:
– /dev/sdb1:/dev/sdb1
I found this solution here: https://community.getumbrel.com/t/electrs-server-not-synchronizing-when-bitcoin-blocks-stored-externally-on-ssd-drive/11230