Updating a systemd method Node installation
20th January 2022 – Radix Node 1.1.1 released |
Introduction
These instructions will show you how to upgrade nodes installed as systemd instances. The instructions apply to:
-
Full 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.
-
Switch to the
radixdlt
user:sudo su - radixdlt
-
Go to https://github.com/radixdlt/radixdlt/releases and look for the entry with the Latest release marker.
-
You should see a release asset
zip
file that starts withradixdlt-dist
. Copy the URL of the file -
Append the full URL to a
wget
command to retrieve the file:wget https://github.com/radixdlt/radixdlt/releases/download/1.1.1/radixdlt-dist-1.1.1.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.
. └── etc/ └── radixdlt/ └── node/ ├── bin/ └── lib/
-
Move the
lib
directory to a new location.mv /etc/radixdlt/node/lib /etc/radixdlt/node/savelib
-
Move the
bin
directory to a new location.mv /etc/radixdlt/node/bin /etc/radixdlt/node/savebin
5. Replace your existing setup
-
Unzip the distribution file you downloaded in Section 2, “Download the latest systemd distribution”
unzip radixdlt-dist-1.1.1.zip (1)
1 The file name should correspond to the release version you have downloaded. -
Move the new
lib
directory from your unzipped distribution to your node directory.mv radixdlt-1.1.1/lib /etc/radixdlt/node/lib
-
Move the
bin
directory from your unzipped distribution to your node directory.mv radixdlt-1.1.1/bin /etc/radixdlt/node/bin
-
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:
sudo mv radixdlt-nginx-fullnode-conf.zip radixdlt-nginx-fullnode-conf.zip.spare
7. Download the latest Nginx configuration
-
Go to https://github.com/radixdlt/radixdlt-nginx/releases and look for the entry with the Latest release marker.
-
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
. -
Paste the URL you copied into a
wget
command on your server to retrieve thezip
file.download full node packagewget -O radixdlt-nginx-fullnode-conf.zip https://github.com/radixdlt/radixdlt-nginx/releases/download/1.1.1/radixdlt-nginx-fullnode-conf.zip
8. Install the Nginx configuration
-
Unzip the nginx configuration. (You can overwrite all the files)
unzip fullnodeunzip radixdlt-nginx-fullnode-conf.zip
-
Copy the files to the Nginx setup directory.
sudo cp -r conf.d/ /etc/nginx/
-
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
9. Restart Nginx and the Node
For node versions 1.1.0 onwards, node software requries Java 17. Install java 17 before restarting node |
-
Run below command to install Java 17 JDK
sudo apt install -y openjdk-17-jdk
To upgrade node to 1.1.0 version, many of the configs in defaut.config have been changed or removed. Refer this section for more details. Once the config is applied appropriately, then follow below steps to restart the node and nginx
|
-
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/system/version"
The response is a json
string that carries the version number as its payload.
{"version":"1.1.1"}