Upgrade and backup
New-version notices, one-click upgrades and offline upgrade packages in the admin console, upgrade steps and automatic rollback, manual recovery and manual upgrades, and what to back up and how to restore it.
An upgrade replaces only the images and docker-compose.yml. .env, config.yaml and the database volume are kept, the machine identity the licence is bound to does not change, and no reactivation is needed afterwards. Always upgrade from the original installation directory.
New-version notices
The portal checks for a new version about 30 seconds after start-up and once a day after that. It accepts version information only when the signature verifies. If the signature is wrong, the file is damaged or the connection fails, nothing is shown.
When a new version is available, admins see a notice under General > Overview and can dismiss it until the next version. System > Updates shows that an update is available. The page lists the release notes, a download link for the offline upgrade package and Check for updates (at most once every 30 seconds). Other staff see no notice.
- The check URL is
RSTNAV_UPDATE_URLin.env,https://updates.reallysec.com/releases/rst-index/latest.jsonby default.HTTPS_PROXYandNO_PROXYare honoured. The firewall only needs to allowupdates.reallysec.comon port 443. - On isolated networks, set this entry to empty. The portal then makes no check requests at all, and upgrades use offline packages.
One-click upgrades
One-click upgrades are carried out by the updater on the host. The portal container does not mount the Docker socket. It only writes upgrade requests and uploaded offline packages into the updater/ directory in the installation directory. The updater picks them up, verifies every file again with its own built-in public key, only moves to newer versions, and listens on no port.
- Only admins can upgrade, and only from a signed-in browser session. API tokens cannot start an upgrade. Uploads, upgrade requests and results are all recorded in the audit log.
- If the updater is not installed, run
sudo ./install.sh updater <installation-directory>on the server as root.
Online upgrade
Under System > Updates, choose Upgrade to x.y.z. Only images missing from the host are downloaded. When the MySQL image has not changed, only the portal image is downloaded.
Offline upgrade
Under Offline upgrade package, upload rstnav-<version>-linux-<arch>.tar.gz and the matching .tar.gz.sig, then choose Upload and verify. The upgrade can start only after the signature, architecture and version pass verification.
Upgrade steps
Progress is shown live on the page:
- Verify signatures.
- Download images (online) or extract them (offline), checking the SHA-256 and signature of each.
- Load the images and check that their contents match the signed version information.
- Back up the database to
<installation-directory>/backups/upgrade-<old>-to-<new>-<time>.sql. The three most recent backups are kept. - Switch versions: update the version in
.env, replacedocker-compose.yml(the old file is kept asdocker-compose.yml.bak-<old>) and start the new version. - Check health: the new version's
/healthzmust succeed three times in a row and report the new version, within 5 minutes including any database schema upgrade.
If steps 1 to 4 fail, nothing is changed. If step 5 or 6 fails, the upgrade rolls back automatically: the previous .env and docker-compose.yml are restored, the database is restored from the step 4 backup and the previous version is started. Data written in the few minutes after the backup is lost. The portal is unavailable for about a minute during the switch.
Downloading through a proxy
Edit the updater's unit file /etc/systemd/system/rstnav-updater.service, uncomment the Environment=HTTPS_PROXY=... line and set your proxy address, then run systemctl daemon-reload && systemctl restart rstnav-updater.
Turning off one-click upgrades
Stop and disable the updater service (systemctl disable --now rstnav-updater). Upgrades are then manual only.
Manual recovery
Needed only when the page shows Rollback failed or Interrupted. In the installation directory:
cd <installation-directory>
docker compose stop rstnav
# Restore these two files if they exist
cp .upgrade/rollback/.env .env
cp .upgrade/rollback/docker-compose.yml docker-compose.yml
docker compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_ROOT_PASSWORD" exec mysql -uroot' < backups/upgrade-<...>.sql
docker compose up -dManual upgrade
Without the updater:
-
Extract the new offline package into any temporary directory and load the images:
gunzip -c images.tar.gz | docker load -
Back up the database first.
-
In the original installation directory, set
RSTNAV_VERSIONin.envto the new version and replacedocker-compose.ymlwith the one from the new package. -
Run
docker compose up -d.
Do not upgrade by running install.sh again in a new directory.
Backup
What to back up:
| Item | Location | Notes |
|---|---|---|
| Database | MySQL data volume | Navigation, accounts, departments, asset register, audit log, licence state, Feishu settings |
.env | Installation directory | Contains the session secret. The Feishu App Secret and staff Feishu authorisations are encrypted with it and must be re-entered or re-authorised if it is lost |
config.yaml | Installation directory | Identity sources and availability check settings |
saml/ | Installation directory | SP certificate and private key when SAML is used |
Back up the database:
cd <installation-directory>
docker compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_ROOT_PASSWORD" exec mysqldump -uroot --single-transaction --databases rstnav' > backup-$(date +%F).sqlStore the .sql file and the files in the table above on another host.
Restore
On the same host:
cd <installation-directory>
docker compose stop rstnav
docker compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_ROOT_PASSWORD" exec mysql -uroot' < backup-<date>.sql
docker compose up -dOn a different host: extract an offline package of the same version, copy the backed-up .env, config.yaml and saml/ into the extracted directory first, then run sudo ./install.sh. When .env already exists the installer keeps it, so the database is initialised with the original passwords. Once the services are running, restore the database as above. The licence is bound to the original host's machine identity, so an Enterprise licence must be activated again on the new host. See Licence.
Do not run docker compose down -v. Once the database volume is removed, the only way back is a restore from backup.
Feishu
Sign in to RST Index with a Feishu custom app, import Feishu departments and members, and turn on Feishu docs. Configured in the admin console and applied on save.
Interface overview
The sign-in page, header, home page areas and admin console menu, and what company admins, department admins and staff can do.