Setting up a headless Bitcoin node on an Ubuntu server involves a series of steps. Below is a simplified guide on how to do this. Please note that the specific steps may vary depending on the version of Bitcoin Core and Ubuntu you are using, so be sure to check the official documentation for the most up-to-date information.
1. Connect to Your Ubuntu Server
Use SSH or your preferred method to connect to your Ubuntu server.
ssh username@your_server_ip
Replace username
with your server username and your_server_ip
with your server's IP address.
2. Update System Packages
Make sure your system is up to date:
sudo apt update
sudo apt upgrade
3. Download and Install Bitcoin Core
Download the Bitcoin Core binaries from the official website. You may want to check for the latest version here.
wget https://bitcoin.org/bin/bitcoin-core-<version>/bitcoin-<version>-x86_64-linux-gnu.tar.gz
Replace <version>
with the actual version number.
Extract the archive:
tar -xvf bitcoin-<version>-x86_64-linux-gnu.tar.gz
Move the Bitcoin binaries to a directory in your system's PATH (e.g., /usr/local/bin/
):
sudo mv bitcoin-<version>/bin/* /usr/local/bin/
4. Configure Bitcoin Core
Create a Bitcoin configuration file (bitcoin.conf
). You can use a basic configuration for a testnet node:
nano ~/.bitcoin/bitcoin.conf
Add the following lines:
testnet=1
rpcuser=your_username
rpcpassword=your_password
server=1
listen=1
daemon=1
Replace your_username
and your_password
with your desired RPC username and password.
5. Start Bitcoin Core
Start the Bitcoin Core daemon:
bitcoind
6. Monitor Node Synchronization
You can check the synchronization status by using the following command:
bitcoin-cli getblockchaininfo
Wait until the blocks
field matches the latest block on the Bitcoin testnet.
Your headless Bitcoin node on the Ubuntu server should now be up and running. Keep in mind that the synchronization process may take some time, depending on your server's resources and network connection.