Installation
Time: almost one and a half hour (of which 95% waiting while running the cmake
command)
This part of the guide will take a while, so be prepared. The goal is to compile Bitcoin Knots itself. What will you be doing?
- Install dependencies, in order to compile Bitcoin Knots you'll need some extra software.
- Get the source code, through the use of Git you can get the latest source code.
- Install database
- Compile Bitcoin Knots
Dependencies
Execute the command below to install all required dependencies. Dependencies are software package other software depends on. Bitcoin Knots also depends on other software for its compilation.
sudo apt install git build-essential cmake pkgconf python3 libevent-dev libboost-dev libsqlite3-dev libminiupnpc-dev libzmq3-dev systemtap-sdt-dev -y
Source code
Make sure you are in you "home directory". To be sure, execute cd ~
. The tilde sign (~
) is a short cut for /home/ubuntu
in this case. After that, execute the following command to get Bitcoin knots's source code and place it in a folder inside the home directory. A folder named "bitcoin" will automatically be created.
git clone https://github.com/bitcoinknots/bitcoin.git
Go inside that folder. This is needed for the installation of Knots.
cd bitcoin
Due to the git-flow of Bitcoin Core (and for Knots since Knots is rebased on Core) you could argue that everything inside the master
branch is correct and functional. The release process of Bitcoin Core cuts off the master
branch at a certain predefined date. Everything on that branch at that momen, will make it into the release. Everything that is added to the branch afterward, will be included in the new release.
If you'd like to specify a certain release (which is recommended), you can execute the command below. At the moment v25.1 is the latest version of Bitcoin Knots.
git checkout v29.1.knots20250903
Compiling Bitcoin Knots
Finish it off by compiling Bitcoin Knots.
With the command below we configure the installation process of Bitcoin Knots. It is possible to run Bitcoin Knots without wallet functionality for example, and purely use it as a backend for other wallet software. If you're sure you WON'T be using the wallet functionality, then run:
cmake -B build -DENABLE_WALLET=OFF -DBUILD_GUI=OFF
The above command has an additional flag -DENABLE_WALLET=OFF
. If you're not sure whether you need the wallet functionality, run the command below.
Did you configure Bitcoin Knots without the wallet functionality but still want to add it, execute all commands starting with the one below and work your way down.
Do you want to know about any other option in regards to the installation of Bitcoin Knots, run ./configure --help
.
cmake -B build -DENABLE_WALLET=ON -DBUILD_GUI=OFF
A slightly quicker configuration without tests and benchmarks:
cmake -B build -DBUILD_GUI=OFF -DBUILD_TESTS=OFF
After hitting enter for the following command, you can go do something else. From experience we can tell this step will take around one and a half hour.
cmake --build build -j $(nproc)
Finalize the installation process with the following:
cmake --install build
That's it for installing Bitcoin Knots! You can go back to your home directory with cd ~
.