Skip to content

Instantly share code, notes, and snippets.

@Zorlin
Last active July 5, 2023 09:25
Show Gist options
  • Save Zorlin/9e202138887eadf07ca9 to your computer and use it in GitHub Desktop.
Save Zorlin/9e202138887eadf07ca9 to your computer and use it in GitHub Desktop.
Running Bitcoin Classic full nodes on a seedbox

Last updated 4:30am 2016-02-11 GMT.

Changes:

  • Update to first official Classic release
  • Added upgrade instructions

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

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)
  • Hudson Valley Host Plan4 (100GB), $7/month (25% off first month with code 25offfirst)
  • BaconSeed Pork Rind (125GB), €8/month
  • Big Slice Box's Baby Box 130 (130GB), €12/month
  • NOC Room - Promo Plan (200GB HD), $14.99/month
  • Whatbox Flex (360GB), $15/month Does NOT work.

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. Look for a PuTTy tutorial if you have trouble.
  1. Create and enter a "bitcoin" directory to hold things.
  • mkdir bitcoin
  • cd bitcoin
  1. Pull down the Bitcoin Classic binaries with wget
  1. Extract the Classic binaries
  • tar xf bitcoin-0.11.2-linux64.tar.gz
  1. Run the Classic Bitcoin daemon for the first time.
  • ./bitcoin-0.11.2/bin/bitcoind --daemon
  1. You'll be given credentials for rpcuser and rpcpassword. Copy them, then open bitcoin.conf with nano.
  • nano ~/.bitcoin/bitcoin.conf
  1. Paste the credentials into nano - Command-V if on OS X, Ctrl-V if on Linux, right-click if on Windows.
  2. Hit Ctrl+X once, then type "Y", then hit enter to save the file in nano.
  3. Change the permissions to the conf file you just created in order to help secure it.
  • chmod 400 ~/.bitcoin/bitcoin.conf
  1. Finally, start the Bitcoin Classic daemon again.
  • ./bitcoin-0.11.2/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.
  2. du -h ~/.bitcoin/
  3. Once the total in the bottom left hits ~64GB (as of today) your node is fully synced up.
  4. Check connectivity your node
  5. Visit https://bitnodes.21.co/nodes/ and go to the bottom left, and enter your seedbox address. Click "check node".
  6. 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 Classic beta 2 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
  3. cd bitcoin
  4. Stop Bitcoin
  5. ./bitcoin-0.11.2/bin/bitcoin-cli stop
  6. Remove the old version
  7. rm -r bitcoin-0.11.2
  8. rm bitcoin-0.11.2-linux64.tar.gz
  9. Download the new version
  10. wget https://github.com/bitcoinclassic/bitcoinclassic/releases/download/v0.11.2.cl1/bitcoin-0.11.2-linux64.tar.gz
  11. Extract the new version
  12. tar xf bitcoin-0.11.2-linux64.tar.gz
  13. Run the new version
  14. ./bitcoin-0.11.2/bin/bitcoind --daemon

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

@droark
Copy link

droark commented Feb 8, 2016

FYI, Whatbox specifically bans "mining applications". Whether or not that includes somebody just running a full node, I don't know.

@Zorlin
Copy link
Author

Zorlin commented Feb 9, 2016

@droark I checked with Whatbox. Here's what they said:

that's fine if it isn't mining. Might want to torrent the blockchain to minimize its initial resource usage.

However...

I tried running a node on Whatbox and ran into issues. I can no longer recommend them for this purpose.

@jeffrade
Copy link

jeffrade commented Jul 6, 2016

If you are getting iptables: unrecognized service after trying sudo service iptables save, simply run the following commands:

sudo apt-get install iptables-persistent (will prompt you to save current config - if confident go ahead and do so)
sudo invoke-rc.d iptables-persistent save (redundant, but any future changes you will have to run this)

@zander
Copy link

zander commented Jul 6, 2016

If anyone is able to create a merge request of this nice howto to the bitcoin classic documentation repo, that would likely be accepted with no questions asked :)

https://github.com/bitcoinclassic/documentation/tree/master/howto

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