Update Bitcoin Core

Update Bitcoin Core to newer version

For more details and context on this process, refer to the installation step.

Verify what your current version is:

bitcoind --version

Fetch the latest changes:

cd ~/bitcoin
git fetch --all

Show the latest version tags:

git describe --tags `git rev-list --tags --max-count=20`

Switch to the latest stable version:

git checkout -f <version-tag>

Clear files and outputs from the previous build process:

make clean

Now create the configuration files:

./autogen.sh

Use one of the following two commands to apply the configuration files:

./configure --without-gui # OPTION 1: Wallet functionalty enabled
./configure --without-gui --disable-wallet # OPTION 2: Wallet functionality disabled

Compile the source code:

make -j $(nproc)

Once the compilation is done, we stop Electrs and bitcoind:

sudo systemctl stop electrs.service
sudo systemctl stop bitcoind.service

Wait until both programs have exited cleanly. You can monitor the logs for confirmation.

Now we can update the binaries system-wide:

sudo make install

Finally we can restart bitcoind and Electrs:

sudo systemctl start bitcoind.service
sudo systemctl start electrs.service

You can check your new version with:

bitcoind --version

Last updated

Was this helpful?