Can you provide more information on Contabo’s Bitcoin Node image?
Contabo’s Bitcoin Node image is based on the Bitcoin Core v25.0 (https://bitcoincore.org/bin/).
The Bitcoin Image does not come with synchronized chain data, the sync starts after the image is installed, this can take up to 12-48h depending on the available nodes.
What is the data path structure of Contabo’s Bitcoin Node image?
- Chain data: /var/lib/bitcoind
- bitcoind config: /etc/bitcoin/bitcoin.conf
- bitcoin-cli config: /home/bitcoin/.bitcoin/bitcoin.conf
How do I switch to the Bitcoin user?
To access the bitcoin-cli command, you should switch to the bitcoin user. You can do this with the following command:
sudo -u bitcoin -i
How do I find the P2P network info:
You can run the following command:
bitcoin-cli getnetworkinfo
You should get a response like this:
"networkactive": true, "connections": 13, "connections_in": 3, "connections_out": 10,
How do I find the Blockchain (sync status) info:
You can run the following command:
bitcoin-cli getblockchaininfo
You should get a response like this:
{
"chain": "main",
"blocks": 170260, <-- Highest synced block
"headers": 813630, <-- Highest block on the network
"bestblockhash": "0000000000000049ec54c7c6df79fce11e724b4b56103e005e03fa8e8c2a4a09",
"difficulty": 1496978.595025569,
"time": 1331249860,
"mediantime": 1331245089,
"verificationprogress": 0.002915741002688988, <---- 0.29% synced
"initialblockdownload": true,
"chainwork": "00000000000000000000000000000000000000000000000df7e38ad4228191c1",
"size_on_disk": 1234406989,
"pruned": false,
"warnings": ""
}To note the syncing can take up to 48h, depending on available nodes.
Also, the field verificationprogress never reaches 1.00 even at fully synced it will be around 0.9999.
How do I check if the Bitcoin Node is running?
You can run the following command:
systemctl status bitcoind.service
How do I restart the bitcoind server:
You can run the following command:
systemctl restart bitcoind.service
How do I read logs?
You can run the following command:
tail -n 100 /var/lib/bitcoind/debug.log
How do I edit the bitcoind config file:
You can run the following command:
nano /etc/bitcoin/bitcoin.conf
To note, you will need to restart your node to apply new configurations.
How do I access the data directory of bitcoin service:
You can run the following command:
/var/lib/bitcoind
How do activate the firewall:
You can run the following command:
sudo apt install ufw sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow ssh # If you're using SSH sudo ufw allow 8333 # Allows Bitcoin network connections sudo ufw enable
Extra rules:
sudo ufw allow 8332 # For JSON-RPC for remote wallet sudo ufw allow 28332 # Zero MQ for listening sudo ufw allow 28333 # Zero MQ for listening sudo ufw allow 8443 # Lightning Terminal