Prepare the system

Update the system and install dependencies before compiling Bitcoin Core.

Update the system

sudo apt update && sudo apt upgrade -y

Disable SSH Password Login

In the SSH configuration, make sure password login is disabled (PasswordAuthentication no)

sudo cat /etc/ssh/sshd_config | grep PasswordAuthentication

Setup a firewall

We need to setup a firewall to restrict inbound traffic for our node.

First we install it:

sudo apt install ufw

By default ufw denies all incoming traffic so we must allow inbound SSH traffic before we enable it:

sudo ufw allow 22/tcp

Now we can enable the firewall:

sudo ufw enable

We can check the status with those commands:

sudo ufw status

Install Tor

Install Tor:

Add your user:

You must log out and log back in for the changes to take effect.

Finally we can enable Tor at boot and start it:

Install Bitcoin Core dependencies

The following packages will be needed to install Bitcoin Core:

Install Node.js

This is only required if you plan to install BTC RPC Explorer.

The steps to install Node.js 23 are detailed here.

Install curl:

Download the setup script:

Run it:

Install node:

Verify the installation:

And also update npm to the latest version:

Install Rust and Cargo

This will be needed by the Electrum server if you plan on installing it.

Install dependencies:

Install Rust and Cargo:

Last updated

Was this helpful?