Skip to content

Updating

OkYouIn is updated from a new release bundle that you copy to the server — there is no online update check and nothing updates by itself. One command, ./okyouin update, checks the new release, takes a safety backup and a rollback point, replaces the bundle files and restarts the stack on the new version. The database is migrated when the new version starts.

The same procedure applies to every kind of installation: the virtual appliance, the ISO install (both in /opt/okyouin) and an install on your own host. For a cluster, see Rolling update below.

  • Read the release notes of the new version.

  • Check what runs now:

    Terminal window
    ./okyouin version

    It prints the bundle version, the image tag in .env and what every container actually runs.

  • Make sure you have a copy of secrets/master_key off the server.

  • Plan a short maintenance window: the services restart once.

  1. Copy the new release to the server, for example to /opt: the bundle okyouin-bundle-<new>.tar.gz and — for an offline server or the appliance — the image archive okyouin-images-<new>.tar.zst with its SHA256SUMS. You do not need to unpack the bundle.

  2. Run the update from the installed directory:

    Terminal window
    cd /opt/okyouin
    ./okyouin update --from /opt/okyouin-bundle-<new>.tar.gz \
    --images /opt/okyouin-images-<new>.tar.zst

    --from takes the tarball or an unpacked bundle directory. --images is checked against the SHA256SUMS beside it; without --images the images are pulled from the registry.

  3. Confirm. The command shows <old> → <new> and asks before it starts (--yes confirms up front, for scripts).

  4. Wait for the result. It reports Updated OkYouIn <old> → <new> only when every container runs the new images.

In order:

  1. Refuses, with nothing changed: a downgrade (database migrations only go forward), a version it cannot compare, or a full image reference pinned in .env that would keep a service on the old release.
  2. Gets the images — loads the archive or pulls — while the old version keeps running.
  3. Takes a safety backup into .okyouin-update-<UTC>/ in the bundle directory: a configuration archive, a full database dump (the rollback point), the previous .env and bundle files, and ROLLBACK.txt with the steps to go back.
  4. Replaces the bundle files — never .env or secrets/ — and records the new version in .env. New optional settings are listed.
  5. Restarts the stack; the application migrates the database before it starts.
  6. Reports success once every container runs the new version.

A failure in steps 1–3 changes nothing but the downloaded images. --no-backup skips the configuration archive and the dump — and with them your rollback point; use it only if you made your own.

Read the last lines: they say what was done. Then run ./okyouin update again on the same server — it sees what the containers run and finishes from where it stopped.

If the application restarts in a loop after an update, the reason (usually a failed migration) is in its log:

Terminal window
./okyouin logs --tail 200 api

To go back to the previous version, follow .okyouin-update-<UTC>/ROLLBACK.txt. It restores the database dump, the previous bundle files and .env, and starts the old version.

Delete an update directory once you no longer need it — it holds a full database dump.

On a high-availability cluster the same command runs on one machine at a time, in a fixed order: every replica, then the leader, then the witness. Copy the new bundle and image archive to every machine first; the witness takes the smaller okyouin-witness-images-<new>.tar.zst.

You do not need to work out the order: start on any member. On the wrong one the update refuses before it writes anything and names where to start, for example Start here: node-2 (192.0.2.42) → ./okyouin update --from okyouin-bundle-<new>.tar.gz. Every run ends with a table of the cluster: each member’s role, version, state and which one is next.

  • Each database node is out for about a minute while it updates (measured: RADIUS about 60 s, console about 55 s); the other node keeps serving. Point your RADIUS clients at both nodes.
  • The leader’s run hands the primary role over first (writes pause for a few seconds) and takes the database dump that is the cluster’s rollback point.
  • The witness updates without an outage.
  • Only one update or membership change runs at a time across the cluster. NOT updating: node-2 is being updated right now … means: wait for that run, then repeat the printed command.