Updating a Docker Node installation

10st Okt 2023Radix Node v1.0.4 released

We renamed the binary filename from radixnode to babylonnode and changed the default file locations in order to prevent file clashes or unintentional overwrites when updating a node from Olympia to Babylon. Beware that despite effort to reduce friction, we highly recommend to do the migration using a new separate node instead of recycling the existing olympia node.

10st Okt 2023Radix Node v1.0.4 released

Use the babylonnode 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 Radix nodes installed as docker instances. The instructions apply to:

  • Full nodes

  • Validator nodes

  • Archive 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. Make a Copy of your Docker Compose script

If you are running a full node or a validator node, then the file is radix-fullnode-compose.yml. The compose script for an archive node is radix-archivenode-compose.yml. Copy the file to another directory in case you need to restore the node later one.

3. Shutdown Docker

If you’re running a full node or a validator node, then shut down your instance using the following command:

docker-compose -f radix-fullnode-compose.yml down

If you’re running an archive node, then use radix-archivenode-compose.yml script in the shutdown command:

docker-compose -f radix-archivenode-compose.yml down

4. Download the latest Docker Compose Script

Copy and paste the following code into a file and call it radix-fullnode-compose.yml.

  • Fullnode Mainnet (default)

  • Fullnode Mainnet (migration)

  • Fullnode Stokenet

version: '3.8'
services:
  core:
    cap_add:
    - NET_ADMIN
    environment:
      RADIXDLT_NETWORK_ID: 1
      RADIXDLT_NETWORK_SEEDS_REMOTE: "radix://node_rdx1qf2x63qx4jdaxj83kkw2yytehvvmu6r2xll5gcp6c9rancmrfsgfw0vnc65@52.212.35.209,radix://node_rdx1qgxn3eeldj33kd98ha6wkjgk4k77z6xm0dv7mwnrkefknjcqsvhuu4gc609@54.79.136.139,radix://node_rdx1qwrrnhzfu99fg3yqgk3ut9vev2pdssv7hxhff80msjmmcj968487uugc0t2@43.204.226.50,radix://node_rdx1q0gnmwv0fmcp7ecq0znff7yzrt7ggwrp47sa9pssgyvrnl75tvxmvj78u7t@52.21.106.232"
      JAVA_OPTS: --enable-preview -server -Xms12g -Xmx12g -XX:MaxDirectMemorySize=2048m
        -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCompressedOops -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts
        -Djavax.net.ssl.trustStoreType=jks -Djava.security.egd=file:/dev/urandom -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
      RADIXDLT_LOG_LEVEL: info
      RADIXDLT_NETWORK_USE_PROXY_PROTOCOL: 'false'
      RADIXDLT_VALIDATOR_KEY_LOCATION: /home/radixdlt/node-keystore.ks
      RADIX_NODE_KEYSTORE_PASSWORD: "${RADIXDLT_NODE_KEY_PASSWORD}"
    image: radixdlt/babylon-node:v1.0.4
    init: true
    mem_limit: 14000m
    restart: unless-stopped
    ulimits:
      memlock: -1
      nofile:
        hard: 65536
        soft: 65536
    volumes:
    - babylon_ledger:/home/radixdlt/RADIXDB
    - ./radixdlt/node-keystore.ks:/home/radixdlt/node-keystore.ks
  nginx:
    environment:
      RADIXDLT_GATEWAY_API_ENABLE: 'true'
      RADIXDLT_GATEWAY_BEHIND_AUTH: 'true'
      RADIXDLT_NETWORK_USE_PROXY_PROTOCOL: 'false'
      RADIXDLT_TRANSACTIONS_API_ENABLE: 'false'
    image: radixdlt/babylon-nginx:1.0.1
    ports:
    - 443:443
    - 30000:30000
    restart: unless-stopped
    ulimits:
      nofile:
        hard: 65536
        soft: 65536
    volumes:
    - nginx_secrets:/etc/nginx/secrets
volumes:
  babylon_ledger:
    driver: local
    driver_opts:
      device: ./babylon-ledger
      o: bind
      type: none
  nginx_secrets:
version: '3.8'
services:
  core:
    cap_add:
    - NET_ADMIN
    environment:
      RADIXDLT_NETWORK_ID: 1
      RADIXDLT_NETWORK_SEEDS_REMOTE: "radix://node_rdx1qf2x63qx4jdaxj83kkw2yytehvvmu6r2xll5gcp6c9rancmrfsgfw0vnc65@52.212.35.209,radix://node_rdx1qgxn3eeldj33kd98ha6wkjgk4k77z6xm0dv7mwnrkefknjcqsvhuu4gc609@54.79.136.139,radix://node_rdx1qwrrnhzfu99fg3yqgk3ut9vev2pdssv7hxhff80msjmmcj968487uugc0t2@43.204.226.50,radix://node_rdx1q0gnmwv0fmcp7ecq0znff7yzrt7ggwrp47sa9pssgyvrnl75tvxmvj78u7t@52.21.106.232"
      JAVA_OPTS: --enable-preview -server -Xms12g -Xmx12g -XX:MaxDirectMemorySize=2048m
        -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCompressedOops -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts
        -Djavax.net.ssl.trustStoreType=jks -Djava.security.egd=file:/dev/urandom -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
      RADIXDLT_GENESIS_OLYMPIA_NODE_BECH32_ADDRESS: ${RADIXDLT_GENESIS_OLYMPIA_NODE_BECH32_ADDRESS}
      RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_AUTH_PASSWORD: ${RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_AUTH_PASSWORD}.
      RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_AUTH_USER: ${RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_AUTH_USER}
      RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_URL: ${RADIXDLT_GENESIS_OLYMPIA_NODE_END_STATE_API_URL}
      RADIXDLT_GENESIS_USE_OLYMPIA: 'true'
      RADIXDLT_LOG_LEVEL: info
      RADIXDLT_NETWORK_USE_PROXY_PROTOCOL: 'false'
      RADIXDLT_VALIDATOR_KEY_LOCATION: /home/radixdlt/node-keystore.ks
      RADIX_NODE_KEYSTORE_PASSWORD: "${RADIXDLT_NODE_KEY_PASSWORD}"
    image: radixdlt/babylon-node:v1.0.4
    init: true
    mem_limit: 14000m
    restart: unless-stopped
    ulimits:
      memlock: -1
      nofile:
        hard: 65536
        soft: 65536
    volumes:
    - babylon_ledger:/home/radixdlt/RADIXDB
    - ./radixdlt/node-keystore.ks:/home/radixdlt/node-keystore.ks
  nginx:
    environment:
      RADIXDLT_GATEWAY_API_ENABLE: 'true'
      RADIXDLT_GATEWAY_BEHIND_AUTH: 'true'
      RADIXDLT_NETWORK_USE_PROXY_PROTOCOL: 'false'
      RADIXDLT_TRANSACTIONS_API_ENABLE: 'false'
    image: radixdlt/babylon-nginx:1.0.1
    ports:
    - 443:443
    - 30000:30000
    restart: unless-stopped
    ulimits:
      nofile:
        hard: 65536
        soft: 65536
    volumes:
    - nginx_secrets:/etc/nginx/secrets
volumes:
  babylon_ledger:
    driver: local
    driver_opts:
      device: ./babylon-ledger
      o: bind
      type: none
  nginx_secrets:
version: '3.8'
services:
  core:
    cap_add:
    - NET_ADMIN
    environment:
      RADIXDLT_NETWORK_ID: 2
      RADIXDLT_NETWORK_SEEDS_REMOTE: "radix://node_tdx_2_1qv89yg0la2jt429vqp8sxtpg95hj637gards67gpgqy2vuvwe4s5ss0va2y@13.126.248.88,radix://node_tdx_2_1qvtd9ffdhxyg7meqggr2ezsdfgjre5aqs6jwk5amdhjg86xhurgn5c79t9t@13.210.209.103,radix://node_tdx_2_1qwfh2nn0zx8cut5fqfz6n7pau2f7vdyl89mypldnn4fwlhaeg2tvunp8s8h@54.229.126.97,radix://node_tdx_2_1qwz237kqdpct5l3yjhmna66uxja2ymrf3x6hh528ng3gtvnwndtn5rsrad4@3.210.187.161"
      JAVA_OPTS: --enable-preview -server -Xms12g -Xmx12g -XX:MaxDirectMemorySize=2048m
        -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCompressedOops -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts
        -Djavax.net.ssl.trustStoreType=jks -Djava.security.egd=file:/dev/urandom -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
      RADIXDLT_LOG_LEVEL: info
      RADIXDLT_NETWORK_USE_PROXY_PROTOCOL: 'false'
      RADIXDLT_VALIDATOR_KEY_LOCATION: /home/radixdlt/node-keystore.ks
      RADIX_NODE_KEYSTORE_PASSWORD: "${RADIXDLT_NODE_KEY_PASSWORD}"
    image: radixdlt/babylon-node:v1.0.4
    init: true
    mem_limit: 14000m
    restart: unless-stopped
    ulimits:
      memlock: -1
      nofile:
        hard: 65536
        soft: 65536
    volumes:
    - babylon_ledger:/home/radixdlt/RADIXDB
    - ./radixdlt/node-keystore.ks:/home/radixdlt/node-keystore.ks
  nginx:
    environment:
      RADIXDLT_GATEWAY_API_ENABLE: 'true'
      RADIXDLT_GATEWAY_BEHIND_AUTH: 'true'
      RADIXDLT_NETWORK_USE_PROXY_PROTOCOL: 'false'
      RADIXDLT_TRANSACTIONS_API_ENABLE: 'false'
    image: radixdlt/babylon-nginx:1.0.1
    ports:
    - 443:443
    - 30000:30000
    restart: unless-stopped
    ulimits:
      nofile:
        hard: 65536
        soft: 65536
    volumes:
    - nginx_secrets:/etc/nginx/secrets
volumes:
  babylon_ledger:
    driver: local
    driver_opts:
      device: ./babylon-ledger
      o: bind
      type: none
  nginx_secrets:

5. Restart Docker

You can restart Docker immediately, and it will build your new node service with the compose script you have just downloaded.

If you’re running a full node or a validator node, then execute the restart command with the radix-fullnode-compose.yml script:

RADIXDLT_NODE_KEY_PASSWORD=node-password docker-compose -f radix-fullnode-compose.yml up -d

As always, use the radix-archivenode-compose.yml script in the terminal command if you’re running an archive node.

RADIXDLT_NODE_KEY_PASSWORD=node-password docker-compose -f radix-archivenode-compose.yml up -d

6. 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":"v1.0.4"}