Installing a Radix Node with the CLI
These instructions are for installing just a validator or full node with the CLI. If you wish to install a full stack, including a Gateway, please see the Network Gateway CLI docs.
Introduction
Using the radixnode
CLI tool, you can install dependencies, configure your node installation, and then install and start up your node.
The CLI supports running the node either using Docker, or via systemd. However, we recommend Docker as the more straightforward and easy-to-maintain method.
The CLI currently only supports the Ubuntu operating system. We recommend the following hardware specification as a minimum starting point.
Model | vCPU | Memory (GB) | Storage(GB) | Network Bandwidth (Gbps) | Operating System |
---|---|---|---|---|---|
c5.2xlarge |
8 |
16 |
Provision a gp2 storage volume. You should initially provision 200 GB of SSD space |
Up to 10 |
1. Install the CLI
If you haven’t done so already, follow the instructions to install the Node CLI here.
3. Install the node
3.1. Create the config file
From version 1.3.2 onwards, the CLI supports a two-phase config
/install
setup for docker
nodes and gateways. First, you are lead through an interactive prompt to create a config.yaml
file, which by default is stored at ~/node-config/config.yaml
. This config file is then used for future installs and upgrades, to avoid having to remember your settings later.
If you want to setup in systemd
mode, this does not yet support the two phase config
/install
, so you should skip straight to the single phase install
command.
A KeyStore is created during the config command, and the password that was entered is written to the generated config.yaml file. If you wish, you can delete the line containing |
The key file contains a randomly-generated private key that determines your node’s unique address and (if choosing to register as a validator node) validator ID. This means if you lose your key file, you will forever lose your node address and validator ID - forcing you to generate a new key file from scratch. Any tokens held by the node address will be lost. As a validator, your delegators will have to unstake from your validator ID and restake to your new ID. Always make sure that you securely back up your key file as soon as you’ve generated it, and carefully protect it. |
The config command has two modes for node setup.
If you are running a node for the first time, we recommend using the CORE mode. If you are already running an existing node using docker, you will need to use the DETAILED mode to migrate the setup, as it allows you to create a config file based on the answers that you have from existing setup.
If you wish to install a Gateway as well as a full node, please see the Network Gateway CLI docs.
CORE - This is a quick config mode to create a config file with simple defaults to run a full node for Core API support.
radixnode docker config -m CORE
DETAILED - This is a detailed config mode, where the user is asked all necessary the questions and based on the answers replied, the config file is created.
radixnode docker config -m DETAILED
The two-step config / install process is only available for docker at present. Instead for systemd, you should continue to use the single-stage setup process in the below section, which requires you input the same details each time you upgrade.
3.2. Install and setup node
Run the following command and pay close attention to parameters:
radixnode docker install
|
-
Log in as
radixdlt
sudo su - radixdlt
-
Then ensure that you are in the
/home/radixdlt
directory. You can check your current directory using the following command:pwd
If you’re not in the
/home/radixdlt
directory then switch to it:cd /home/radixdlt
-
Run the following command, paying close attention to the parameters
radixnode systemd install \
-n fullnode \ (1)
-i 35.176.56.69 \ (2)
-u \ (3)
-t radix://rn1qgf0tug4nmxfa7su8zsu8pejzq48eeglvxf8le09cuy0nsghzg44weacz2q@3.109.36.249 (4)
1 | The -n option sets the node type, which can be fullnode or archivenode . |
2 | The -i option is the external IP address of your server. |
3 | The -u flag is optional and is used only if you are upgrading from a previous version of the node. If applied to the command, it will create a backup of the old configuration file and ensure that the node has stopped before applying the changes. |
4 | The -t setting is the address of a Radix node you can use to join the network. When the command executes, the script will download the configuration file from the specified node and attempt to make a connection. Select your closest node from the list below: |
4. Set passwords for the Nginx server
To keep the node as secure possible, the API is divided across a number of different endpoints to allow for varying levels of access to the node’s functions. This requires different usernames and passwords for each endpoint. (If you want more information about the Radix Node API, then take a look at Radix APIs.)
-
Execute the following command to set the password for the nginx web server:
Basic Auth User
Command to run
admin
radixnode auth set-admin-password --setupmode DOCKER
superadmin
radixnode auth set-superadmin-password --setupmode DOCKER
metrics
radixnode auth set-metrics-password --setupmode DOCKER
Basic Auth User
Command to run
admin
radixnode auth set-admin-password --setupmode SYSTEMD
superadmin
radixnode auth set-superadmin-password --setupmode SYSTEMD
metrics
radixnode auth set-metrics-password --setupmode SYSTEMD
-
Enter your password at the prompt, then enter it again at the verification prompt.
-
As shown on screen, enter the following command to set an environment variable for your password (remember to fill in your own password):
echo 'export NGINX_ADMIN_PASSWORD="nginx-password"' >> ~/.bashrc echo 'export NGINX_SUPERADMIN_PASSWORD="nginx-password"' >> ~/.bashrc echo 'export NGINX_METRICS_PASSWORD="nginx-password"' >> ~/.bashrc
-
Add the new environment variable to your session by executing the following command:
source ~/.bashrc
To keep the node as secure as possible, there are separate nginx usernames/passwords for each functionally-related enpoint.
|
5. Make sure the node is running
You can check to see if your node is running by checking for its identifiers:
radixnode api core key-list
This command will show you the identifiers as below for the key on your node
Command output
{
"public_keys":[
{
"identifiers":{
"account_entity_identifier":{
"address":"rdx1qspfr4l5ax3gqjfctkjxs4wutgj3sn2ht8l42x9kcp6xa6q6np5cqdgy70cjj"
},
"p2p_node":{
"peer_id":"rn1q2ga0a8f52qyjwza5359thz6y5vy646ela233dkqw3hwsx5cdxqr2c9p3km"
},
"validator_entity_identifier":{
"address":"rv1q2ga0a8f52qyjwza5359thz6y5vy646ela233dkqw3hwsx5cdxqr2qktp69"
}
},
"public_key":{
"hex":"0291d7f4e9a28049385da46855dc5a25184d5759ff5518b6c0746ee81a98698035"
}
}
]
}
Run below command to list the details of validator such as balances, registration, metadata, owner account etc
radixnode api core entity -v
This command will show you the details of node’s validator address
Command output
{
"balances":[
],
"data_objects":[
{
"name":"",
"type":"ValidatorMetadata",
"url":""
},
{
"allow_delegation":false,
"type":"ValidatorAllowDelegation"
},
{
"registered":false,
"type":"PreparedValidatorRegistered"
},
{
"fee":10000,
"type":"PreparedValidatorFee"
},
{
"owner":{
"address":"rdx1qspfr4l5ax3gqjfctkjxs4wutgj3sn2ht8l42x9kcp6xa6q6np5cqdgy70cjj"
},
"type":"PreparedValidatorOwner"
},
{
"data":"0000000000000000000000000000000000000000000000000000000000000000",
"type":"ValidatorSystemMetadata"
}
],
"state_identifier":{
"state_version":21124443,
"transaction_accumulator":"c26bfd40c79d6a8bbfcde9b2d67dc9a182d46031c5db4bd20eb9fbd50f2e60b9"
}
}
6. Check your node is syncing correctly
The radixnode
script allows you to interrogate your node for useful information, such as the software version:
radixnode api system version
or the node’s status:
radixnode api system health
This will return a message like this:
Command output
{"status": "UP"}
An UP
status means the node is running and syncing with the network correctly. Details on the other status codes can be found in Monitoring your node’s health
9. Advanced usage - Changing node parameters
Once you are satisfied that your node is running correctly, you can change the parameters.
You should not change the node’s default settings unless you are confident as to what each setting does and how changing it will affect the operation of your node |
More information on radixnode
Usage
You can use radixnode
to carry out a variety of administration tasks. For example:
-
Getting information about the network
-
Resetting the Nginx administration password.
You can find more information about the radixnode CLI command set here.
If you have any questions or run into problems, then check our troubleshooting guide, or the Node FAQ page. You can also get support from the Radix community and Radix team members.