![]() | How to run a node |
It is good to update your server to latest software:
apt-get update apt-get upgrade -y apt-get dist-upgrade -y apt-get autoremove -y apt-get autoclean –y
Create a new user for your node. It's much safer then to run it under root.
adduser mynode adduser mynode sudo
For correct compilation it is necessary to install:
apt-get install git cmake build-essential libssl-dev pkg-config libboost-all-dev libsodium-dev libzmq5 tmux
and latest MS .Net Core Framework
https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1604 wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb And install SDK 2.2 sudo apt-get update sudo apt-get install apt-transport-https sudo apt-get update apt-get install dotnet-sdk-2.2
After completing these steps you can continue with a first run.
Switch to your new user (mynode) and run new TMUX session.
su mynode
tmux new -s btrnode
Later you will attach this session with command.
tmux a –t btrnode
Next step is cloning of master branch of actual node under your user (su mynode).
Go to \home\mynode\ And clone this git: git clone -b master_1.1.16 https://gitlab.com/bitcoinrh/BRhodiumNode.git
Now go to project folder and call.
Go to \home\mynode\BRhodiumNode\src\BRhodium\ then call: dotnet restore dotnet build
Run node with param -testnet.
dotnet run –testnet
Don't wait for download and stop node with CTRL+C.
Now go to new folder under your user (can be hidden).
\home\mynode\.brhodiumnode\BRhodium\BRhodiumTest\ and open file BRhodium.conf: nano BRhodium.conf
TestNET configuration
Add testnet peer:
Change line: #addnode=ip:port To: addnode=217.182.72.173
To allow access to API RPC-JSON set:
Change line: #server=0 To: server=1
To enable UPnp set:
Change line: #upnp=0 To: upnp=1
Configure API RPC-JSON access authentication:
If you don't need to secure access to API RPC-JSON just set server=1 only.
Change lines: #rpcbind=127.0.0.1 #rpcallowip=127.0.0.1 To rpcbind=0.0.0.0 rpcallowip=0.0.0.0 Add lines: rpcuser=youruser rpcport=16661 (this is default testnet rpc port) rpcpassword=yourpsw
Save it.
More information about API RPC-JSON access authentication read here.
Now run node again and download whole blockchain.
Then go back to \home\mynode\BRhodiumNode\src\BRhodium\ And run again: dotnet run –testnet