Installing a Radix Node with the CLI (pre v1.3.2)

We’d recommend updating to the latest CLI and following the docs there.

Introduction

Using the radixnode CLI tool, you can proceed to installing the node, performing initial setup, and starting it up. While the CLI supports running the node as either a Docker instance or a systemd install using systemd, we recommend Docker as the more straightforward and easy to maintain method.

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 dependencies on host machine

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

  • 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.

2. Install the node

Execute the following command to install the node:

  1. Run the following command, paying close attention to the parameters

    • docker mode

    • systemd mode

    radixnode docker install \
        -n fullnode \    (1)
        -u \    (2)
        -t [[email protected] of chosen seed node]     (3)
    1 The -n option sets the node type, which is fullnode . Archive node is not supported for node release 1.1.0 onwards
    2 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.
    3 The -t setting is the validator address and IP of a seed node that your node will 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 seed node from the list below:
    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://[email protected].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:
  • 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

While running, the CLI will report on its progress, asking at various stages if it is okay to continue; answer Y each time if you’re happy to proceed.

In the setup process, the CLI will create a new node-keystore.ks file and ask you for a password to protect it.

The key generation process may take a long time if your server hasn’t generated a sufficiently large pool of random values to build fresh keys. Be prepared to wait up to twenty minutes for the key generation to complete.

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.

Now that your Docker node should be running, there are some basic commands offered by radixnode to check on your node’s operation.

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

4. 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"
   }
}

5. 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

6. 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

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

8. Advance 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.