How to setup a Bitcoin node

This tutorial describes how to setup a new Bitcoin node on Linux server - this node will be used as relay node in the Bitcoin network and it’s not recommended to store anything in it’s wallet.

  • Download bitcoin from official website: https://bitcoin.org/en/download

  • At the moment the most recent version can be downloaded using this direct link: https://bitcoin.org/bin/0.9.1/bitcoin-0.9.1-linux.tar.gz">https://bitcoin.org/bin/0.9.1/bitcoin-0.9.1-linux.tar.gz

  • Extract archive:

tar xf bitcoin-0.9.1-linux.tar.gz

Create bitcoin configuration file:

mkdir ~/.bitcoin

Create new file in ~/.bitcoin called bitcoin.conf with following contents (you should setup different password):

server=1
rpcuser=bitcoinrpc
rpcpassword=FeMaf9V83mxp2906JHdnwed3ys056dFBqkwJ8bffGe4JsvrN
rpcconnect=127.0.0.1

Start bitcoin daemon

~/bitcoin-0.9.1-linux/bin/64/bitcoind -daemon

From this moment initial node bootstrapping begins - you’ll see a lot of server resources being used, especially disk and CPU

After few moments you can check if your node is downloading blocks from the network (bootstrapping), use this command:

~/bitcoin-0.9.1-linux/bin/64/bitcoin-cli getinfo

You should see similar output:

{   
    "version" : 90100,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 129435,
    "timeoffset" : 3,
    "connections" : 12,
    "proxy" : "",
    "difficulty" : 567269.53016242,
    "testnet" : false,
    "keypoololdest" : 1400613368,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}

This is how fully synchronized node looks at the moment:

{   
    "version" : 90100,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 302393,
    "timeoffset" : 3,
    "connections" : 57,
    "proxy" : "",
    "difficulty" : 8853416309.12779999,
    "testnet" : false,
    "keypoololdest" : 1400613368,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}

You should also see a lot of resources being used on the server while initial synchronization is happening. Depending on your hardware, especially CPU and disk, initial synchronization might take even up to 24 hours. After the node finishes bootstrapping, it’s not using as much resources.

Additional step: Depending on your firewall configuration you might need to add following exceptions to the iptables:

iptables -A INPUT -p tcp --dport 8333 -j ACCEPT
iptables -A INPUT -p udp --dport 8333 -j ACCEPT