Updates
Trong trang này
Dymini Panel updates itself from signed GitHub Releases. The panel replaces its own container, then brings every agent and cache to the same version. Each step checks its health and goes back to the previous version on failure.
What a release contains
Version 0.3.0 was published without installation assets after its release build failed. Use 0.3.1 or newer for installation and updates. Version 0.3.1 includes the load guard and dashboard changes intended for 0.3.0, and waits for the agent's staged binary to close before executing its version check.
| Asset | Purpose |
|---|---|
release.json |
Version, panel and cache images pinned by @sha256 digest, sha256 of each agent build |
dymini-panel-agent-<target> |
Agent binaries for x86_64-unknown-linux-musl and aarch64-unknown-linux-musl |
dymini-panel-server-<target>, dymini-panel-cache-<target>, dymini-panel-<target> |
Static panel and cache binaries and the dymini-panel CLI |
install.sh, install-agent.sh |
Installers for this version |
SHA256SUMS |
Checksums of every other asset |
SHA256SUMS.minisig |
minisign signature of SHA256SUMS |
The panel trusts one minisign public key. Release builds compile it in. You can override it with DYMINI_PANEL_UPDATE_PUBKEY, either as the base64 key or as the whole .pub file. Without a key the panel still shows new releases, but it refuses to apply them.
A release is verified when:
- the signature over
SHA256SUMSchecks out with the trusted key (legacy, non-prehashed signatures are refused), SHA256SUMSlistsrelease.jsonwith the matching hash,- the manifest's version equals the release tag, so an older signed release cannot be served under a new tag,
- both images are pinned by digest, and
- the version is newer than the running one. The stable channel ignores prereleases, and the prerelease channel includes them.
You can check a release by hand:
minisign -Vm SHA256SUMS -P "$DYMINI_PANEL_UPDATE_PUBKEY"
sha256sum -c SHA256SUMSUpdating from the panel
Open System → Updates. Check now reads the releases of the repository set in panel settings (dymini/panel by default). The panel shows the newest release and whether it verified, and under What this update installs the notes of every release between your version and the newest one, newest first, so you can see what is about to be installed before you press the button. An admin with write access can then click Update to ….
The panel then does the following:
- Writes an encrypted pre-update backup to
<data dir>/updates/pre-update-<from>-<time>.tar.zst.enc. The file has mode 0600 and is sealed with the master key, and the last three are kept. It is a normal panel backup, sodymini-panel-server restore --passphrase <hex master key>can read it. - Pulls the panel image by digest.
- Starts a one-off
dymini-panel-updatercontainer from the new image, with the same mounts and environment as the panel.
The updater then does the following:
- Renames
dymini-paneltodymini-panel-previousand starts a newdymini-panelcontainer on the new image. The new container keeps the same environment, mounts, ports, restart policy, and networks. - Waits up to 180 seconds for
GET /api/healthinside the new container to report the new version. - If the check passes, it removes
dymini-panel-previousand records the update assucceeded. - If the check fails, it stops the new container. If the new version had already migrated the database, it restores the pre-update backup. It then renames
dymini-panel-previousback and waits for the old version to answer. The update is recorded asrolled_back, or asfailedif the old panel did not come back, together with the new container's last output.
The page polls /api/health and reloads when the panel answers again. When a rollback restored the database, everyone has to sign in again, because panel backups do not carry sessions. Any changes made between the backup and the rollback are also lost.
The panel can only replace itself when it runs as a Docker container named dymini-panel, which is what install.sh creates. You can change the name with DYMINI_PANEL_SELF_CONTAINER. Any other setup is upgraded by running install.sh --version <version> again.
Crossing the Rudder rebrand
A panel still running Rudder cannot update itself into Dymini Panel: the rebranded releases carry a new manifest format, and the old build refuses them. Cross the boundary once by hand:
curl -fsSL https://github.com/dymini/panel/releases/latest/download/install.sh -o install.sh
sudo sh install.shThe installer migrates in place: it stops the old rudder* containers, copies /etc/rudder and /var/lib/rudder into the new locations, reuses the existing postgres volume, and bridges Traefik onto the old rudder-proxy network so deployed services keep their routes until their next deploy. After that the panel updates itself again as usual. Agents do not need a reinstall: the panel still serves the pre-rebrand agent protocol, so every enrolled agent stays connected and receives its rebranded binary through the normal component update. Re-running install-agent.sh on a host is safe too — it carries the enrollment and edge state over without re-enrolling.
Agents and caches
After a panel update, Agents and caches lists every server with its agent version and cache image. Update components works through outdated servers one at a time. On each server it updates the agent first, then the cache. A failed agent update skips that server's cache.
-
Agent: the panel streams the agent binary bundled in its image (
DYMINI_PANEL_DIST_DIR/dymini-panel-agent-<target>) over the existing session. It checks the hash against the.sha256file and the signed manifest first. The agent:- writes the binary next to itself as
.newand checks its sha256, - runs it with
--versionand expectsdymini-panel-agent <version>, - moves the current binary to
.prev, puts the new one in place, writes anupdate-pendingmarker, and exits with code 75.
systemd (
Restart=alwaysin the unitinstall-agent.shwrites) starts the new binary. Once the panel welcomes the new session, the marker is cleared. If no session is welcomed withinDYMINI_PANEL_AGENT_UPDATE_GRACE_SECS(default 120 seconds), the agent puts.prevback and exits, so systemd starts the old version again. - writes the binary next to itself as
-
Cache: the server pulls the cache image named in the release and replaces
dymini-panel-cachewith it. The new container keeps the same settings and must answerGET :9090/healthwithin 60 seconds. Otherwise the previous container is restored and the update is recorded asrolled_back.
Agents installed before self-update existed cannot report their target. Reinstall them once with install-agent.sh.
Automatic updates
| Setting | Default | Meaning |
|---|---|---|
| Channel | stable |
stable or prerelease |
| Automatic updates | off | Apply verified releases without a click |
| Maintenance window | none | HH:MM-HH:MM in UTC, for example 02:00-04:00; it may wrap past midnight. With auto-update on and no window, updates apply at any time |
The panel checks every DYMINI_PANEL_UPDATE_CHECK_SECS seconds (default 21600; 0 turns checks off). The first check runs a minute after startup. When auto-update is on and the current time is inside the window, the panel applies a newer verified release. Otherwise it updates outdated components. An update stuck as running for an hour is marked failed.
API
| Method and path | Role | Description |
|---|---|---|
GET /api/v1/system/updates |
admin | Versions, last check, settings, components, history |
POST /api/v1/system/updates/check |
admin, write | Check for a release now. latest is the newest release; pending lists every release above the installed version, oldest first, with its notes |
PUT /api/v1/system/updates/settings |
admin, write | {"channel":"stable","auto_update":false,"maintenance_window":"02:00-04:00"} |
POST /api/v1/system/updates/apply |
admin, write | Start a panel update (202 {"history_id": …}, 409 update_unavailable) |
POST /api/v1/system/updates/components |
admin, write | Update outdated agents and caches (202 {"queued": n}) |
Starting an update, updating components, and changing update settings are recorded in the audit log.
Configuration
| Variable | Default | Meaning |
|---|---|---|
DYMINI_PANEL_UPDATE_PUBKEY |
built in | minisign public key that signs releases |
DYMINI_PANEL_UPDATE_API_URL |
https://api.github.com |
GitHub API base, or a mirror that serves the same /repos/<owner>/<repo>/releases JSON |
DYMINI_PANEL_UPDATE_CHECK_SECS |
21600 |
Background check interval; 0 disables it |
DYMINI_PANEL_SELF_CONTAINER |
dymini-panel |
Name of the panel's own container |
DYMINI_PANEL_AGENT_UPDATE_GRACE_SECS |
120 |
How long an updated agent waits for the panel before restoring its previous binary |
Publishing a release
.github/workflows/release.yml runs on v* tags. A preflight job runs first and fails the run when CHANGELOG.md has no entries for the tag or the signing settings are missing. Then:
- It builds musl binaries for x86_64 and aarch64 with
cargo zigbuild.DYMINI_PANEL_BUILD_VERSIONis set from the tag andDYMINI_PANEL_UPDATE_PUBKEYfrom the repository variable of the same name. - It pushes multi-arch
ghcr.io/<owner>/dymini-panelanddymini-panel-cacheimages and records their digests. - It runs
deploy/release/make-release.shto writerelease.jsonandSHA256SUMS. - It signs
SHA256SUMSwith theMINISIGN_SECRET_KEYsecret and checks the signature against the public key before publishing. - It adds GitHub build-provenance attestations for every asset and creates the release. The release notes are the
## [x.y.z]section ofCHANGELOG.md(deploy/release/changelog.sh), which is what the panel shows. Tags with a-are published as prereleases.
To create the signing key once:
minisign -G -W -p dymini-panel.pub -s dymini-panel.key # -W: no password, for CIStore the contents of dymini-panel.key as the MINISIGN_SECRET_KEY secret and the second line of dymini-panel.pub as the DYMINI_PANEL_UPDATE_PUBKEY variable. Keep an offline copy of the secret key. Every installation trusts it.