This guide assumes you’ve followed my other guide, where you compile Bitcoin Core from source . These steps will allow you to upgrade a running Bitcoin Core node to the latest version.
Stop current Bitcoin Core node#
First, stop the running version of the Bitcoin Core daemon.
$ su - bitcoin
$ bitcoin-cli stop
Bitcoin server stopping
Check to make sure your node is stopped.
$ bitcoin-cli status
error: Could not connect to the server 127.0.0.1:8332
Once that’s done, download & compile the new version.
Install the latest version of Bitcoin Core#
To do so, you can follow all other steps to self-compile Bitcoin Core .
In those steps, there’s a part where you do a git checkout to a specific version. Change that to refer to the latest release. In this example, we’ll upgrade to 0.18.0.
$ git clone https://github.com/bitcoin/bitcoin.git
$ cd bitcoin
$ git checkout v0.18.0
And compile Bitcoin Core using the same steps as before.
$ ./autogen.sh
$ ./configure
$ make -j $(nproc)
Update: as of Bitcoin Core 29.0 the build system moved from Autotools to CMake, so ./autogen.sh and ./configure no longer exist. For recent releases, configure and compile like this instead.
$ cmake -B build
$ cmake --build build -j $(nproc)
The binaries (bitcoind, bitcoin-cli) then live under build/bin/.
Once done, you have the latest version of Bitcoin Core.
Start the Bitcoin Core daemon#
Start it again as normal;
$ bitcoind --version
Bitcoin Core Daemon version v0.18.0
$ bitcoind -daemon
Bitcoin server starting
Check the logs to make sure everything is OK.
$ tail -f ~/.bitcoin/debug.log
Bitcoin Core version v0.18.0 (release build)
Assuming ancestors of block 0000000000000000000f1c54590ee18d15ec70e68c8cd4cfbadb1b4f11697eee have valid signatures.
Setting nMinimumChainWork=0000000000000000000000000000000000000000051dc8b82f450202ecb3d471
Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
Using RdSeed as additional entropy source
Using RdRand as an additional entropy source
Default data directory /home/bitcoin/.bitcoin
...
And you’re now running the latest version.