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 instructions for setting up a full node on Feral Hosting, but should work just fine on a different seedbox provider or a VPS, dedicated server or AWS instance.
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.
- Provision a seedbox from Feral Hosting.
- Get your login details and connect to your server - username, password, hostname/address.
- Log into the seedbox.
- On Linux/OS X, use a terminal application and run "ssh [email protected]"
- On Windows10, install SSH functionality to the Windows 10 PowerShell (Settings, Apps, Manage optional features, Add a feature, OpenSSH Client, wait, then reboot)
- Create and enter a "bitcoin" directory to hold things.
- mkdir bitcoin
- cd bitcoin
- Pull down the Bitcoin binaries with wget (check the current link at https://bitcoincore.org/en/download/)
- Extract the binaries
- tar xf bitcoin-0.17.1-x86_64-linux-gnu.tar.gz
- Run the Bitcoin daemon for the first time.
- ./bitcoin-0.17.1/bin/bitcoind -daemon
- You'll be given credentials for rpcuser and rpcpassword. Copy them, then open bitcoin.conf with nano.
- nano ~/.bitcoin/bitcoin.conf
- Paste the credentials into nano - Command-V if on OS X, Ctrl-V if on Linux, right-click if on Windows.
- Hit Ctrl+X once, then type "Y", then hit enter to save the file in nano.
- Change the permissions to the conf file you just created in order to help secure it.
- chmod 400 ~/.bitcoin/bitcoin.conf
- Finally, start the Bitcoin daemon again.
- ./bin/bitcoind -daemon
It should simply say "Bitcoin server starting" and then fork off to the background. You're done!
- If you want to see the node working, you can see the blockchain getting bigger
- ./bitcoin-0.17.1/bin/bitcoin-cli getblockcount
- Once the block count reach about 570,000 (as of January 2019) your node is fully synced up.
- Check connectivity your node
- Visit https://bitnodes.earn.com/ 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.
If you're having issues, here are some common problems and solutions.
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.
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.
- sudo iptables -I INPUT -p tcp --dport 8333 -j ACCEPT
- sudo service iptables save
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, let's say from bitcoin-0.17.0 to bitcoin-0.17.1:
- Log into your seedbox
- Change to the "bitcoin" directory
- cd bitcoin
- Stop Bitcoin
- ./bitcoin-0.17.0/bin/bitcoin-cli stop
- Remove the old version
- rm -r bitcoin-0.17.0
- rm bitcoin-0.17.0-linux64.tar.gz
- Download the new version
- Extract the new version
- tar xf bitcoin-0.17.1-x86_64-linux-gnu.tar.gz
- Run the new version
- ./bitcoin-0.17.1/bin/bitcoind -daemon
It should simply say "Bitcoin server starting" and then fork off to the background. You're done (again)!