Installation
Time: almost one and a half hour (of which 95% waiting while running the make
command)
This part of the guide will take a while, so be prepared. The goal is to compile Bitcoin Core itself. What will you be doing?
- Install dependencies, in order to compile Bitcoin Core you'll need some extra software.
- Get the source code, through the use of Git you can get the latest source code.
- Compile Bitcoin Core
Dependencies
Execute the command below to install all required dependencies. Dependencies are software package other software depends on. Bitcoin Core also depends on other software for its compilation.
sudo apt install git automake autoconf autotools-dev build-essential cmake make pkg-config protobuf-compiler libminiupnpc-dev libprotobuf-dev libdb++-dev libzmq3-dev libsqlite3-dev libboost-thread-dev libboost-test-dev libboost-all-dev libevent-dev libtool libssl-dev libboost-system-dev libboost-filesystem-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 Core'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/bitcoin/bitcoin
Go inside that folder. This is needed for the installation of Core.
cd bitcoin
Due to the git-flow of Bitcoin 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 v28.0 is the latest version of Bitcoin Core.
git checkout v28.0
Compiling Bitcoin Core
Finish it off by compiling Bitcoin Core.
./autogen.sh
With the command below we configure the installation process of Bitcoin Core. It is possible to run Bitcoin Core 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:
./configure --without-gui --disable-wallet
The above command has an additional flag --disable-wallet
. If you're not sure whether you need the wallet functionality, run the command below.
Did you configure Bitcoin Core 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 Core, run ./configure --help
.
./configure --without-gui
A slightly quicker configuration without dependency tracking, tests and benchmarks:
./configure --without-gui --disable-maintainer-mode --disable-dependency-tracking --disable-tests --disable-gui-tests --disable-bench
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.
make -j $(nproc)
If you'd like to run some test to check whether everything is alright, run make check
. This is optional and can take up to fifteen minutes.
Finalize the installation process with the following:
sudo make install
That's it for installing Bitcoin Core! You can go back to your home directory with cd ~
.