Run a validator node
Using AWS Image
Please replace the port according to the network. Below is the table mentioning ports of each network.
A Newrl node can be instantly spawned using the pre-built Newrl Image on AWS.
Please note that for testnet image name is :
Newrl Testnet Node - Ubuntu.
At the launch time, the only configuration that needs to be specified is the security group to allow incoming connections on ports, refer table above on which port to open.
- In your aws console instances section click
Launch Instance. (Change region to N.Virginia or Ohio as image is currently available in those)
- In the launch instance page, Under application and OS images section click
Browse more AMIs
- In search bar, type in
newrl testnet node.
- Under community AMI section, there should be an image under the name Newrl Testnet Node - Ubuntu. Select the image
- Under network setting, make sure ssh, http, https traffic radio box is checked.
- Launch the instance.
- Once the instance is launched, Go to the instance page, under security tab click security group. Then add an inbound rule with port 8421 open from any source.
Add Node wallet to chain
Once the node is live, it's generated wallet key can be obtained by running the below command.
The node's wallet need to be added on the chain with the help of a custodian or as a linked wallet from Newrl wallet app.You can log into the wallet with a password specific to your machine/mobile. Inside, you can load your wallet from the node as obtained above (use only the json mentioned after “wallet” in the .auth.json file).
You can get your node’s public info from the URL /get-node-info. Example: If node’s public IP is 126.96.36.199, the url will be http://188.8.131.52:8421/get-node-info.
From source code
- A computer accessible outside with port open for incoming.
- Git installed. Steps here
- Python3.7+ installed. This is preinstalled on most common linux distributions. On ubuntu the steps will be
sudo apt update && sudo apt install python3.10-venv
- Pip and python3 venv installed. Installation steps available here
Note: Below are sample commands for testnet. Replace the keyword 'testnet' with desired network name if needed.
git clone https://github.com/newrlfoundation/newrl.git
Start the node
screen -S newrl
Screen session is used to let the node run in background when terminal is closed.
Import existing wallet
Enter environment[mainnet/testnet/devnet]: mainnet
Paste the existing wallet.
Note: The port 8456 for mainnet and 8421 if testnet should be publicly accessible on the instance. On AWS, this can be done by opening inbound port in the security group. For local installations, the router need to be configured to bypass symmetric NAT for the port 8456 for mainnet and 8421 for testnet.
Update the Node software
Nodes created using AWS image
Nodes created using AWS image can be update by mearely rebooting the instance from AWS console.
Nodes created from source
Follow the steps to update nodes created from source
- Login to screen session and stop the process by pressing Ctrl + C. Sometimes the process need to be force killed by running
pkill -9 pythonoutside of screen
scripts/start.sh mainnet --fullnode
Re-install a node
To re-install chain data on a node on a node with issues, follow the instructions below
Running no screen session
Stop newrl node
Running from AWS image
sudo service newrl stop # Ctrl+C if not stopping in few seconds
sudo rm newrl.db
sudo service newrl start