Skip to content

Instantly share code, notes, and snippets.

@Zorlin
Last active August 19, 2018 00:08
Show Gist options
  • Save Zorlin/6afb4bbb0936c266ef48aee1fe0efbd9 to your computer and use it in GitHub Desktop.
Save Zorlin/6afb4bbb0936c266ef48aee1fe0efbd9 to your computer and use it in GitHub Desktop.
Running Bitcoin Unlimited full nodes on inexpensive machines (eg: seedboxes and VPS)

Last updated 1:05am 2017-03-24 GMT

Changes:

  • Update to latest BU version
  • Improve upgrade guide

Introduction

Running a full node can help the Bitcoin network significantly.

There's lots of benefits to running your own node and most people can run one at home.

For those who can't, or for those that want to run an extra one, the options are usually limited to virtual private servers (VPS) or dedicated servers (expensive).

Enter seedboxes - usually inexpensive, but provide plenty of disk space and resources to run a full node. This gist provides a list of seedbox providers that you can run a full node on, confirmed and unconfirmed. It also provides instructions for setting up a full node as a regular user on these services. The instructions work on Feral Hosting, but should work just fine on a different seedbox provider or a VPS, dedicated server or AWS instance.

Disclaimer

Security on seedboxes, as with most shared Linux boxes, is usually adequate for most users, but please note that I recommend against using a seedbox with wallets you care about. You can, and most of the time you won't run into issues, but in general you should never put your wallet on a server that other people have access to. Use at your own risk!

Also note that if someone else is running a Bitcoin daemon on the same box as you, you won't be able to run your full node on the default port (8333). You can get around this by setting a custom port. However, having two nodes running on the same box is not particularly useful, as running your node on a non-standard port will greatly limit how many other clients will connect to you.

Recommended providers (will work)

These providers have been confirmed to work with the instructions below.

  • Feral Hosting's Helium plan (1TB), £10/month
  • Hudson Valley Host Plan4 (100GB), $7/month (25% off first month with code 25offfirst)
  • DigitalOcean $10 Droplet (30GB), $10/month

Please contact me if you can add to the list or confirm whether a provider works with this gist.

Unconfirmed providers (should work)

These providers should work, but have not been tested yet.

  • Kimsufi KS-1 (500GB), $5/month (dedicated server, not seedbox, so may require more setup)
  • BaconSeed Pork Rind (125GB), €8/month
  • Big Slice Box's Baby Box 130 (130GB), €12/month
  • DigitalOcean $5 Droplet (20GB), $5/month ** Note, this has issues with bitcoind running out of space

Please contact me if you can add to the list or confirm whether a provider works with this gist.

Instructions

  1. Provision a seedbox from a provider of your choice (I use Feral Hosting).
  2. Get your login details and connect to your server - username, password, hostname/address.
  3. Log into the seedbox.
  • On Linux/OS X, use a terminal application and run "ssh [email protected]"
  • On Windows, download and open PuTTy and connect to yourserver.com, then enter your username and password. Look for a PuTTy tutorial if you have trouble.
  1. Create and enter a "bitcoin" directory to hold things, and the ".bitcoin" directory to hold state and settings.
  • mkdir bitcoin .bitcoin
  • cd bitcoin
  1. If your chosen box has less than 150GB of free disk space, turn on pruning. The prune setting tells Bitcoin how much disk space, in MB, is okay to use. It must be above 550. A prune setting of 8192 takes up about 8GB of disk space.
  • echo "prune=8192" > ~/.bitcoin/bitcoin.conf
  1. Pull down the Bitcoin Unlimited binaries with wget
  1. Extract the Bitcoin Unlimited binaries
  • tar xvf bitcoinUnlimited-1.0.1.3-linux64.tar.gz
  1. Run the Bitcoin Unlimited daemon for the first time.
  • ./bitcoinUnlimited-1.0.1/bin/bitcoind --daemon

It should simply say "Bitcoin server starting" and then fork off to the background. You're done!

Check out your new node

  1. If you want to see the node working, you can run the "disk use" command (du) and see the blockchain getting bigger on the disk.
  • du -h ~/.bitcoin/
  1. Use the bitcoin CLI tools to check on your new node as it syncs. Note that the "blocks" item tells you the last block your node has synced. It should steadily grow until fully synced, then slowly grow with the network.
  • cd ~/bitcoin
  • ./bitcoinUnlimited-1.0.1/bin/bitcoin-cli getinfo
  1. Check connectivity your node
  • Visit https://bitnodes.21.co/nodes/ and go to the bottom left, and enter your seedbox address. Click "check node".
  • If your node is up and reachable, a green bar with your node's IP should pop up.

Troubleshooting

If you're having issues, here are some common problems and solutions.

Checking for existing daemons

You can check for other users running Bitcoin daemons on your box by running this command

  • netstat -anp | grep LISTEN | grep 8333

If that command returns some results, you should ask to be moved to a different box.

Unreachable

If your node is showing as "Unreachable" on the Bitnodes check node tool, you may not have port 8333 open.

To open it, use iptables or equivalent.

  1. sudo iptables -I INPUT -p tcp --dport 8333 -j ACCEPT
  2. sudo service iptables save

Upgrading or changing versions

If you downloaded Bitcoin Unlimited during the testing period, or even Bitcoin Core, you might want to upgrade to the first official release. Changing versions is easy, and in most cases you'll be able to reuse your existing blockchain. Your folders/files may be named differently, so watch for that and change the commands appropriately. Here's how to upgrade:

  1. Log into your seedbox
  2. Change to the "bitcoin" directory
  • cd bitcoin
  1. Stop Bitcoin
  • ./bitcoinUnlimited-1.0.1/bin/bitcoin-cli stop
  1. Remove the old version
  • rm -r bitcoinUnlimited-1.0.1/
  • rm bitcoinUnlimited-1.0.1.1-linux64.tar.gz
  1. Download the new version
  1. Extract the new version
  • tar xvf bitcoinUnlimited-1.0.1.3-linux64.tar.gz
  1. Run the new version
  • ./bitcoinUnlimited-1.0.1/bin/bitcoind --daemon

It should simply say "Bitcoin server starting" and then fork off to the background. You're done (again)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment