How to easily host a bitcoin node on a linux VPS

This article is a step by step guide on hosting your own bitcoin node on a vps (virtual private server)

Setting up a bitcoin node on a vps server

Step 1.) Add Bitcoin Repository

Login to your linux VPS server via SSH and add the bitcoin package repository by running the following command and accept any prompts asking you to continue adding this repository. This is required to install Bitcoin Core.

sudo apt-add-repository ppa:bitcoin/bitcoin

Step 2.) Install Bitcoin Core

Next, install bitcoin by running the following commands, which will update your package list and take care of installing bitcoin core on the target vps server.

sudo apt-get update
sudo apt-get install bitcoind

Step 3.) Choose your options

As we all know, the bitcoin blockchain is growing quite large, for this reason you may want to limit the amount of space that the chain will take up on your VPS disk. This can be done by creating a file at  $HOME/.bitcoin/ named bitcoin.conf, this file will act as the container for our options. Our firsts option will be to limit the block chain, enter the  following inside of  bitcoin.conf  this is the amount of storage you want to allow the bitcoin chain to take up in MB.

prune=1024

You can use any amount you wish as long as it is over 550 MB, which is the minimum amount required in order for for the node to function. 


Step 4.) Start the bitcoin core service

All you need to do now is start the bitcoin core service (daemon) on your vps server by running the following command

bitcoind -daemon

And since we will want this node to run all the time, we are going to start this automatically at boot time, so open up your Crontab utility by typing the following command

crontab -e

And at the bottom of this file simply paste 

@reboot bitcoind -daemon

Save and close the file, and that's it, you have now set up your first bitcoin node on a linux-based virtual private server!

 

 

  • Bitcoin node on vps, how to setup a bitcoin node, bitcoin core linux, bitcoin vps
  • 23 Users Found This Useful
Was this answer helpful?

Related Articles

How to host a Bitcoin Cash node on a linux vps

This article is a step by step guide on hosting your own bitcoin cash node on a linux based vps...