I previously wrote a guide on how to run your own node eCash node on a local machine. What I didn’t realize was that this can be rather inconvenient since it would mean keeping your computer on 24 hours a day while also eating up bandwidth. So here’s a guide on how to run a node using a virtual private server (VPS).
Step 1: Find a cheap and reliable VPS provider. For a general comparison, I’m paying $12/month for 6 CPU cores, 16 GB RAM, 400 GB SSD, 32 TB of traffic. A quick online search shows there might be even cheaper options.
When signing up, I chose Ubuntu 22.04 as my operating system. Note your assigned IP address and root password. Save these somewhere as they will be needed to set up your node.
Step 2: Open your command line interface (CLI). It’s a program called “Terminal” on Macbook. Enter the following command except you need to enter the IP address you saved above in place of the xx’s:
Press enter (after every command, press enter) and it should prompt you for the password you saved earlier.
Step 3: Next create a non-root user. The general idea is that the root can change anything for any user, and users can also make changes for themselves.
Replace “name” with whatever username you prefer. Remember to replace “name” with your chosen name in the steps below.
usermod -aG sudo name
The above command adds your user to a group that is allowed to do super-user (admin) things.
Now log in as your new user:
If you are having problems, you may still be logged on as the root user. Try ending the session and logging on again but using ssh email@example.com
Next time you log into the server, you will use
Enter name’s password
/root$ cd /home/name
That puts you in your user directory
Step 5: Now we’re going to follow the steps to install Bitcoin ABC from the debian package.
Note that the version number will have to be updated when version 0.26.0 is released. Same for the next command.
tar xzvf bitcoin-abc-0.25.12-x86_64-linux-gnu.tar.gz
Step 6: Now that we’ve installed Bitcoin ABC, it’s time for the initial block download (IBD).
At this point the IBD has started. Running it in daemon mode runs the IBD in the background. The drawback is the terminal won’t display the progress, but the IBD will not be interrupted even if the session is terminated.
You can check on the progress by logging in again. Make sure to login as your name and not the root user, then enter the following command:
My IBD took ~10 hours. Come back for step 7 when the IBD has completed.
Step 7: You will likely have to login again using:
If IBD has completed, you should see something like this with the blocks and headers at the same chain tip:
Now your eCash node is up and running, but in order to run an Avalanche, you need to obtain your avaproof and the avamasterkey. Instructions on how to do that can be found here.
Step 8: Once you have generated your avaproof and avamasterkey, you must first stop your node.
Step 9: Next you must update your bitcoin.conf file by running:
Your terminal should now have a new look. In the blank space, copy and paste the following:
# Proof dependent parameters
avaproof=<your hex proof>
avamasterkey=<your master private key, WIF format>
Now copy and paste the proof you generated along with the master private key (WIF format). Note the <> brackets should not be included in the final version so it will look something like this:
Step 10: Once you have finished updating the bitcoin.conf file you can save with ctrl-O, hit enter, then use ctrl-X to exit.
You will now want to restart your node:
Assuming you’ve done everything right, you should be running an Avalanche node on the eCash network! By doing so you will be contributing to the security and usability of the XEC network while positioning yourself for potential future staking rewards.
You can run this command to get information like proof count, total stake amount, and node count:
Step 11: To update your node when there’s a new version of the software, stop your node by running:
You will get a message that says “Bitcoin ABC stopping” (remember to use the correct version number)
Then repeat Step 5 but making sure to replace the 0.25.12 with whatever the latest version of the software is in all 3 places. Once that has finished, you can restart your node using:
bitcoin-abc-0.25.12/bin/bitcoind (again make sure to replace the 0.25.12 with the new version)
(Please keep in mind that your Avalanche node will verify false until a block is found. If the verification status shows a message saying “pending inbound connections” it may mean you have to disable a firewall.)