Using Knots instead of Bitcoin Core

Lately there has been more demand for Knots, which is a fork of Bitcoin Core with extra bug fixes and most importantly, up-to-date mempool policies that can address ordinal transactions. What’s nice about Knots is that it can be used as a drop-in replacement, meaning all services dependent on Bitcoin Core are working exactly as before. I vetted it on my own installation (knots + mempool + electrs + jam + lightning).

Here is a guide on how to do this:

This is done by installing Knots through a community marketplace, maintained by a volunteer and contributor of the anti-spam movement.

Before you do this
Backup everything!! Most importantly all your seed phrases! This is a third party solution and there is always a chance of something going wrong and you don’t want to be caught with your pants down in case SHTF.

Installing apps that depend on Bitcoin Core
After you have installed Knots, any app that depends on Bitcoin Core cannot be installed through the UI, because it doesn’t recognize Knots as such. Instead you’ll need to SSH into your machine and run:

sudo ./umbrel/scripts/app install lightning

if you want to install lightning, for example. This installation will go though without complaints.

Final thoughts
It would greatly help if the option to use Knots can get first party support by Umbrel, so that plebs don’t have to resort to hitting the command line to run the client they prefer.

1 Like

yes excited to get this added, and we also have a fix for the dependencies issue in the works too

1 Like

Link to documentation is not working

Thanks for noticing. Here is the new url:

Hi thanks, it does work now.

I see that Knots is now available thru the marketplace, but it says that Knots does not yet automatically integrate with other apps in the Bitcoin ecosystem on Umbrel.

Will the manual installation work with other apps that required bitcoin core/knots for example electrs and mempool? or will I need to reinstall them as well?

The community installation works with other apps, but you’ll have to install them through the command line because the UI won’t allow you to (it thinks you have a missing dependency). See my original post. I don’t know if the same can be said about the “native” Knots installation. Umbrel is planning to fully support it as a drop-in replacement for Core in the future though.

Btw, if you’re on UmbrelOS v1.x, you’ll have to use different command than the one shown here, this one only works for v0.x. See this this thread for some v1.x commands for managing apps from the command line.

Thanks, to make sure I understand.

I will need to install as per the instructions bitcoin knots thru the command line, once finished
I will need to also reinstall the apps that I want to use with bitcoin knots, electrs, mempool, etc

Is this correct?

There are two possible scenarios.

  1. You do a fresh install of Umbrel

In this case, just add Knots through the community store UI (section if you don’t have a node yet in the docs). Afterwards, you’ll have to install any additional apps that depend on Bitcoin through the command line.

  1. You have a working setup of Bitcoin Core + apps that depend on it

You will have to use the command line to replace Bitcoin Core with Knots, as outlined in the docs, section if you already have a node. You don’t have to reinstall any apps that depend on Bitcoin Core. Just leave the rest like it is. They will use Knots instead of Core automatically afterwards.

I can personally recommend going with option 1, because it is the safest route. Replacing Core with Knots on a running setup is scary to be honest and if something goes wrong, you will have a bad time. On the other hand, if option 2 works out for you, you don’t need to do an entire resync of the blockchain.

@SunOfABeach I just finished a fresh install.
I am now trying to install electrs and mempool thru the command line as suggested, but I get an error

$ umbreld client apps.install.mutate --appId electrs
false

On the web interface I can see it starts to install the electrs app, but it fails with this false. ( it seems that it checks for bitcoin core and it is not there)

@SunOfABeach here is what I see on the error log:

Apr 09 15:37:26 umbrel umbreld[37607]: time=“2024-04-09T15:37:26Z” level=warning msg=“The "APP_BITCOIN_DATA_DIR" variable is not set. Defaulting to a blank string.”
Apr 09 15:37:26 umbrel umbreld[37607]: invalid spec: :/data/.bitcoin:ro: empty section between colons
Apr 09 15:37:26 umbrel umbreld[708]: [app ] [error] Attempt 3 installing app electrs failed. There are 0 retries left.
Apr 09 15:37:26 umbrel umbreld[708]: [apps ] [error] Failed to install app electrs: Command failed with exit code 15: /usr/local/lib/node_modules/umbreld/source/modules/apps/legacy-compat/app-script install electrs

Sucks to hear. Just to check I did:

$ umbreld client apps.install.mutate --appId bitfeed

and it went through. This one also depends on Bitcoin Core only.

Did you do a clean UmbrelOS reinstall? What hardware do you run it on?

I did a clean install and a full node sync.
Did you try installing electrs as well?

Yes but I installed it on Umbrel v0.5 and upgraded to v1.x afterwards.
What happens if you try to install bitfeed?

I am in contact with the maintainer of the Knots app and he says he only vetted it on Umbrel v0.5. Once v1.x is available on Linux, he can help out.

Bitfeed did install but is not working, it shows an empty mempool

It shows the network status indicator in red on the top left corner
and the mempool at zero

Ok then I’m afraid we have to declare that installing dependent apps no longer works with Umbrel v1.x. This guide was written and properly tested when v0.5.x was the latest version.

I think at this point it’s best to wait for Umbrel to completely support Knots as a drop-in replacement for Core. We can already install Knots through the 1st party app store, they just need to enable other apps to use it as a dependency.

Thanks for putting in the effort and doing the right thing by running Knots. This will become much easier for plebs in the future as most home node solutions will offer it as an alternative to Core out of the box.

thanks for the help,
I installed knots from the 1st party store, I agree is better to wait.
all the best !!

1 Like

Hi Just upgraded to the new release umbrel 1.1
it seems electrs still not working with knots

Thx for the info. Then we’ll need to wait until Umbrel has done the integration.

It does not work for me at 0.5.4. Trying to install Electrs but I’m getting this “ERROR: for electrs Cannot create container for service electrs: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.”.

To me this sounds like a problem unrelated to the dependency to Core.

Also, the command to install electrs on 0.5.4 is this:

sudo ./umbrel/scripts/app install electrs