How to install & run a full BitcoinCash node on a cheap hosted Ubuntu 16.04 /18.04 VPS without getting banned!

Chris J Terry
4 min readJul 17, 2019

--

Running a BitcoinCash full node is a great way to give back to the crypto community. While you can run at home the best option is to have your instance running in a data center. Nothing fancy is required and in fact you can get the job done with a cheap Virtual Private Server for as little as $30* a year on a shared hosting platform.

That hard part is keeping it running.

The minute the service provider sees the bitcoin daemon running they kill it. It’s unfortunate. There is nothing nefarious or illegal about running a node at all. This seems to be a hold-over from the old days when people would mine and consume all the hardware resources. With the migration to ASIC miners no one can mine BTC or BCH using a CPU but none the less they all ban the process.

Here is the work around.

Prepare an Ubuntu 16.04 or 18.04 instance make sure it is updated and upgraded. Secure the install however make sure ports 8332 & 8333 are open for the node to talk to the network.

We will install the latest version of Bitcoin Cash ABC (there are several Bitcoin Cash clients: ABC, Unlimited and the new BCHD). ABC is generally accepted as the “default”.

Packages Install:

sudo apt-get install -y software-properties-common

sudo add-apt-repository ppa:bitcoin-abc/ppa

sudo apt-get update

sudo apt-get -y install bitcoind

Next we need to prepare the bitcoin.conf file (yes, BitcoinCash uses all the naming conventions from Bitcoin). When you first “run” the program it will create a hidden directory called .bitcoin in the user’s root directory, so we are going to do that first and place our file there:

mkdir .bitcoin

nano .bitcoin/bitcoin.conf (add these lines):

server=1
daemon=1
rpcuser=YOURUSERNAME
rpcpassword=YOURPASSWORD

Next — and this is very important install CPULIMIT:

sudo apt-get install -y cpulimit

The BitcoinCash program is /usr/bin/bitcoind

We are going to copy the program with a new name, I use “mybackup” so for example:

cp /usr/bin/bitcoind /usr/bin/mybackup

When we are ready (WE ARE NOT YET) we will simply start the program with “testprocess” normally /usr/bin is part of the default path, so super easy to run.

One last step. Get this command ready (DON’T RUN IT YET), this is the CPU limit command that will keep the bitcoin (mybackup) throttled to 30%. When you fire up the node it will run for DAYS synchronizing the blockchain. Using nohup will allow to exit your SSH connection:

nohup cpulimit -e mybackup-l 30 &

OK here we go! To start BitcoinCash type the commands in this order:

testprocesss

nohup cpulimit -e mybackup-l 30 &

You should now have begun the BitcoinCash node program, cloaked as “mybackup” avoiding hosting provider bots that kill any process with the words bitcoin. Next with a 30% CPU limit (hopefully) will avoided getting the process killed for consuming too many resources. It is one thing to run the cpu at 100% for a few minutes but 3–4 days gets their attention. This 30% number seems to be a good balance and does not slow down the process.

Final note, bitcoin-cli and other commands still work as published — you do not call “mybackup”. For example to see the sync process LIVE you still would enter this command:

tail -f ~/.bitcoin/debug.log

Or:

bitcoin-cli help
bitcoin-cli -getinfo
bitcoin-cli getblockchaininfo
bitcoin-cli getnetworkinfo
bitcoin-cli getwalletinfo
bitcoin-cli getpeerinfo

Ok, go fire up those nodes and Good Luck.

There are a ton of resources out there on how to run, tune, update, and configure to your heart’s desire your BitcoinCash node. Just ask Google.

  • There is an outfit called “Lowendbox” with really cheap VPS offers (I have nothing to do with them) great for test projects etc, however BEWARE — NEVER put any mission critical data out there on a $30 a year server.
  • The node needs very little resources 1 core and 1GB of memory will work but the blockchain does need lot of drive space — 200GB (at least).

--

--