Skip to main content
Installation

Upgrade and backup

New-version notices, one-click upgrades from the console (online or offline package) with their steps and automatic rollback, manual upgrades, backing up and restoring the database and the key encryption key, and manual recovery after a failed rollback.

Upgrades do not affect the licence. The database schema is upgraded automatically when the new version starts. Back up first, as described below.

New-version notices

About 30 seconds after start-up, and every 24 hours after that, the gateway fetches signed version information from updates.reallysec.com and uses it only if the signature checks out.

  • When a new version is out, administrators see a notice on the Overview page (select Dismiss to hide it until the next version), and an Update badge appears next to the version under Settings > Personal > System information. View update shows the release notes, the release date and a download link for this host's offline package. Other users see no notice.
  • Check for updates checks at once, at most once every 30 seconds.
  • The gateway never upgrades itself. An administrator starts the upgrade in the console, or upgrades by hand.
  • In an air-gapped network, set RST_FABRIC_UPDATE_URL= (empty) in .env and the gateway stops sending update checks.

One-click upgrade

Upgrades are carried out by the upgrade helper rst-ai-fabric-updater on the gateway host. It verifies the signature of every file, backs up the database, switches versions and rolls back automatically if the new version does not come up.

Prerequisites

  • The upgrade helper is installed and running. install.sh installs it when run as root; otherwise run sudo ./install.sh updater <install-dir>. The One-click upgrade card under Settings > Personal shows whether it is running; on the host, run systemctl status rst-ai-fabric-updater.
  • You are signed in to the console as an administrator. API tokens cannot start an upgrade.

Online upgrade

  1. On the One-click upgrade card under Settings > Personal, look at Online upgrade. Opening the page checks once; you can also select Check for updates.
  2. Select Upgrade to x.y.z and confirm.

An online upgrade downloads only images the host does not have. When the database image is unchanged it is not downloaded again, so usually only the gateway image is fetched. If downloads need a proxy, edit /etc/systemd/system/rst-ai-fabric-updater.service, uncomment Environment=HTTPS_PROXY=... and fill it in, then run systemctl daemon-reload && systemctl restart rst-ai-fabric-updater.

Offline upgrade

  1. Download the offline package rst-ai-fabric-<version>-linux-<arch>.tar.gz and its signature file .tar.gz.sig; both are in the same directory on the release site.
  2. Under Offline package on the One-click upgrade card, choose both files and upload them. The gateway checks the signature, architecture and version, and the free disk space.
  3. Once the checks pass, start the upgrade.

Upgrade steps (progress is shown live in the console)

StepWhat happens
Verify signaturesAn online upgrade fetches and verifies the version information again; an offline upgrade verifies the package signature
Download imagesOnline: download the images needed. Offline: extract them from the package. Each is verified
Load imagesLoad the images and check them against the version information
Back up databasePause the gateway, then back up to <install-dir>/backups/upgrade-<old>-to-<new>-<time>.dump; the latest 3 are kept
Switch versionChange RST_FABRIC_VERSION in .env, replace docker-compose.yml (the old file is kept as docker-compose.yml.bak-<old>) and start the new version
Check healthThe new version's /healthz must answer correctly 3 times with the right version, within 5 minutes

If one of the first four steps fails, nothing is changed. If one of the last two fails, the upgrade rolls back: the old .env and docker-compose.yml are restored, the database is restored from the backup and the old version is started. The gateway is paused during the switch and requests in progress are interrupted, so upgrade at a quiet time.

Every upgrade is recorded in the audit log. GPU node agents update themselves after the gateway upgrade; see Multiple nodes.

To turn one-click upgrades off, run systemctl disable --now rst-ai-fabric-updater on the host.

Manual upgrade

Without the upgrade helper, or when one-click upgrades are unavailable, upgrade by hand:

tar xzf rst-ai-fabric-<new>-linux-amd64.tar.gz && cd rst-ai-fabric-<new>-linux-amd64
gunzip -c images.tar.gz | docker load
cd <original-install-dir>
# back up the database first
sed -i 's/^RST_FABRIC_VERSION=.*/RST_FABRIC_VERSION=<new>/' .env
docker compose up -d

Always run docker compose up -d in the original install directory, and do not run install.sh again in the newly extracted directory. Never run docker compose down -v: it deletes the database volume and the key encryption key volume.

Backup

Back up three things:

WhatWhereHow
DatabasePostgreSQL in its data volume: all configuration, request logs, usage and audit recordsDaily pg_dump
.envInstall directory; holds the database password and metrics tokenCopy the file
Key encryption keyThe secrets volume, or RST_FABRIC_SECRET_KEY in .envSeparately, not alongside the database backups

Back up the database:

docker compose exec -T postgres pg_dump -U fabric -Fc fabric > fabric-$(date +%F).dump

Back up the key encryption key (when RST_FABRIC_SECRET_KEY is not set in .env):

docker compose exec -T rst-ai-fabric cat /var/lib/rst-ai-fabric/secrets/key-encryption.key > key-encryption.key
chmod 600 key-encryption.key

When moving to a new host, write the saved value into RST_FABRIC_SECRET_KEY= in the new host's .env. If the key is lost, existing API keys keep working but can no longer be viewed.

The licence is bound to the host's /etc/machine-id, so activate it again after moving to a new host.

Restore

A restore overwrites the current data:

docker compose stop rst-ai-fabric
docker compose exec -T postgres pg_restore -U fabric -d fabric --clean --if-exists < fabric-2026-11-08.dump
docker compose start rst-ai-fabric

Manual recovery after a failed rollback

Only needed when the console shows that the rollback failed or the upgrade was interrupted:

cd <install-dir>
docker compose stop rst-ai-fabric
cp .upgrade/rollback/.env .env && cp .upgrade/rollback/docker-compose.yml docker-compose.yml   # if the files exist
docker compose exec -T postgres psql -U fabric -d postgres -c 'DROP DATABASE fabric WITH (FORCE)' -c 'CREATE DATABASE fabric OWNER fabric'
docker compose exec -T postgres pg_restore -U fabric -d fabric --no-owner < backups/upgrade-<...>.dump
docker compose up -d

On this page