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

Ubuntu 20.04.2.0 LTS (Focal Fossa)

1. Install the CLI

If you haven’t done so already, follow the instructions to install the Node CLI here.

2. Install dependencies on the host machine

This is required only to be run during first time setup on a new host machine. This is done through one simple call of the radixnode CLI script.

  • docker mode

radixnode docker dependencies

Once the process has completed, you will be asked to log out of your ssh bash session and log back in.

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 keystore_password, but ensure you store the keystore password value safely, as it will be required in a later step.

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.

  • docker mode

  • systemd mode

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.

  • Mainnet Seed Nodes

  • Stokenet Seed Nodes

Asia Pacific (south-east)
radix://[email protected]3.238.198.54
radix://[email protected]4.66.161.181
Asia Pacific (south)
radix://[email protected].109.36.249
radix://[email protected].109.57.223
EU (west)
radix://[email protected]4.216.99.177
radix://[email protected]2.212.46.210
US (east)
radix://[email protected]3.22.58.54
radix://[email protected]2.200.121.204
EU (west)
radix://[email protected]5.236.228.96
radix://[email protected]4.76.86.46
radix://[email protected]5.180.3.148
radix://[email protected]4.195.7.167
US (east)
radix://[email protected].222.172.90
EU (central)
radix://[email protected].121.58.170
radix://[email protected].121.255.51

3.2. Install and setup node

Run the following command and pay close attention to parameters:

  • docker mode

  • systemd mode

radixnode docker install
  1. Optional - Use parameter -f <path to config.yaml> if the config file is different from the /home/ubunu/node-config/config.yaml.

  2. Optional - Use paramter -a or --autoapprove to run this command without any prompts. It is only recommended for automation purpose.

  3. Use parameter -u or --update to deploy latest versions of software.

  1. Log in as radixdlt

    sudo su - radixdlt
  2. 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
  3. 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://rn1q[email protected].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.)

  1. Execute the following command to set the password for the nginx web server:

    • docker mode

    • systemd mode

    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
  2. Enter your password at the prompt, then enter it again at the verification prompt.

  3. 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
  4. 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.

Table 1. Radix Node endpoints
Nginx user Service endpoints

superadmin

/key/*

admin

/network/*
/entity/*
/mempool/*
/transactions/*
/construction/*
/engine/*
/system/*

metrics

/prometheus

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

7. Stopping your node

This command will shut down a systemd or docker node, and is executed differently depending on which kind of installation you’re running.

  • docker

  • systemd

radixnode docker stop

Optional parameter -f can be used to point to config.yaml file

radixnode systemd stop

8. Restarting your node

Restart the node using the following command:

  • docker

  • systemd

radixnode docker start

Optional parameter -f can be used to point to config.yaml file

radixnode systemd restart

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:

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.