Updating a systemd method Node installation

22nd July 2021Radix Node 1.0-beta.40 released

Use the RadixNode CLI to update your node or install a new node from scratch – or refer to the update instructions for Docker or systemd install methods.

Introduction

These instructions will show you how to upgrade nodes installed as systemd instances. The instructions apply to:

  • Full nodes

  • Archive nodes

  • Validator nodes

Please read the instructions all the way through first, before applying the changes.

1. Prepare to update

First, if you haven’t already done so, ensure that you have backed up your node-keystore.ks key file. This key file contains the private key that determines your node’s unique address and (if you are running a validator node) validator ID. If anything goes wrong in the update process, if you have your key file, you can always reinstall the node from scratch and use it to recover access to your node.

Next, you may want to consider using a backup node to perform a switch to the updated node with minimal interruption (especially if running a validator node) – or to provide a quick recovery if something goes wrong during the update. See our recommendations for Maintaining Uptime for more.

2. Download the latest systemd distribution

The following instructions must be carried out as the radixdlt user.

  1. Switch to the radixdlt user:

    sudo su - radixdlt
  2. Go to https://github.com/radixdlt/radixdlt/releases and look for the entry with the Latest release marker.

  3. You should see a release asset zip file that starts with radixdlt-dist. Copy the URL of the file

  4. Append the full URL to a wget command to retrieve the file:

    wget https://github.com/radixdlt/radixdlt/releases/download/1.0-beta.40/radixdlt-dist-1.0-beta.40.zip

3. Stop the Node

Before upgrading the software, you’ll need to shut down the node.

sudo systemctl stop radixdlt-node.service

4. Save your existing setup

You’re going to replace the lib and bin directories of your existing installation to upgrade the software. Before doing that, you’re going to save the existing folders to another location.

directory structure for the systemd Radix installation
.
└── etc/
    └── radixdlt/
        └── node/
            ├── bin/
            └── lib/
  1. Move the lib directory to a new location.

    mv /etc/radixdlt/node/lib /etc/radixdlt/node/savelib
  2. Move the bin directory to a new location.

    mv /etc/radixdlt/node/bin /etc/radixdlt/node/savebin

5. Replace your existing setup

  1. Unzip the distribution file you downloaded in Section 2, “Download the latest systemd distribution”

    unzip radixdlt-dist-1.0-beta.40.zip  (1)
    1 The file name should correspond to the release version you have downloaded.
  2. Move the new lib directory from your unzipped distribution to your node directory.

    mv radixdlt-1.0-beta.40/lib /etc/radixdlt/node/lib
  3. Move the bin directory from your unzipped distribution to your node directory.

    mv radixdlt-1.0-beta.40/bin /etc/radixdlt/node/bin
  4. Now, exit the radixdlt user session

6. Save your existing Nginx configuration

If you still have an existing Nginx configuration from your previous installation then it’s a good idea to move it to another location:

full node installation
sudo mv radixdlt-nginx-fullnode-conf.zip radixdlt-nginx-fullnode-conf.zip.spare
archive node installation
sudo mv radixdlt-nginx-archivenode-conf.zip radixdlt-nginx-archivenode-conf.zip.spare

7. Download the latest Nginx configuration

  1. Go to https://github.com/radixdlt/radixdlt-nginx/releases and look for the entry with the Latest release marker.

  2. Look for the latest release for the full node configuration or the archive configuration:

    If you’re running a full node then copy the URL for radixdlt-nginx-fullnode-conf.zip.

    If you’re running an archive node then copy the URL for radixdlt-nginx-archivenode-conf.zip`.

  3. Paste the URL you copied into a wget command on your server to retrieve the zip file.

    download full node package
    wget -O radixdlt-nginx-fullnode-conf.zip https://github.com/radixdlt/radixdlt-nginx/releases/download/1.0-beta.40/radixdlt-nginx-fullnode-conf.zip
    download archive node package
    wget -O radixdlt-nginx-fullnode-conf.zip https://github.com/radixdlt/radixdlt-nginx/releases/download/1.0-beta.40/radixdlt-nginx-archivenode-conf.zip

8. Install the Nginx configuration

  1. Unzip the nginx configuration. (You can overwrite all the files)

    unzip fullnode
    unzip radixdlt-nginx-fullnode-conf.zip
    unzip archive node
    unzip radixdlt-nginx-archivenode-conf.zip
  2. Copy the files to the Nginx setup directory.

    sudo cp -r conf.d/ /etc/nginx/
  3. And now copy the nginx configuration files for your node type. If you are running a full node then execute:

    sudo cp nginx-fullnode.conf /etc/nginx/nginx.conf

    If you’re running an archive node then copy nginx-archive.conf directory:

    sudo cp nginx-archive.conf /etc/nginx/nginx.conf

9. Restart Nginx and the Node

Execute the following commands to restart the web server and the node

sudo su - radixdlt
sudo systemctl restart radixdlt-node.service
exit
sudo systemctl restart nginx

10. Ensure that the node has been upgraded

You can check the version of the node software by sending an information request using curl:

curl -k -u admin:nginx-password "https://localhost/version"

The response is a json string that carries the version number as its payload.

{"version":"1.0-beta.40"}