How Kaeso updates itself and checks your settings
Inside Kaeso 0.7's updater and kaeso config check: signed release manifests, pre-switch configuration validation, why 0.7 refuses invalid settings at startup, dialect-aware maintenance replies and rollbacks.
- Published
- Reading time
- 4 min
- Author
- Kaeso Team

Self-hosted infrastructure usually forces an uncomfortable choice at upgrade time: either log in over SSH to pull images and hope a typo in .env does not crash the server, or hand a background container unrestricted root access to /var/run/docker.sock.
Kaeso's Docker Compose package takes a third path. Every release is signed by Kaeso's Release workflow, the gateway validates the entire configuration without starting a server via kaeso config check, and the optional updater service talks to Docker only through a restricted socket proxy — checking that the new gateway accepts your settings before the old gateway is ever stopped.


Check your settings before you restart: kaeso config check01
The gateway reads settings from KAESO_* environment variables, an optional TOML file (KAESO_CONFIG), and *_FILE secret mounts (KAESO_MASTER_KEYS_FILE, KAESO_UPDATER_TOKEN_FILE, and so on). If a required setting is missing or out of range, the gateway refuses to start before touching the databases and prints the exact variable or TOML key to fix — never printing a secret value.
You can run the exact same validation at any time without starting the server and without connecting to PostgreSQL, ClickHouse or Valkey. On a Linux server with Docker Compose:
cd /opt/kaesodocker compose run --rm --no-deps gateway config checkOr against a standalone .env file before upgrading to a new image tag:
docker run --rm --env-file .env ghcr.io/logicplanes/kaeso-gateway:0.7.0 config checkIt prints The configuration is valid. on success, warns about any KAESO_ variable that matches no known setting (catching typos such as KAESO_PUBLIC_ULR), and exits non-zero with a clear fix when a setting is invalid.
Why Kaeso 0.7.0 refuses settings that 0.6.0 silently adjusted
In 0.6.0, a few misconfigured settings were silently clamped or ignored at runtime. In 0.7.0, Kaeso refuses them at startup so an operator never thinks authentication or a sync interval is active when it is not:
KAESO_KPMR_INTERVAL(kpmr.interval)- What 0.6.0 did
- Accepted any duration above zero and clamped it to 5 minutes
- What 0.7.0 requires
auto(the default), or a duration of at least5m(such as1hor6h)
KAESO_MCP_SERVERS_SYNC_INTERVAL(mcp_servers.sync_interval)- What 0.6.0 did
- Silently raised shorter intervals to 1 minute
- What 0.7.0 requires
- At least
1m, or unset for the default
KAESO_SMTP_USER(smtp.user) withoutKAESO_SMTP_PASSWORD- What 0.6.0 did
- Sent mail without authentication when the password was missing
- What 0.7.0 requires
- Set
KAESO_SMTP_USERandKAESO_SMTP_PASSWORDtogether, or remove both for an unauthenticated relay
| Setting | What 0.6.0 did | What 0.7.0 requires |
|---|---|---|
KAESO_KPMR_INTERVAL (kpmr.interval) | Accepted any duration above zero and clamped it to 5 minutes | auto (the default), or a duration of at least 5m (such as 1h or 6h) |
KAESO_MCP_SERVERS_SYNC_INTERVAL (mcp_servers.sync_interval) | Silently raised shorter intervals to 1 minute | At least 1m, or unset for the default |
KAESO_SMTP_USER (smtp.user) without KAESO_SMTP_PASSWORD | Sent mail without authentication when the password was missing | Set KAESO_SMTP_USER and KAESO_SMTP_PASSWORD together, or remove both for an unauthenticated relay |
Also new in 0.7.0: an empty KAESO_CONFIG="" now counts as unset, matching every other KAESO_* variable.
What happens when you click Update in the console02
On a Docker Compose install, the gateway polls https://update.kaeso.app/v1/releases.json every 5 minutes (sending only the gateway version in User-Agent, with If-None-Match for 304 responses; air-gapped installs set KAESO_UPDATES_CHECK=false). When a new release appears under Instance › Updates, you can install it with one click or schedule Automatically in a daily or weekly 1-hour window.
When an update starts, the updater runs five steps in order:
- 01Verify the release signatures. The updater verifies
release.jsonand image attestations against Kaeso's Release workflow (logicplanes/kaeso/.github/workflows/release.ymlonrefs/heads/prod). If verification fails, nothing is touched. - 02Pull images and pre-check settings with the new gateway. After downloading the new
kaeso-gateway,kaeso-consoleandkaeso-updaterimages, the updater runs the new gateway's configuration check against your current.env,compose.override.yamlandKAESO_CONFIGfile. If 0.7.0 spotsKAESO_KPMR_INTERVAL=1mor an SMTP user without a password, the update stops right here with Not installed, restorescompose.yaml, names the setting and how to fix it, and your 0.6.0 gateway never stops running. - 03Switch containers while Caddy holds the door. Only after the config check passes does the updater replace the console and gateway containers. During the few seconds the gateway restarts, Caddy answers every incoming request in the caller's own API dialect with
Retry-After: 30—503 service_unavailable_errorfor OpenAI,529 overloaded_errorfor Anthropic Messages and System One,503 UNAVAILABLEfor Gemini,503 service_unavailablefor ElevenLabs, and a self-refreshing status page for browser visitors — so standard SDKs wait and retry automatically. - 04Run forward-only migrations. The new gateway runs database migrations at startup and has up to 10 minutes to pass
/readyz. - 05Roll back if startup fails. If the new gateway fails to start before migrating the database, the updater starts the previous containers again, restores the previous
compose.yaml, and records Rolled back. (If the failure happens after a database migration may have run, it stops with Needs attention and preserves the-previouscontainers so you can inspectdocker compose logs gatewayor restore your pre-upgradepg_dump.)
How the updater's Docker access is narrowed
The updater never mounts /var/run/docker.sock directly. Instead:
- Only the gateway can reach the updater on an internal Docker network, authenticated with the shared 32-byte
KAESO_UPDATER_TOKEN(orKAESO_UPDATER_TOKEN_FILEvia Compose secrets), and passes only a target version string. - The updater talks to
docker-proxy, which restricts API methods, paths, and bind-mount sources toKAESO_DIR(/opt/kaeso). - When replacing containers directly, the updater refuses to create any container whose privileges, Linux capabilities, devices, namespaces, network, mounts or resource limits differ from the container it replaces.
- If you prefer no Docker socket proxy on the host at all, pass
--no-updatertoinstall.sh(or omitCOMPOSE_PROFILES=updater) and update withsh install.sh --update.
Updating with the installer, by hand or with Helm03
- With the installer: Run
sh install.sh --update --version 0.7.0in/opt/kaeso. Like the console updater, it verifiescompose.yamlagainstrelease.jsonand checks your settings with the new gateway before stopping the old one (Linux server guide). - Verifying the GitHub attestation yourself: Use
gh attestation verify release.json --repo logicplanes/kaeso --signer-workflow logicplanes/kaeso/.github/workflows/release.yml --source-ref refs/heads/prodandsha256sum -concompose.yamlbeforedocker compose up -d --wait(Upgrades in the docs (opens in a new tab)). - On Kubernetes: The Docker updater is not part of the Helm chart (
updates.installed_with = "helm"makes the console's Updates page display the exacthelm upgradecommand instead). Upgrade withhelm upgrade kaeso oci://ghcr.io/logicplanes/charts/kaeso --version 0.7.0 --namespace kaeso --reset-then-reuse-values --waitas covered in Deploy Kaeso on Kubernetes with the Helm chart.
Next steps04
- Deploy Kaeso on a Linux server: full Compose installation, volume backups and
kaeso config check. - Deploy Kaeso on Kubernetes with the Helm chart: pre-upgrade migration Jobs and zero-downtime rollouts on Kubernetes.
- Upgrades in the docs (opens in a new tab): full state machine, air-gapped mirrors and downgrade procedure.
Product names in this article belong to their owners and are used only to name the software and services involved. Kaeso is not affiliated with or endorsed by them.
By Kaeso Team


