Skip to content

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
A bright gradient of orange and yellow, in upright folds like a curtain, with a warm light in one corner

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.

The organization Overview in Kaeso 0.7.0 showing the running release version 0.7.0 with its release artworkThe organization Overview in Kaeso 0.7.0 showing the running release version 0.7.0 with its release artwork
Fig. 01Kaeso checks for signed releases every 5 minutes and updates from Instance › Updates or in an automatic maintenance window.

Check your settings before you restart: kaeso config check

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 check

Or 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 check

It 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 least 5m (such as 1h or 6h)
  • 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) without KAESO_SMTP_PASSWORD
    What 0.6.0 did
    Sent mail without authentication when the password was missing
    What 0.7.0 requires
    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 console

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:

  1. Verify the release signatures. The updater verifies release.json and image attestations against Kaeso's Release workflow (logicplanes/kaeso/.github/workflows/release.yml on refs/heads/prod). If verification fails, nothing is touched.
  2. Pull images and pre-check settings with the new gateway. After downloading the new kaeso-gateway, kaeso-console and kaeso-updater images, the updater runs the new gateway's configuration check against your current .env, compose.override.yaml and KAESO_CONFIG file. If 0.7.0 spots KAESO_KPMR_INTERVAL=1m or an SMTP user without a password, the update stops right here with Not installed, restores compose.yaml, names the setting and how to fix it, and your 0.6.0 gateway never stops running.
  3. Switch 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_error for OpenAI, 529 overloaded_error for Anthropic Messages and System One, 503 UNAVAILABLE for Gemini, 503 service_unavailable for ElevenLabs, and a self-refreshing status page for browser visitors — so standard SDKs wait and retry automatically.
  4. Run forward-only migrations. The new gateway runs database migrations at startup and has up to 10 minutes to pass /readyz.
  5. Roll 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 -previous containers so you can inspect docker compose logs gateway or restore your pre-upgrade pg_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 (or KAESO_UPDATER_TOKEN_FILE via Compose secrets), and passes only a target version string.
  • The updater talks to docker-proxy, which restricts API methods, paths, and bind-mount sources to KAESO_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-updater to install.sh (or omit COMPOSE_PROFILES=updater) and update with sh install.sh --update.

Updating with the installer, by hand or with Helm

  • With the installer: Run sh install.sh --update --version 0.7.0 in /opt/kaeso. Like the console updater, it verifies compose.yaml against release.json and 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/prod and sha256sum -c on compose.yaml before docker 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 exact helm upgrade command instead). Upgrade with helm upgrade kaeso oci://ghcr.io/logicplanes/charts/kaeso --version 0.7.0 --namespace kaeso --reset-then-reuse-values --wait as covered in Deploy Kaeso on Kubernetes with the Helm chart.

Next steps

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

On this page

Own the gateway.Own the record.

curl -fsSLhttps://kaeso.app/install.sh | sh