This is a step-by-step guide for installing a Bitcoin Core node as a Hot Wallet source for CAS. While you can operate a node on any suitable server, this guide is based upon a VPS using Digital Ocean. The intricacies of node installation (and operation) in a different environment are outside the scope of our support, and in such situations you should seek assistance from the Bitcoin Core community.
This guide has been updated for Bitcoin Core version: 0.20.1
Before you begin…
The following example presumes you have the following ready:
root access to a server running any current Ubuntu LTS (20.04 in this example),
350 GB free disk space (plus 20 GB more every month),
4 GB of memory (RAM)
It’s common for full nodes on high-speed connections to use 200 gigabytes upload or more a month. Download usage is around 20 gigabytes a month, plus around an additional 195 gigabytes the first time you start your node.
expect to see: 'gpg: Good signature from "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <email@example.com>"'
expect to see: "bitcoin-0.20.0.1-x86_64-linux-gnu.tar.gz: OK" .
ignore anything additionally reported by the last command.
Decompress the Bitcoin Core tarball:
Install it to the system:
2. Create an RPC token:
The RPC token is designed to eliminate the need for hard-coded passwords in configuration and script files. You will receive a password here ONCE.
This password is required for CAS - it's your “RPC Password” noted in Step 6.
Download rpcauth.py on GitHub:
Modify the file permissions to allow the python script to execute:
Then finally run the RPC token generator that you just installed and enabled:
Replace AnyNameYouWantHere with any preferred user name.
Avoid using spaces or any special symbols.
Save all the information securely. You'll need every detail in the steps to follow.
The RPC User = AnyNameYouWantHere
The RPC Password = Kq66rZya7MNpCU_e0zZSgjR2Mb7rBeyX9QSeGhwPMeY=
The cookie/token ("rpcauth") will only be required in the Bitcoin Core configuration file (next step).
3. Create the Bitcoin Core configuration file.
Create a new file and secure it:
Open the file using the nano editor:
Add the following settings & credentials:
Replace the “rpcauth” line with the cookie/token you generated in the previous step.
Exit the nano editor with Control+X and save your changes.
The CAS parameter “port” is the same as the “rpcport” specified in this step.
4. Start the bitcoind daemon:
"When Bitcoin Core daemon first starts, it will begin to download the blockchain. This step will take at least several days, and it may take much more time on a slow Internet connection or with a slow computer."
The CAS “host” parameter used will be this node’s public IP.
The CAS “port” parameter will be the same port specified as the “rpcport” in Step 3 (above).
Option 2: Creating an SSH tunnel:
You may elect to use a SSH tunnel for secure RPC communication with the node. We also discourage running any software on your CAS server (except for CAS itself) and this includes Bitcoin Core. The solution is use port forwarding to enable access to your separate Bitcoin Core node. We recommend "dialing out" from CAS to the node.
The general usage would be:
In the above example,
"ssh -f -N" is the "create a permanent tunnel in the background" command.
"-i /home/gb/.ssh/bitcoind" specifies the private SSH key to be used.
"-L 8332:127.0.0.1:8332" are the node's RPC port definitions.
"firstname.lastname@example.org" is the SSH "dial-in" identity of the node.
Recruit an IT professional if you are uncomfortable with any of this!
6. Save the required information for CAS:
user: this is the “RPC User” you invented earlier in Step 2.
password: is the “RPC Password” you also created earlier in Step 2.
7. Setup a Crypto Setting in CAS to access your Bitcoin Core Node.
A "pruning node" (or lightweight node) is a special configuration that may be applied to bitcoind. It is unsupported by General Bytes. It is a substantial security risk when operating a BATM. Per the Bitcoin wiki:
“Lightweight nodes are sometimes able to be temporarily tricked into accepting transactions or blocks that are not actually valid. This could cause serious financial damage, especially for websites that automatically process Bitcoin transactions. Full nodes provide the maximum security possible, and so they should be used by all businesses, and also by regular users whenever doing so is convenient.”