Upgrades
OpenFlare ships as a release train. One immutable vX.Y.Z tag covers the control plane, the console, the updater and every cell image, so all of them always move together. See Release images for the image list and tag scheme.
You can upgrade in two ways:
- In the console, with the optional updater sidecar (Settings page).
- By hand, with a git checkout, an env pin and
docker compose up -d.
How the in-panel upgrade works
Section titled “How the in-panel upgrade works”browser -- HTTPS + Basic auth --> console -- internal network + token --> updater --> docker.sock (no docker socket) (never published)- The console never touches Docker. It serves the Settings page and proxies exactly four updater endpoints (status, check, start, job polling) with a server-side token that the browser never sees. Mutations additionally require the
X-OpenFlare-Console-Request: 1header, so a cross-site form cannot trigger them with ambient Basic-auth credentials. - The updater is the only container with the Docker socket. It has no host port, sits on its own
updatectlnetwork that no tenant container joins, and exposes a fixed API. No endpoint accepts a shell command, an arbitrary image or an arbitrary compose file. - The updater is opt-in through the
updateCompose profile.
Enable the updater
Section titled “Enable the updater”New install. Pass --enable-updater to the installer. See Installer options.
Existing install. Run the following from the install checkout. It adds the missing updater key to the env file without touching the secrets that encrypt plane state. Then uncomment COMPOSE_PROFILES=update in the env file and start the updater:
cd /opt/openflarenode scripts/all-in-one-setup.mjs --upgrade-env# set COMPOSE_PROFILES to include update in the env file, then:docker compose \ --project-directory /opt/openflare \ --env-file /var/lib/openflare/.env \ -f /opt/openflare/docker-compose.all-in-one.yml \ up -dIf COMPOSE_PROFILES already lists other profiles (for example tls), add update to the comma-separated list instead of replacing it.
Layout the updater expects
Section titled “Layout the updater expects”| Path or name | Role |
|---|---|
/opt/openflare |
Git checkout of the exact release tag |
/var/lib/openflare |
Configuration root and generated state (OPENFLARE_CONFIG_ROOT) |
/var/lib/openflare/.env |
Authoritative env file, mode 0600 (OPENFLARE_ENV_FILE). Every Compose call passes it with --env-file |
Volume updater-state |
Job history and Postgres dumps, mounted at /state inside the updater |
The updater mounts the config root at the same absolute path inside its container. The env file must be reachable through a directory bind mount, because the updater replaces it with an atomic rename.
Run an upgrade
Section titled “Run an upgrade”- Open the console and go to Settings.
- Choose Check for updates. The check queries the GitHub Container Registry anonymously.
- Select the target version and type the exact version string to confirm.
- Watch the job. The page shows the current step and its service impact, and keeps polling while the console restarts.
The check lists tags of every release image, keeps only strict vX.Y.Z tags and intersects them across all images. A tag that is missing from any single image (a half-published release) is reported as incomplete and is never installed. The target is re-verified against the registry again immediately before the job starts.
The steps of a job
Section titled “The steps of a job”| Step | What happens | Service impact |
|---|---|---|
preflight |
Validates the env file and config root, checks the git checkout is clean, fetches the target tag, detects active profiles, reads the target’s apps/updater/release-requirements.json and checks every required key and file |
None |
backup |
pg_dump of the plane database into the updater-state volume as <job-id>-postgres.sql |
None |
checkout |
Checks out the target release tag, so the compose file, templates and manifest move together | None |
env |
Atomically pins only OPENFLARE_IMAGE_TAG in the env file. Other keys, comments and secrets are preserved |
None |
reconcile |
Runs the release’s reconcile script (scripts/all-in-one-reconcile.mjs), then re-validates the requirements |
None |
plan |
Computes the set of services to converge: base services plus optional services that are already active, never the updater itself | None |
pull |
Pulls only the OpenFlare release images. Third-party images such as Postgres, Redis and Traefik are not upgraded | None |
control |
Recreates the plane alone and waits for it to be healthy | Management API only. Tenant traffic is unaffected |
runtime |
Recreates the runtime chain (the vrt-* services and cell controller) and waits for them to be healthy |
Tenant traffic interruption of a few seconds, because the images are already local |
console |
Recreates the console and waits for it to be healthy | Management UI only |
verify |
Confirms the configured version | None |
| (after) | The updater refreshes itself through a detached helper container | Updater only |
Stage order is deliberate. If the new plane cannot boot, the runtime has not been touched, so a failure costs no tenant traffic. The tenant-facing window is a single stage whose images are already pulled. A long-running service that exits unexpectedly fails its stage immediately instead of waiting for the timeout.
Fail-closed requirements
Section titled “Fail-closed requirements”The updater refuses to start an update (and shows the reason in the console) when any of these hold:
- The deployment is not pinned to a stable
vX.Y.Ztag (source builds, dev tags,latestand prereleases such as-rc.Nall fail). - The registry is not the default
ghcr.iorelease registry. - The env file is missing, is a symlink, is inside the checkout, disagrees with its own
OPENFLARE_ENV_FILEorOPENFLARE_CONFIG_ROOTvalues, or the config root is not mounted at the same absolute path. - The target release manifest is missing or invalid, or an active required env key, file or secret is missing.
- The checkout has tracked local modifications, is not a git checkout, or the target tag cannot be fetched.
- Another job is active, or the newest job was interrupted and not yet acknowledged.
- The running release containers disagree about their version, or carry no stable tag.
- The version you typed does not exactly match the target.
If preflight reports missing required configuration, do not edit files under /opt/openflare. Repair the named key or file under /var/lib/openflare (or rerun the installer’s reconfigure path) and retry. A preflight failure made no changes.
Rollback
Section titled “Rollback”If any stage after checkout fails, the updater performs exactly one automatic rollback:
- Check out the previous release tag. This is the version that was actually running (observed from the containers), not the env pin.
- Re-pin
OPENFLARE_IMAGE_TAGto it. - Re-run the previous release’s reconcile script and validation.
- Converge back onto the previous images, which are still local.
The job ends as FAILED either way, and its log states whether the rollback finished (rollback to vX.Y.Z requested) or not (ROLLBACK FAILED).
There is no rollback loop. After one attempt the manual procedure below applies.
The version truth contract
Section titled “The version truth contract”OPENFLARE_IMAGE_TAG is a declaration of the desired version, not proof of what runs. The updater therefore keeps two notions apart:
- Desired: the pin in the env file.
- Observed: the image tags of the running release containers, read from the Docker daemon at preflight. Postgres, Redis, Traefik and the updater itself are excluded.
Consequences:
- The rollback point is always the observed version. If no release containers exist at all (for example a fresh disaster-recovery reinstall where the stack is not yet started), the pin is the only truth left and the log says so.
- Containers on mixed versions fail preflight with
OBSERVED_VERSION_MIXED. Converge them manually first. - A container image without a stable tag (digest pin, image id, dev build) fails preflight with
OBSERVED_VERSION_UNREADABLE. - If the newest job was interrupted or failed and its target equals the current pin, the pin is ahead of what runs. Starting a different target then fails with
409 DESIRED_OBSERVED_VERSION_MISMATCH. Retrying the same pinned target is allowed as a resume, once any interruption is acknowledged.
Interrupted jobs
Section titled “Interrupted jobs”If the updater dies during a job (host reboot, daemon restart, container removal, out-of-memory), nothing can know whether the compose step finished. On the next start the updater marks the job INTERRUPTED and does not resume it.
An unacknowledged interrupted newest job blocks every new update with 409 INTERRUPTED_JOB_UNRESOLVED. This is intentional: a second mutating update on top of a half-applied one is how installs become unrecoverable.
To resolve it:
-
Find which step the job reached, from its log in the console.
-
Verify that the checkout, the pin and the running containers tell one consistent story:
Terminal window git -C /opt/openflare describe --tagsgrep '^OPENFLARE_IMAGE_TAG=' /var/lib/openflare/.envdocker compose --project-directory /opt/openflare \--env-file /var/lib/openflare/.env \-f /opt/openflare/docker-compose.all-in-one.yml ps -
If the containers are mixed, converge everything onto one version first (
up -dwith the current pin, or restore the older checkout and pin). -
Acknowledge the interruption. This asserts that you inspected and repaired the state, which the updater cannot verify:
Terminal window docker compose --project-directory /opt/openflare \--env-file /var/lib/openflare/.env \-f /opt/openflare/docker-compose.all-in-one.yml \exec updater node -e 'const token = require("fs").readFileSync("/run/secrets/openflare_updater_token", "utf8").trim()const id = "<job-id>"fetch(`http://127.0.0.1:8790/v1/jobs/${id}/acknowledge-interrupted`, {method: "POST",headers: { authorization: `Bearer ${token}`, "content-type": "application/json" },body: JSON.stringify({ confirmJobId: id }),}).then(async (r) => console.log(r.status, await r.text()))'
The job keeps the INTERRUPTED status in history. Only its blocking effect is lifted. If the interruption happened after the pin moved to the target but before containers converged, the usual fix is to acknowledge and then retry the same target from the console.
Updater self-refresh
Section titled “Updater self-refresh”After the job succeeds, the updater replaces itself using a detached one-shot helper container, because an updater cannot recreate the container it is running in. The helper writes a completion marker into updater-state. The next updater process reports the outcome as updaterSelfRefresh in its status:
| State | Meaning |
|---|---|
verified |
The recreate completed |
failed |
The helper ran but the recreate failed. The updater may still be the previous version |
start-failed |
The helper container never launched. The updater is still the previous version |
pending |
Inside the 10 minute completion window with no marker yet. Usually the handoff is just finishing |
missing |
The window passed with no marker. Treat the updater as unverified |
The core platform is fine in all of these cases. Recreating the updater by hand is safe and idempotent:
docker compose --project-directory /opt/openflare \ --env-file /var/lib/openflare/.env \ -f /opt/openflare/docker-compose.all-in-one.yml \ up -d updaterManual upgrade
Section titled “Manual upgrade”Use the manual path for prerelease installs, for installs without the updater, and when the updater refuses to run.
-
Take a backup first. See Backups.
-
Fetch tags and read the target release notes (
CHANGELOG.md) for breaking notes:Terminal window cd /opt/openflaregit fetch --tagsgit status --short # must show no tracked modifications -
Inspect the target’s required configuration, and satisfy anything new under
/var/lib/openflare(not inside the checkout):Terminal window git show refs/tags/<target>:apps/updater/release-requirements.json -
Check out the target, run its reconcile script if it has one, and pin the tag:
Terminal window git checkout --detach refs/tags/<target>node scripts/all-in-one-reconcile.mjs \--env-file /var/lib/openflare/.env \--config-root /var/lib/openflare \--target-version <target>Then make sure the env file contains exactly one
OPENFLARE_IMAGE_TAG=<target>line. -
Pull and converge:
Terminal window docker compose --project-directory /opt/openflare \--env-file /var/lib/openflare/.env \-f /opt/openflare/docker-compose.all-in-one.yml pulldocker compose --project-directory /opt/openflare \--env-file /var/lib/openflare/.env \-f /opt/openflare/docker-compose.all-in-one.yml up -d -
Verify with
docker compose psand the health endpoints in Health and monitoring.
The manual sequence is what the updater automates, minus the staged order. If you want the same minimal tenant impact, bring up the plane first (up -d plane), then the runtime services, then the console.
Manual rollback
Section titled “Manual rollback”cd /opt/openflaregit checkout --detach refs/tags/<previous-version># set OPENFLARE_IMAGE_TAG=<previous-version> in /var/lib/openflare/.envdocker compose --project-directory /opt/openflare \ --env-file /var/lib/openflare/.env \ -f /opt/openflare/docker-compose.all-in-one.yml \ up -dIf the failed release changed the database schema in a non-additive way, restore the Postgres dump into a consistent database of the matching version. The updater’s dump is <job-id>-postgres.sql in the updater-state volume. See Backups.
Releases, prereleases and pinning
Section titled “Releases, prereleases and pinning”| Kind | Tag shape | Images published | Installer assets | Offered by the in-panel updater |
|---|---|---|---|---|
| Stable | vX.Y.Z |
Yes | install.sh, install.sh.sha256, image-digests.txt |
Yes |
| Prerelease | for example v0.8.0-rc.3 |
Yes | No | No |
Prerelease trains exist to prove the supply chain and the installer on real infrastructure before a stable version. They are fully installable, but you move between them manually. Pin to an exact tag with OPENFLARE_IMAGE_TAG. There is no moving latest tag. See Release images.
Compatibility between the plane and cells
Section titled “Compatibility between the plane and cells”The control plane and cells talk over a versioned wire contract, which is why a release train is always upgraded as a whole. The cell images in a release are built from one pinned contract revision (OPENFLARE_CONTRACT_REV), and the control plane vendors the matching wire contract, so image contents match byte for byte. Never mix image tags from different releases. See Compatibility.
Two behaviors reduce upgrade risk:
- Upgrading the plane does not restart cells. Cells keep serving the last accepted signed snapshot for up to 24 hours while the plane is down or being replaced, then fail closed.
- The plane applies its schema at boot (
src/schema.sql) unlessPLANE_MIGRATE_ON_BOOT=0. A revision fence prevents a restored plane database from re-signing a revision that a cell has already applied.
Hostname migration gate
Section titled “Hostname migration gate”After an upgrade, hostname writes can fail with 503 VRT_HOSTNAME_MIGRATION_REQUIRED. This means a unique hostname index is missing or the data holds duplicate rows. Run the migration tool in dry-run mode first, then apply:
docker compose --env-file /var/lib/openflare/.env -f docker-compose.all-in-one.yml \ exec plane sh -c 'DATABASE_URL=$(cat /run/secrets/database_url) node dist/migrateHostnames.js'
docker compose --env-file /var/lib/openflare/.env -f docker-compose.all-in-one.yml \ exec plane sh -c 'DATABASE_URL=$(cat /run/secrets/database_url) node dist/migrateHostnames.js --apply'Before you start: checklist
Section titled “Before you start: checklist”- A recent verified backup exists, and
PLANE_SECRETS_KEYandPLANE_SIGNING_SECRETare stored separately. See Backups. git statusin/opt/openflareshows no tracked modifications.- Enough free disk for the new images (the installer itself requires at least 10 GiB free).
- You have read the release notes and are ready for a short tenant interruption.
If an upgrade does not go as planned, see Troubleshooting.