Time: 1.5h

Before you get started, make sure your Pi is up-to-date with sudo apt update and sudo apt upgrade -y.

Go to the application directory.

cd ~/bitcoin

Update the repository with the latest changes via Git.

git fetch --all

Show the latest version/tag/release.

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

Retrieve the changes from the latest release.

git checkout -f <OUTPUT OF PREVIOUS STEP> #example: v25.0

Be sure to start from a clean slate. It could prevent some errors later on.

make clean

Rebuild bitcoin core based on the version of the source code you just checked out. The addition of -j $(nproc) uses all the cores of the CPU and would make the build faster than it would be without this addition.

make -j $(nproc)

The build will finish in about an hour. Nice time for a beer or cup of coffee!

Stop services that depend on Bitcoin Core, such as btc-rpc-explorer, LND or Electrum. You know best which ones you have running. From experience, not turning off services that depend on Core doesn't really matter. The services will temporarily not receive data from during Core's update, after which it will resume once Core is turned back on.

Stop the bitcoind service:

sudo systemctl stop bitcoind

Now install the software. This will take up to 5 minutes.

sudo make install

Start the service bitcoin. The service will have started fairly quickly but the blockchain may need to download a few more blocks depending on how long the service was stopped.

sudo systemctl start bitcoind

Check the current version of bitcoin core.

bitcoin-cli --version

The output will look like Bitcoin Core RPC client v25.0 and Core is now updated!

Start the other services you may have disabled. Note that when you start LND, unlocking LND can only be done after bitcoin's blockchain has been resynchronized. Check with tail -f -n 200 .bitcoin/debug.log how far along it is. Services start this way:

sudo systemctl start bitcoind