Prepare the system
Update the system and install dependencies before compiling Bitcoin Core.
Update the system
sudo apt update && sudo apt upgrade -yDisable SSH Password Login
In the SSH configuration, make sure password login is disabled (PasswordAuthentication no)
sudo cat /etc/ssh/sshd_config | grep PasswordAuthenticationSetup a firewall
We need to setup a firewall to restrict inbound traffic for our node.
First we install it:
sudo apt install ufwBy default ufw denies all incoming traffic so we must allow inbound SSH traffic before we enable it:
sudo ufw allow 22/tcpNow we can enable the firewall:
sudo ufw enableWe can check the status with those commands:
sudo ufw statussudo ufw status verboseInstall Tor
Install Tor:
sudo apt install torAdd your user:
sudo usermod -a -G debian-tor your-userYou must log out and log back in for the changes to take effect.
Finally we can enable Tor at boot and start it:
sudo systemctl enable torsudo systemctl start torInstall Bitcoin Core dependencies
The following packages will be needed to install Bitcoin Core:
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-devInstall Node.js
The steps to install Node.js 23 are detailed here.
Install curl:
sudo apt install curlDownload the setup script:
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.shRun it:
sudo -E bash nodesource_setup.shInstall node:
sudo apt install nodejsVerify the installation:
node -vAnd also update npm to the latest version:
sudo npm install -g npm@latestInstall Rust and Cargo
Install dependencies:
sudo apt install -y clang cmakeInstall Rust and Cargo:
curl https://sh.rustup.rs -sSf | shLast updated
Was this helpful?