Bitcoin core or knots is unusabel on umbrel and Raspberry Pi

Hi everyone,

I’m running several Raspberry Pi devices with Umbrel, some for Syncthing backups, some for photo storage, and I’ve also had one set up as a Bitcoin node.

I just reinstalled the node on a new drive, but the initial block download has been crawling for more than two weeks now. It barely manages around 2,000 blocks per day, which makes it pretty much unusable.

For comparison, I set up another Pi with Start9 and the IBD there is noticeably faster, so it seems like this issue is specific to Umbrel.

Has anyone else run into this? Any tips or tweaks that could help? For context, the hardware is a Raspberry Pi 4 with 8 GB of RAM.

Thanks in advance!

what drive are you using. it should be done in 2 weeks.

They do get slower towards the end all of my nodes have.

Evem core on a old laptop with spinny hdd was done in 2 weeks.

If you already have a node but want to use umbrel and cant wait just copy the blockchain over

With as many Pi’s as you have, would it not be better to go with a home lab of mini or micro pc’s? It seems like it would be the same cost with more ability.

Sorry, I don’t have a solution for you.

Its because umbrel doesn’t set up a swap file or a swap partition.

Which I would set up a 16GB swap partition. Swap files are a little bit more flexible, however, they are easily fragmented and performance drops over time do to file/disk i/o seeking.

Both Start9 and Umbrel are Docker desktops on a Debian style Linux (start9 uses Ubuntu). Only real difference is Start9 sets up a swapfile.

I tried for over a month to get IBD to work on Umbrel but it is broken, always gets stuck around block 700000
I ended up using an old mac mini and IBD took 5 days, plain sailing,
No support here anymore from Umbrel, they don’t seem to be aware or want to fix this issue.
I feel like Umbrel is now dead as a project, with Bitcoin at least.
see here:

I don’t know why, I think they don’t support anyone running anything but their hardware.

That is why I’m slowly forking Umbrel. But I don’t have a spare raspberry pi to verify everything even though it should work since the update to Trixie and the faster kernel wouldn’t require anything additional since you are only running docker and not a Xorg desktop.

Besides adding a swap file. Also adding the udev rules to mount an external USB into the docker desktop is something I notice I had to add too.

The versions 28 and 29 of bitcoind needs 12 GB of ram to sync and that is why its taking forever on systems with 8GB of ram.

Yes planning to buy one but wanted to use the existing ones in the meantime.

just did some tests. In around one 1h umbrel downloaded 301 blocks, and start9 3459. Same version, 29.1

I understand a Pi is not the ideal HW, but hard to understand such a big difference.

swap file buffering which the newer bitcoind prefers to do so it can use the ram for transaction processing. Which umbrel doesn’t have a swapfile or a swap partition and start9 does.

So if you ssh into umbrel from a computer and:

    sudo fallocate -l 16G /data/swapfile
    sudo chmod 600 /data/swapfile
    sudo mkswap /data/swapfile
    sudo swapon /data/swapfile
    echo '/data/swapfile none swap defaults 0 0' | sudo tee -a /etc/fstab

then restart bitcoin or restart the umbrel machine, you’ll notice the difference.
even though updating to trixie would help immensely too:

 wget  https://raw.githubusercontent.com/oconical/Umbrel_Patches/refs/heads/main/umbrel-update.sh
sudo +x umbrel-update.sh
sudo ./umbrel-update.sh

Theoretically this works for both Raspberry Pi and AMD64_x86 but I never have tested it on Raspberry Pi

My 2020 RasPi running Umbrel is worthless now. Same for me, IBD has taken a month, and still only about 70% done. Don’t waste your time, you need better hardware. I bought a new Umbrel, which frankly , took 6 weeks, I wasn’t happy about that either.

My Pi5 is running really good with Umbrel and Knots or Node. But I had to learn some things. First of all im using a Samsung 990 NVME. This need to be formatet with EXT4. With this format its much faster even for syncing. Get your image of Umbrel with Balena Etcher on it and run it on Pi5. This takes 3 minutes. After that install Knots or Node and sync. Put your Cache in Knots from 450 to 1900 for syncing. It took 48 hours to sync complete. After that save your Bitcoin Data and you never need to sync any more. Worked for me. I have actual 70 peer connections and it runs like a charm.

I never payed attention to what file system they set it up on, but what I end up doing is resizing the /data partition, then male a 64Gb partition and move the root file system since they set ip up on a 9Gb partition without a swapfile, and set up the swapfile just like a minimum stock install of debian, then I update debian which updating and going to the new kernel made it all faster. I added a 2nd 2TB drive and format that to ext4 as an umbrel LVM then move /data to that so Umbrel and the docker programs are on a drive that is fast and expandable, then I set up the previous /data partition as part of the umbel LVM group and expand the /data LVM so I get the 2T plus the original partition in my drive space for umbrel and docker programs.

Other things I had to do is set up the udev so that usb drives mounted in the Umbrel docker desktop.

I think the advice here is pretty solid. I would recommend if you are having issues with the Bitcoin Node app to first try to increase the Cache Size in your Settings > Optimization menu. I would recommend to set this to be ~1GB lower than your free Memory to speed up the synchronization speed. To find this out, go to your umbrelOS’s Live Usage > Memory page and look for “X.YY left”. Take X-1, and multiply it by 1000. Put that number into the Cache Size. Once synchronized, put the Cache Size back to 450 as otherwise your wasting RAM that could be used elsewhere.

I also saw it mentioned to upgrade to Debian Trixie and setup a swap file. A safer way of doing this is to update umbrelOS to 1.5-beta-2 as its on Debian Trixie and uses ZRAM which achieves a similar purpose. Just keep in mind there is a current bug that makes it so the safest way of upgrading is through the OTA updates from a currently running umbrelOS. If you flash direct from a USB you will need to expand the data partition as it only allocates 400MB instead of most of your Storage device.

Hope that helps!

I setup my cache size to 4GB, but still the problem seems to be the connection to peers it often has 1 peer connected or even zero for a few hours. But maybe it’s not related to umbrel, but something on the network bacause I had the same thing with a node built by hand with ramix guide.

Another thing you might want to look at is they took out the default mapping of Docker’s DNS and replaced it with cloudflair which doesn’t work well when the router resolves correctly.

so try putting in your dns from your ethernet connection:

find what your ethernet connection is using:

nmcli dev show enp1s0 | grep 'IP4.DNS'

then assign that IP to the system.d Network manager since they are using that for DNS queries from docker software. Replace xxx.xxx.xxx.xx with your router’s dns IP:

sudo -i
printf '[global-dns-domain-*]\nservers=xxx.xxx.xxx.xxx\n' > /etc/NetworkManager/conf.d/10-cloudflaredns.conf

and restart

1 Like

Another way of using your router’s DNS is to toggle the option located at Settings > Advanced Settings > Cloudflare DNS. This would be safer than trying to do it from the command line if you want to stick to the GUI.

1 Like

I really don’t know why they messed up docker’s isolation by altering the DNS stack like this. Because there is really just a few apps that would need a simple override and now these days people use VPNs in routers.

Maybe that’s the reason why