How to use Bitcoind or Bitcoincore in Ubuntu?November 9, 2017
Install Bitcoin Core in Ubuntu:
sudo apt-get install bitcoin
After installation, you can be able to run Bitcoin Core using:
And for accessing the bitcoin server, you can use bitcoin-cli Client.
E.g: bitcoin-cli getbalance, bitcoin-cli help
The default directory for Bitcoin Core data is ~/.bitcoin.
If you want to create a config file then the default path is:
Then add below details into the file.
server=1 txindex=1 rpchost=yourip rpcport=yourport testnet=1 #If you want to use testnets
The default port for testnet is 18332 and for mainnet is 8332.
It will take a lot of time to download all the blocks to your server. It will be better if you take a separate volume and put the .bitcoin folder there. And inside bitcoin.conf mention the datadir=/yourpath/.
For getting the current block count type:
I hope this article helped you. Please left me a comment, so that i can get back to you.