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.
Before you update
Section titled “Before you update”-
Read the release notes of the new version.
-
Check what runs now:
Terminal window ./okyouin versionIt prints the bundle version, the image tag in
.envand what every container actually runs. -
Make sure you have a copy of
secrets/master_keyoff the server. -
Plan a short maintenance window: the services restart once.
Update
Section titled “Update”-
Copy the new release to the server, for example to
/opt: the bundleokyouin-bundle-<new>.tar.gzand — for an offline server or the appliance — the image archiveokyouin-images-<new>.tar.zstwith itsSHA256SUMS. You do not need to unpack the bundle. -
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--fromtakes the tarball or an unpacked bundle directory.--imagesis checked against theSHA256SUMSbeside it; without--imagesthe images are pulled from the registry. -
Confirm. The command shows
<old> → <new>and asks before it starts (--yesconfirms up front, for scripts). -
Wait for the result. It reports
Updated OkYouIn <old> → <new>only when every container runs the new images.
What the update does
Section titled “What the update does”In order:
- Refuses, with nothing changed: a downgrade (database migrations only go
forward), a version it cannot compare, or a full image reference pinned in
.envthat would keep a service on the old release. - Gets the images — loads the archive or pulls — while the old version keeps running.
- Takes a safety backup into
.okyouin-update-<UTC>/in the bundle directory: a configuration archive, a full database dump (the rollback point), the previous.envand bundle files, andROLLBACK.txtwith the steps to go back. - Replaces the bundle files — never
.envorsecrets/— and records the new version in.env. New optional settings are listed. - Restarts the stack; the application migrates the database before it starts.
- 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.
If an update stops half-way
Section titled “If an update stops half-way”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:
./okyouin logs --tail 200 apiRolling back
Section titled “Rolling back”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.
Updating a cluster
Section titled “Updating a cluster”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.