ROCKPro64 System, Part 4
Here are some additional instructions for my twitter friend pacman who is the first person (I know of) to use my instructions to build his own ROCKPro64 based bitcoin node.
Setup local bitcoin-cli access
This is the recommended way to enable RPC access for other programs running on the same computer to your bitcoin full node. You will need to have python installed and access to the bitcoin source you cloned via git from my post ROCKPro64 System, Part 2 step 7.
-
Install python if it's not already installed
sudo apt install python
-
Create a new bitcoin rpc auth token
cd bitcoin/share/rpcauth ./rpcauth.py <username>
be sure to save the password you get from this command under where it says "Your password:"
-
edit the
bitcoin.conf
file and enable rpc access by enabling server modesudo vi /etc/bitcoin/bitcoin.conf
remove the # to uncomment out the server line, it will look like this
server=1
-
Add your new rpc auth token to your bitcoin.conf file
sudo vi /etc/bitcoin/bitcoin.conf
The line that you add to bitcoin.conf will look something like this
rpcauth=test:ca224c4c2208da68dba6dff12e8f0b09$63e0f5813424b92407e9d4c033de57b718ff41c0b9e7827f6ce7b5bfa62e3e8b
-
restart bitcoind
sudo systemctl restart bitcoind
-
you can now run
bitcoin-cli
commands from your own user account, you just need to provide the password generated by therpcauth.py
programbitcoin-cli -rpcuser=test -rpcpassword=<A_LONG_RANDOM_STRING=> help bitcoin-cli -rpcuser=test -rpcpassword=<A_LONG_RANDOM_STRING=> getpeerinfo etc.
As stated in the bitcoin.conf file you can add multiple rpcauth lines to the same bitcoin.conf
file so you can use different auth tokens for each app that is accessing your node.