AI AdminPanel Documentation

Upgrade & Uninstall

Before changing the installation

Record the running version and keep a restorable backup of the panel, Keycloak and AI gateway (litellm) databases, application data, installation configuration, and secrets. A panel database dump alone does not cover service volumes, OpenBao, or its unseal material. See Backup and Restore and the repository runbook docs/runbooks/openbao.md. Review the target release notes and plan an interruption for all tenants using this panel.

The local AI engine starts on demand (AI-2746)

New installations no longer download or start the bundled Ollama; the first local model pull on AI Models does. On an existing server nothing changes: when the update finds the aiadminpanel_ollama container, it backs up .env to update/env.pre-ollama-profile-<time> and adds COMPOSE_PROFILES=ollama, so Compose keeps pulling and running the engine. If you run docker compose by hand, run it from the installation directory so it reads that .env. See The local AI engine starts on demand.

Container log rotation (AI-2082)

From this release, docker-compose.yml caps the log of every panel container at five files of 10 MB each (see Checking logs). The update recreates each panel container once to apply it, so plan the usual short interruption. The logs of the old containers are removed with them, so save any you still need first.

Apps you deploy get the same limit (AI-2086), but Docker reads a container's log settings only when the container is created. An app that is already running keeps unlimited logging until its next Redeploy, which recreates its containers with the limit and removes their old log. Redeploy the noisiest apps first. A restart does not apply it. See Container logs.

Before upgrading: PostgreSQL 18

From this release the bundled database (aiadminpanel_postgresql) runs PostgreSQL 18.7 instead of 16.16 (AI-2653). The panel, Keycloak and the AI gateway (litellm) all keep their databases on it. A new major version cannot read the files of an older one, so the update moves the data across with a dump and a restore. Update now does all of it once the host updater is this release's (see Updating without the in-product update); plan a few minutes of downtime (longer for large databases), during which the panel, sign-in and the AI gateway are stopped.

What the update does, in order:

  1. It checks the server first: the version of the data, and the free space. The volume needs room for two copies of the databases plus 512 MB, and /opt/aiadminpanel/backups room for one compressed dump. If either check fails, or the data is newer than 18, the update stops before anything changes and says why.
  2. It takes the usual pre-update dumps of the panel, Keycloak and gateway databases.
  3. It stops the panel, Keycloak and the gateway, counts the rows of every table, and dumps every database and role with the PostgreSQL 18 client into /opt/aiadminpanel/backups/postgres-16-to-18-<time>/dumpall.sql.gz (readable by root only).
  4. It stops PostgreSQL 16 and moves its files, inside the same volume, to /var/lib/postgresql/16/docker. Nothing is deleted.
  5. It creates a new PostgreSQL 18 cluster in the volume, restores the dump into it, and counts the rows again. Only when every count matches does the new cluster take its final place (/var/lib/postgresql/18/docker, the location the PostgreSQL 18 image expects).
  6. It starts the new release and waits for it to report healthy.

If any step from 3 on fails, or the new release does not become healthy, the update puts the PostgreSQL 16 files back where they were, restores the previous docker-compose.yml and starts the previous release on its own data. The result says rolled back.

New clusters have data checksums turned on, the PostgreSQL 18 default. Passwords stay SCRAM; no account needs a new password.

After a successful upgrade

The PostgreSQL 16 files stay in the volume until you remove them, so you can still go back. Once the panel has run well for a few days, free the space:

docker exec aiadminpanel_postgresql du -sh /var/lib/postgresql/16   # what you will free
docker exec aiadminpanel_postgresql rm -rf /var/lib/postgresql/16

Keep the dump folder under /opt/aiadminpanel/backups/postgres-16-to-18-<time>/ as long as your backup policy asks; it holds every database and role from before the upgrade.

Updating without the in-product update

The upgrade lives in the host updater of this release. A server updates with the updater it already has, and no released updater refreshes itself yet (AI-1471, AI-2725). So on a server installed with 2.29.0 or older, Update now to this release ends in rolled back: the old updater starts PostgreSQL 18 on the 16 files, 18 refuses them, and the previous release comes back on its untouched data. Run the manual refresh with this release's installer once first, then Update now. Servers installed with this release or later start on PostgreSQL 18 and need none of this.

A plain docker compose pull && docker compose up -d with the new docker-compose.yml does not upgrade the data. PostgreSQL 18 then refuses to start ("there appears to be PostgreSQL data in …") and changes nothing, so no data is at risk, but the panel stays down until you put the previous docker-compose.yml back (/opt/aiadminpanel/backups/docker-compose.yml.pre-update-<time>) and run docker compose up -d, or update through the panel instead.

When the update reports that nothing was started

Two results need you to act: the old data could not be put back automatically, and the previous update run was interrupted while it upgraded PostgreSQL (for example a reboot in the middle). The updater then starts nothing and leaves everything as it found it. As root, see where the PostgreSQL 16 files are:

cd /opt/aiadminpanel
docker compose stop
docker run --rm -v aiadminpanel_postgres_data:/v alpine sh -c 'ls /v; ls /v/16/docker 2>/dev/null | head -3'
  • PG_VERSION is listed directly under /v: the 16 files are still in their old place.

  • PG_VERSION is listed under /v/16/docker: move them back. This removes the half-built 18 cluster in /v/18, never the 16 files:

    docker run --rm -v aiadminpanel_postgres_data:/v alpine sh -ec '
      test -f /v/16/docker/PG_VERSION; test ! -e /v/PG_VERSION; rm -rf /v/18
      cd /v/16/docker; for e in * .[!.]* ..?*; do [ -e "$e" ] && mv "$e" /v/; done
      rmdir /v/16/docker /v/16; test -f /v/PG_VERSION'
    

Then start the previous release on its own data: copy the newest backups/docker-compose.yml.pre-update-<time> over docker-compose.yml, set PANEL_VERSION in .env to the release that ran before, run docker compose up -d, and remove /opt/aiadminpanel/.update-work/pg-upgrade.state. Update now then tries again. If neither location holds PG_VERSION, stop and restore from the dump in backups/postgres-16-to-18-<time>/dumpall.sql.gz or from your last backup (see Backup and Restore).

Before upgrading past the portal ownership change

From this release the panel decides "which customer does this login act for" in one way: it is the customer of the organization the login's permissions come from, which is its oldest organization-wide membership. Each portal page also needs a right there. This applies to the Secrets page and its API (AI-580) and to every portal page (AI-1096): view secrets or manage secrets for API keys, MCP tokens and the AI settings, view services for the dashboard and service pages, start/stop services for the action buttons, manage services for the data export. Before, the portal accepted any membership row, whatever its role, and checked no right at all.

The upgrade changes no data. It never adds or removes a membership. Run the read-only queries below against the panel database before upgrading; each is a single SELECT.

1. Logins whose organization is not their customer's

Expect no rows.

WITH logins AS (
    SELECT c.id AS customer_id, c.user_id, true AS is_primary
    FROM customers c WHERE c.user_id IS NOT NULL
    UNION
    SELECT o.customer_id, m.user_id, false
    FROM organization_members m
    JOIN organizations o ON o.id = m.organization_id
    WHERE o.customer_id IS NOT NULL
      AND NOT EXISTS (SELECT 1 FROM customers c WHERE c.id = o.customer_id AND c.user_id = m.user_id)
)
SELECT CASE
           WHEN l.is_primary AND ho.customer_id IS NOT NULL THEN '1 primary login, older membership on another customer: acts for that customer instead'
           WHEN l.is_primary AND home.organization_id IS NOT NULL THEN '1 primary login, older membership on a reseller or platform organization: acts for that organization instead'
           WHEN l.is_primary THEN '2 primary login without an organization-wide membership: check'
           WHEN ho.customer_id IS NOT NULL THEN '3 login of two customers: sees only the older one'
           WHEN home.organization_id IS NOT NULL THEN '4 staff with an extra membership on this customer: refused by design'
           ELSE '5 project-only member: check'
       END AS category,
       l.customer_id, l.user_id, home.organization_id AS home_org, ho.customer_id AS home_org_customer
FROM logins l
LEFT JOIN LATERAL (
    SELECT m.organization_id
    FROM organization_members m
    WHERE m.user_id = l.user_id AND m.project_id IS NULL
    ORDER BY m.created_at, m.id::text
    LIMIT 1
) home ON true
LEFT JOIN organizations ho ON ho.id = home.organization_id
WHERE ho.customer_id IS DISTINCT FROM l.customer_id
ORDER BY category, l.customer_id, l.user_id;

What each category means and what to do:

  1. Primary login, older membership elsewhere. The account that owns a customer was a member of another organization first. After the upgrade it sees that older organization's customer in the whole portal (or "customer profile not found", if that organization has none), and it cannot be impersonated. To restore it, remove the older membership (Organizations → Users on that organization). If the user needs both, use a separate login for the other organization. One login acts for one organization; that is a limit of this release, not a temporary state.
  2. Primary login without an organization-wide membership. See query 2 below; these logins are locked out of the portal until you repair them.
  3. Login of two customers. It acts for the older one. If it should act for the listed one, remove the older membership or use two logins. Note that changing a member's role replaces its membership row with a new, younger one, so a role change on the older organization can move such a login to the other one.
  4. Staff with an extra membership on this customer. A reseller or platform member that was also added to the customer. When the extra membership is the younger one, it no longer opens this customer's portal or secrets; they keep reaching the customers below their own organization through the admin pages. That is the defect being closed. When the extra membership is the older one, the customer is their home and they act there with what they hold on it and above it.
  5. Project-only member. A membership on one project is not an organization-wide membership. Such a member gets "customer profile not found" in the portal, and opens through single sign-on only the apps of its own project. Add an organization-wide membership if this member should use the portal.

2. Main logins that will be locked out until repaired

SELECT c.id AS customer_id, o.id AS org_id, c.user_id, u.role AS coarse_role,
       (SELECT count(*) FROM organization_members x WHERE x.user_id = c.user_id AND x.project_id IS NULL) AS other_org_wide_rows
FROM customers c
JOIN organizations o ON o.customer_id = c.id
JOIN users u ON u.id = c.user_id
WHERE NOT EXISTS (SELECT 1 FROM organization_members m
                  WHERE m.user_id = c.user_id AND m.organization_id = o.id AND m.project_id IS NULL)
ORDER BY c.id

Each row is a customer whose main login has no organization-wide membership on the customer's own organization. After the upgrade that login gets "customer profile not found" in the whole portal, cannot open the customer's apps through single sign-on and gets no live updates, and the customer cannot be impersonated. Customers created by a released version always have this membership; a row here means the customer was created by a pre-release build in mid-June 2026, or someone removed the login from the organization later. The database cannot tell the two apart, so decide per row:

  • It was never there (the customer has always worked through this login): repair it.
  • It was removed on purpose: do not repair. Give the customer another main login.

To repair one customer, copy its customer_id from the query into this statement and run it in a transaction. The statement takes that one id and checks the rest itself: it can only add the customer's recorded main login, only if that account has the customer role, only on a customer organization, and only if the membership is missing. A mistyped id inserts nothing.

BEGIN;
INSERT INTO organization_members (user_id, organization_id)
SELECT c.user_id, o.id
FROM customers c
JOIN organizations o ON o.customer_id = c.id AND o.org_type = 'customer'
JOIN users u ON u.id = c.user_id AND u.role = 'customer'
WHERE c.id = '<customer_id from query 2>'
  AND NOT EXISTS (SELECT 1 FROM organization_members m
                  WHERE m.user_id = c.user_id AND m.organization_id = o.id AND m.project_id IS NULL);
-- must report: INSERT 0 1   (INSERT 0 0: wrong id, or not repairable this way)
COMMIT;   -- or ROLLBACK

What the repair grants. The membership gives that login the Customer role on the organization on every page and API route, not only the portal: services, projects, and secrets including reveal. Every API key that login created becomes as strong as the login again. The account is marked as belonging to a tenant for good. To undo it, remove the user under Organizations → Users.

If other_org_wide_rows is not 0, the repair is not enough: the new membership is the youngest, so the login still acts for the older organization (category 1 above). Remove the other membership or use a separate login.

3. Keys and tokens that should not exist

The upgrade stops members without the right from creating or revealing credentials. It does not revoke what they already hold. These two queries list it; nothing is revoked automatically.

Active API keys and MCP tokens whose creator does not hold "manage secrets" at that organization today. Review each with the customer and revoke it unless it is wanted. An MCP token in this list still controls the customer's services through the MCP endpoint, whoever created it.

WITH manage AS (
    SELECT DISTINCT m.user_id, b.id AS org_id
    FROM organizations b
    JOIN organizations a ON b.path LIKE a.path || '%'
    JOIN organization_members m ON m.organization_id = a.id AND m.project_id IS NULL
    JOIN roles r ON r.id = COALESCE(m.role_id,
         CASE WHEN a.org_type = 'customer' THEN (SELECT id FROM roles WHERE name = 'Customer') END)
    JOIN role_permissions rp ON rp.role_id = r.id
    JOIN permissions p ON p.id = rp.permission_id AND p.name = 'secrets.manage'
)
SELECT CASE WHEN k.scopes ? 'mcp' THEN 'mcp token' ELSE 'api key' END AS kind,
       b.customer_id, k.id AS key_id, k.name, k.prefix, k.user_id AS creator, k.created_at, k.last_used_at
FROM api_keys k
JOIN organizations b ON b.id = k.org_id
WHERE k.revoked_at IS NULL AND (k.expires_at IS NULL OR k.expires_at > now())
  AND NOT EXISTS (SELECT 1 FROM manage g WHERE g.user_id = k.user_id AND g.org_id = k.org_id)
ORDER BY b.customer_id, k.created_at

Audited actions by someone who does not hold "manage secrets" at that organization today:

WITH manage AS (
    SELECT DISTINCT m.user_id, b.id AS org_id
    FROM organizations b
    JOIN organizations a ON b.path LIKE a.path || '%'
    JOIN organization_members m ON m.organization_id = a.id AND m.project_id IS NULL
    JOIN roles r ON r.id = COALESCE(m.role_id,
         CASE WHEN a.org_type = 'customer' THEN (SELECT id FROM roles WHERE name = 'Customer') END)
    JOIN role_permissions rp ON rp.role_id = r.id
    JOIN permissions p ON p.id = rp.permission_id AND p.name = 'secrets.manage'
)
SELECT l.created_at, l.action, COALESCE(l.details->>'kind', 'rest') AS door,
       org.id AS org_id,
       CASE WHEN l.action = 'api_key.reveal' THEN l.resource_id END AS revealed_key_id,
       l.details->>'name' AS minted_name, l.actor_id
FROM audit_logs l
JOIN organizations org ON org.id = COALESCE(
         CASE WHEN l.details->>'orgId' ~ '^[0-9a-fA-F-]{36}$' THEN (l.details->>'orgId')::uuid END,
         (SELECT o.id FROM organizations o WHERE o.path = l.organization_path))
WHERE l.action IN ('api_key.reveal', 'api_key.create',
                   'portal.ai_gateway.reveal', 'portal.ai_config.save', 'portal.ai_config.delete')
  AND NOT EXISTS (SELECT 1 FROM manage g WHERE g.user_id = l.actor_id AND g.org_id = org.id)
ORDER BY l.created_at, l.action
  • api_key.reveal: the key in revealed_key_id was shown to that user. Rotate it: revoke it and create a new one.
  • api_key.create: listed above as well, if still active.
  • portal.ai_gateway.reveal: the customer's metered-AI key was shown. Rotate it on the customer's AI page.
  • portal.ai_config.save, portal.ai_config.delete: the customer's own AI provider key or endpoint was replaced or removed. Have the customer re-enter the provider key and check the base URL.

Limits of these two queries: they judge by the rights a user holds today, so someone demoted since is listed and someone promoted since is not. The second sees only what the audit log still holds, and it needs the background attribution of older audit rows to have finished (it runs after the first start of a version with organization-attributed audit rows). Creating or rotating the metered-AI key writes no audit row, so if the second query lists anything for a customer, rotate that customer's metered-AI key too. Keys created by a platform administrator for a top-level customer are listed by the first query although they are legitimate.

4. Two things that would lock out ordinary logins

Expect no rows from either.

SELECT need.name
FROM (VALUES ('secrets.view'), ('secrets.manage'), ('services.view'), ('services.start_stop'), ('services.manage')) AS need(name)
WHERE NOT EXISTS (SELECT 1 FROM roles r
                  JOIN role_permissions rp ON rp.role_id = r.id
                  JOIN permissions p ON p.id = rp.permission_id
                  WHERE r.name = 'Customer' AND p.name = need.name)

A row means the built-in Customer role on this installation no longer holds a right the portal pages need (someone edited the role). Every ordinary customer login would lose the pages that need it. Restore the right under Settings → Roles, or accept it knowingly.

SELECT o.customer_id, o.id AS org_id, o.org_type, m.user_id
FROM organization_members m
JOIN organizations o ON o.id = m.organization_id
WHERE m.role_id IS NULL AND m.project_id IS NULL AND o.customer_id IS NOT NULL AND o.org_type <> 'customer'
ORDER BY o.customer_id, m.user_id

A row is a login without a role on an organization that carries a customer record but is not a customer organization. The built-in Customer role applies to role-less logins of customer organizations only, so these logins hold nothing and are refused. Give them a role.

Before upgrading: the panel's Valkey moves to 9.2

From this release the panel's cache and message bus (aiadminpanel_valkey) runs Valkey 9.2.0 instead of 8.1.12. Nothing to do before the update: Valkey 9.2 reads the data file 8.1 wrote, so sign-in sessions, revoked tokens and rate-limit counters survive the restart.

Going back is different. Valkey 8.1 cannot read the file 9.2 writes and stops at start with Can't handle RDB format version 81. The updater takes care of this when it rolls the update back:

  • Before it changes anything, it saves 8.1's data and keeps a copy in /opt/aiadminpanel/backups/valkey-8-pre-update-<time>.rdb (readable by root only, because it holds sign-in sessions). If it cannot take that copy, it refuses the update and changes nothing.
  • If the new release does not become healthy, it starts Valkey 8.1 once with --rdb-version-check relaxed, which rewrites the data in the 8.1 format, and only then starts the previous release. Nothing is lost.
  • Valkey calls the relaxed start best effort: it gives up on data it does not know. Then the updater puts the copy from before the update back instead, and keeps 9.2's file in the volume as dump.rdb.valkey9-<time>. Sign-ins and token revocations made since the update are lost in that case, so some people sign in again; the update log says when this happened.

If you go back by hand (you pin 8.1 again yourself), start the old Valkey once with the relaxed check, then remove the flag after it is healthy:

cd /opt/aiadminpanel
docker compose stop valkey
docker compose run -d --name aiadminpanel_valkey_relaxed valkey valkey-server --save 60 1 --rdb-version-check relaxed
docker exec aiadminpanel_valkey_relaxed valkey-cli save   # rewrites the file in the 8.1 format
docker rm -f aiadminpanel_valkey_relaxed
docker compose up -d valkey

If the relaxed start stops with an error, put the copy the updater kept back as dump.rdb in the valkey_data volume (Valkey stopped), then start it normally. Deleting dump.rdb also gets Valkey running, but everyone then signs in again and revoked tokens are forgotten until they expire, so use it only as the last resort.

Before upgrading: the bundled AI gateway moves to LiteLLM 1.108.4

From this release the bundled AI gateway (aiadminpanel_litellm, served at ai.<domain>/v1) runs LiteLLM v1.108.4 instead of v1.83.14-stable. Release 2.27.0 moves it on to v1.108.6, which fixes a further high-severity advisory, a later release to v1.108.13, and the next to v1.108.15, the newest patch on the same LTS line (no database change between 1.108.13 and 1.108.15). The steps below are the same for each version. One upstream change in v1.108.15: a model of a JSON-configured provider without an API key now gets 401; the bundled ollama_chat/ model is not affected, but a model you added for such a provider needs api_key set. One upstream change since v1.108.7: a Responses API call that sends Responses-only fields such as max_tool_calls to a provider bridged through chat completions is now refused instead of silently dropped; set drop_params: true or stop sending those fields. The old version is affected by critical LiteLLM security advisories that let a caller bypass the gateway's key check (AI-2110). Your litellm-config.yaml, models, virtual keys and budgets need no change.

On its first start the new gateway updates its own database tables (the litellm database on the panel's PostgreSQL). This takes a few seconds, and AI requests through the gateway fail until the container reports healthy. Running the old image on the updated tables is not tested, so keep a dump to roll back. An in-product update dumps the gateway's database before it changes any image (/opt/aiadminpanel/backups/litellm-pre-update-<time>.sql.gz, AI-2221), and the nightly backup set holds litellm.sql.gz. An update run by hand instead takes no such dump, so dump it yourself first:

cd /opt/aiadminpanel
docker exec aiadminpanel_postgresql pg_dump -U aiadminpanel -d litellm | gzip > "backups/litellm-before-1.108.4-$(date +%F).sql.gz"

To roll back, stop the gateway, restore the dump into an empty litellm database and start the previous image:

cd /opt/aiadminpanel
docker compose stop litellm
docker exec aiadminpanel_postgresql psql -U aiadminpanel -d postgres -v ON_ERROR_STOP=1 \
  -c "DROP DATABASE IF EXISTS litellm WITH (FORCE)" -c "CREATE DATABASE litellm"
gunzip -c backups/litellm-pre-update-<time>.sql.gz | docker exec -i aiadminpanel_postgresql \
  psql -U aiadminpanel -d litellm -v ON_ERROR_STOP=1 >/dev/null

Before upgrading: every panel staff login holds a role (AI-2675)

From this release a panel staff login can do exactly what its role on the panel's own organization allows, and a panel staff login without a role can do nothing (see Panel staff roles). Until now a panel login without a role had full access.

The upgrade keeps everyone's access: it gives the built-in Owner role to every panel staff login that has no role yet, which is the full access it had. That covers the administrator who installed the panel and every invited panel colleague. Panel staff that already hold a role keep exactly that role, and nobody else gets anything. Nothing for you to do; the panel log records how many logins received Owner.

This read-only query lists the panel staff logins that the upgrade will make Owner:

SELECT u.email
FROM users u
WHERE u.role = 'admin' AND u.deactivated_at IS NULL
  AND NOT EXISTS (SELECT 1 FROM organization_members m
                  JOIN organizations o ON o.id = m.organization_id
                  WHERE m.user_id = u.id AND o.org_type = 'platform' AND m.role_id IS NOT NULL)
  AND (EXISTS (SELECT 1 FROM organization_members m
               JOIN organizations o ON o.id = m.organization_id
               WHERE m.user_id = u.id AND o.org_type = 'platform' AND m.project_id IS NULL)
       OR (NOT u.tenant_bound
           AND NOT EXISTS (SELECT 1 FROM organization_members m WHERE m.user_id = u.id)))
ORDER BY u.email;

After the upgrade the panel's own organization always keeps one active Owner, like a reseller: the last one cannot be removed, given a lesser role or deactivated. Rolling back to the previous release removes exactly the Owner roles the upgrade added.

Before upgrading: MCP tokens that start honouring their deny list

From this release the tenant MCP endpoint refuses a tool when the token's deny list names the permission the tool needs (see What a token is refused). Until now it ignored the deny list. Tokens created on Portal → MCP Tokens have an empty deny list and are not affected. The ones that change are tokens whose deny list an earlier upgrade filled in because their creator held less than the Customer role, and tokens created through the API with a deny list:

  • a creator with a weaker role (for example User) keeps list_services and get_service_status and loses logs, start/stop/restart, redeploy, template deploy and usage;
  • a creator who had left the organization before that earlier upgrade loses every tool except health. The agent or MCP client using such a token stops with permission_denied.

This read-only query lists every active MCP token with a deny list, with whether its creator still holds any membership on the token's organization or an organization above it:

SELECT k.id, k.name, k.prefix, k.org_id, k.last_used_at, k.permissions_deny AS denied,
       EXISTS (SELECT 1 FROM organization_members m
               JOIN organizations a ON a.id = m.organization_id
               WHERE m.user_id = k.user_id AND o.path LIKE a.path || '%') AS creator_still_member
FROM api_keys k
JOIN organizations o ON o.id = k.org_id
WHERE k.revoked_at IS NULL AND (k.expires_at IS NULL OR k.expires_at > now())
  AND k.scopes ? 'mcp'
  AND jsonb_array_length(CASE WHEN jsonb_typeof(k.permissions_deny) = 'array'
                              THEN k.permissions_deny ELSE '[]'::jsonb END) > 0
ORDER BY k.last_used_at DESC NULLS LAST;

Each token loses the tools whose permission is in denied. A row with creator_still_member = false usually has the whole Customer role in denied and is refused every tool. last_used_at shows which are in use. To keep an integration running, have a member with the Customer role create a new token on Portal → MCP Tokens before upgrading, and revoke the old one.

Before upgrading: apps that start private, and the panel's lock address

From this release, four catalog apps start private when they are deployed: BookStack, Umami, WordPress and Gitea. BookStack and Umami begin with an admin password that is printed in their manuals; WordPress and Gitea make whoever opens the page first the administrator. A private app can only be opened by a browser that is signed in to the panel. Its owner finishes the setup and then clicks Make public on the service page. See Apps that start private.

Three things to do around this update.

1. Change default passwords on apps that already run

The update does not lock, restart or change any app that is already deployed. An existing BookStack that still accepts admin@admin.com / password, or an existing Umami that still accepts admin / umami, is as exposed after the update as before. Sign in to each of them and change the password now. For an existing WordPress or Gitea, make sure its installation wizard was completed by you.

2. Check PANEL_INTERNAL_URL

The lock works like a doorman: before the proxy lets a visitor through to a locked app, it asks the panel at the address in PANEL_INTERNAL_URL. This also protects Hermes and IronClaw. Three things set it: the installer writes it into a new .env; the host updater adds it to an existing .env that has no value for it (AI-1213; the host's aap-update.sh must be from that release or later, see Refresh the host updater); and since AI-1361 docker-compose.yml itself falls back to http://aiadminpanel_panel:8080 when .env has no value or an empty one. An installation started with this release's docker-compose.yml therefore always has it, unless .env points it somewhere else.

Without the address there is no doorman. Earlier releases then deployed the app open and said nothing. This release refuses instead: deploying, redeploying, moving or re-routing an app that must be locked fails, before anything is stopped, with

this app must be locked but PANEL_INTERNAL_URL is empty, so nothing was changed. Add PANEL_INTERNAL_URL=http://aiadminpanel_panel:8080 to /opt/aiadminpanel/.env, then run docker compose up -d --no-deps --force-recreate panel in /opt/aiadminpanel (with -f docker-compose.yml -f docker-compose.gpu.yml after docker compose if that file exists) and deploy again

and the panel logs an error at every start while the setting is empty. Containers that are running keep running.

Check, without changing anything:

grep '^PANEL_INTERNAL_URL=' /opt/aiadminpanel/.env

It must print PANEL_INTERNAL_URL=http://aiadminpanel_panel:8080, or nothing (then the docker-compose.yml default applies). If it prints PANEL_INTERNAL_URL= with no value on a panel started from an older docker-compose.yml, or the panel log reports the setting as empty:

cd /opt/aiadminpanel
echo 'PANEL_INTERNAL_URL=http://aiadminpanel_panel:8080' >> .env
docker compose up -d --no-deps --force-recreate panel

Add -f docker-compose.yml -f docker-compose.gpu.yml after docker compose in the last command if docker-compose.gpu.yml exists. Then redeploy every Hermes or IronClaw service that was deployed while the setting was missing: it has been running without its lock, and only a redeploy adds it.

3. Know what "private" refuses

While an app is private, the panel lets in only a browser that carries the panel's Keycloak sign-on session and may see that service. Everything else gets 401: visitors who are not signed in (they see a short JSON error, not a login page), Git clients, webhooks, API keys, and a session from the old password login. On an installation whose app domain is not under the panel domain, the browser does not send the sign-on cookie to the app at all, so even the owner gets 401 there. Such an owner can only click Make public first and set the app up immediately afterwards; for WordPress and Gitea that gives no protection.

Rolling back past the private-apps update

This release adds two columns to the services table (migration 000073). The panel applies migrations from its own files at start and stops when the database is at a version it has no file for. The previous image has no file for 000073, so it is expected to refuse to start against the updated database. Order matters:

  1. While the new version is still installed, undo the migration. Either run its down step with the new image's migration files, or by hand:

    ALTER TABLE services DROP COLUMN IF EXISTS owner_gate_reason, DROP COLUMN IF EXISTS owner_gate;
    UPDATE schema_migrations SET version = 72, dirty = false WHERE version = 73;
    
  2. Then start the previous image.

If a later release has added further migrations, undo them highest number first. Apps that are still private at that point keep their lock, because it is part of the running container, and the previous version has no Make public button: redeploy such a service to unlock it, or update again.

Before upgrading: every new app starts private

From this release every app you deploy starts private, not only BookStack, Umami, WordPress and Gitea: catalog templates, Compose, Git repositories and AI Deploy alike. Only a browser signed in to the panel can open a new app until its owner clicks Make public on the service page. The reason: Uptime Kuma, n8n and many other apps hand their admin account to the first visitor, and a freshly deployed Uptime Kuma was found offering that to anyone on the internet. See App Access.

What it means for you:

  • Apps that already run keep their current state. Nothing is locked, restarted or redeployed by the update. A public app stays public.
  • PANEL_INTERNAL_URL is now needed for every deploy, not only for the apps above. docker-compose.yml now supplies http://aiadminpanel_panel:8080 when .env has no value, so a standard installation needs nothing. If the panel still sees it empty, every new deploy and every redeploy of a private app is refused with the message shown in step 2 of the previous section, which says exactly what to set and run.
  • Automation that deploys an app and then calls it from outside (a script, a webhook sender, a monitoring push) gets 401 until the app is made public. Make it public once it is set up, or call it from another app of the same customer, which reaches it over that customer's private network.

There is no database change in this step, so rolling back needs nothing beyond what the previous section says. After a rollback, apps deployed while this release ran stay private and the previous version still offers Make public for them (its notice may describe the reason as "the first visitor becomes administrator"). A Git-built app comes up public with its next redeploy, because the previous version does not lock Git-built apps.

Before upgrading: check which containers the hardening baseline will change

Releases that include the container hardening baseline apply it to every container the panel starts: capability drops (no raw network sockets) and no-new-privileges (a setuid program such as sudo cannot raise privileges). Earlier releases applied it only to containers deployed from a catalog template. Git deployments, pasted Compose files without their own settings, and containers recreated by a subdomain change had none.

The upgrade does not touch running containers. A container gets the baseline the next time it is created: a Git push or deploy, a redeploy, a secret rotation, or a move to another customer. Several of those can be triggered by the customer, so an application that cannot run under the baseline can be broken by its own customer rotating a secret, not only by you.

Run this on the host before upgrading. It only reads:

docker ps -aq --filter label=aiadminpanel.managed=true | xargs -r docker inspect --format \
  '{{.Name}} user={{.Config.User}} cap_drop={{.HostConfig.CapDrop}} security_opt={{.HostConfig.SecurityOpt}}'
What you seeMeaning
security_opt contains no-new-privileges:true and cap_drop is not emptyAlready has the baseline; the next recreate changes nothing
security_opt is empty and user is not rootAt risk. If the image uses sudo, su or another setuid helper at start, it fails after its next recreate
security_opt is empty and user is empty (root)Gets the baseline at the next recreate; breaks only if it needs raw sockets (Git services: or creating device nodes, or writing kernel audit records)
security_opt lists anything else (seccomp=…, apparmor=…, no-new-privileges:false outside BookStack)That setting is dropped at the next recreate

There is no per-service override and no way to edit a service's stored Compose. For a Git service, fix the Dockerfile and push; see Git Deployment troubleshooting. For a Compose service, test the image on a non-production host first:

docker run --rm --cap-drop NET_RAW --security-opt no-new-privileges <image>

If it fails, deploy a corrected image as a new service and move the data.

Image build steps are not affected and not restricted: the baseline applies to the container that is started, not to the RUN lines of a Dockerfile.

Before upgrading: Keycloak runs in production mode (AI-2456)

From this update on, the panel's Keycloak starts with start --import-realm instead of start-dev --import-realm. start-dev is Keycloak's development mode: it relaxes the hostname checks, turns the theme cache off, and prints a warning that security scanners report. Partner Center made the same change in August (AI-667).

An in-product update does it: the release's docker-compose.yml replaces the old one and docker compose up -d recreates Keycloak with the new command. Sign-in is unavailable for about a minute while Keycloak starts.

What stays the same (tested by scripts/keycloak-upgrade-test.sh, which starts production mode on a database that development mode created):

  • the realm, its users, passwords, authenticators and sessions. --import-realm imports the realm only into a database that does not have it; on an existing install Keycloak logs Realm 'aiadminpanel' already exists. Import skipped;
  • the sign-in address https://auth.<your domain> and the issuer in tokens;
  • how the panel reaches Keycloak (http://keycloak:8180 on the internal network). Traefik still terminates TLS; Keycloak serves plain HTTP on the Docker networks only.

What changes:

  • KC_HOSTNAME_STRICT: "false" is removed. KC_HOSTNAME already pins the hostname, so a forged Host or X-Forwarded-Host header cannot change the issuer.
  • Keycloak's container healthcheck passes only when /health/ready answers HTTP 200 (Keycloak is ready), no longer when any part of the answer says UP. At start the panel retries setting up browser sign-in for about a minute; a Keycloak OIDC discovery failed, will retry warning in the panel log during that minute is expected.
  • Keycloak caches its sign-in theme. After you edit files under /opt/aiadminpanel/keycloak-theme by hand, run docker compose restart keycloak. An update replaces that folder with the release's theme (AI-2491); keep your own theme in another folder and make keycloak-theme a symbolic link to it.

On a box whose docker-compose.yml you manage yourself: in the keycloak service, change command: start-dev --import-realm to command: start --import-realm, remove the KC_HOSTNAME_STRICT: "false" line, keep KC_HTTP_ENABLED: "true" (production mode does not start without it, because Keycloak has no certificate of its own), and run docker compose up -d keycloak.

Rolling back. Put start-dev back and run docker compose up -d keycloak. The database is the same in both modes, so nothing is lost.

Before upgrading: Keycloak runs as its own user (AI-2416)

Keycloak's environment holds its first admin password and the panel's database password. Keycloak used to run as uid 1000, the uid its image is built with. Without Docker user-namespace remapping that is uid 1000 on the host as well, which on most cloud images is the first login user (ubuntu, debian, …). That user could read both passwords from /proc/<keycloak pid>/environ while Keycloak ran. Keycloak now runs as uid 10001, group 0, a uid that is no login user, so only root can read that environment.

The release's docker-compose.yml adds two lines to the keycloak service: user: "10001:0" and HOME: /tmp (uid 10001 has no home folder in the image, and kcadm.sh keeps its login there). Keycloak keeps no data on the host; its realm and users stay in Postgres. It reads two host files: keycloak-realm-export.json and the keycloak-theme folder.

The installer and the updater write both as root, readable to everyone (644 and 755), and Keycloak keeps group 0. So on a box where nobody changed them by hand, the update needs nothing extra: docker compose up -d recreates Keycloak under the new uid, and sign-in is unavailable for about half a minute while it starts.

If you changed those files' owner or modes by hand, for example handed them to uid 1000, make them readable before you update: chmod -R go+rX /opt/aiadminpanel/keycloak-realm-export.json /opt/aiadminpanel/keycloak-theme. Keycloak does not start without a readable realm export. An unreadable theme only costs the branded sign-in page: Keycloak then uses its default theme.

The host updater of this release and later does that check itself, before it puts a docker-compose.yml with the new uid in place. A box runs the updater it was installed with until install.sh --refresh-updater replaces it (see In-product updates), so the first update to this release may still be applied by the older one. The new updater:

  • adds read on files and read and enter on folders, only where it is missing, so a second run changes nothing; a keycloak-theme folder that belongs to another user is handed to root first;
  • leaves alone a path that is a symbolic link, a theme folder that other users can write, and a file with more than one hard link, with a WARNING line in the journal (journalctl -u aap-updater);
  • stops the update before anything is recreated if uid 10001 still cannot read the realm export, with the reason a file the new configuration needs couldn't be obtained. Run the chmod above (on a symbolic link, on the file it points to) and update again.

A fresh install needs nothing extra.

On a box whose docker-compose.yml you manage yourself: add user: "10001:0" to the keycloak service and HOME: /tmp to its environment, run the chmod above, then docker compose up -d keycloak.

Rolling back. Remove the two lines and run docker compose up -d keycloak, or roll the panel back to the previous release: its docker-compose.yml starts Keycloak as uid 1000 again. The files stay readable either way. Nothing in the database changes.

Before upgrading: Keycloak 26.0 to 26.8.2

From this update on, the panel ships Keycloak 26.8.2 (it was 26.0), pinned by image digest (AI-2048). The newer Keycloak is what MCP sign-in for claude.ai and ChatGPT builds on: its OAuth features let those apps connect to the MCP server with a login. An in-product update does all of it:

  1. The updater dumps the Keycloak database next to the panel's (/opt/aiadminpanel/backups/keycloak-pre-update-<time>.sql.gz). If the dump fails, the update stops before anything changes.
  2. The release's docker-compose.yml starts the new image. At its first start Keycloak migrates its database in place, which takes under a minute; sign-in is unavailable until Keycloak reports healthy.
  3. Keycloak now runs with KC_FEATURES: recovery-codes,cimd,resource-indicators. cimd (OAuth Client ID Metadata Document) and resource-indicators (RFC 8707) are experimental Keycloak features, enabled on purpose for MCP sign-in. Keycloak refuses to start if a later version renames or removes one, and the panel logs keycloak lacks a feature MCP sign-in needs at start if one is off.

What stays the same (tested against real containers by scripts/keycloak-upgrade-test.sh, which CI runs on every change to Keycloak's files):

  • the realm, its users and their passwords and authenticators;
  • signed-in sessions: a session started on 26.0 keeps working on 26.8.2;
  • the panel's sign-in page and theme (same look);
  • the panel's recovery-code sign-in flow (aap browser, see below).

What changes:

  • Two panel client settings. The shipped realm set a client session idle timeout of 3600 s on panel-frontend and panel-backend, above the realm's 1800 s. Keycloak 26.0 silently used 1800 s; Keycloak 26.8 refuses any client change that keeps it. The panel now removes that client setting when it is above the realm's, so the clients use the realm's value: the behaviour users had before. A value you set yourself within the realm's limit (with Remember me on, the larger of the realm's two idle timeouts) stays. In 2.26.0 the removal did not take effect: the panel logged keycloak redirect allow-list not applied: … Client session idle timeout cannot exceed realm SSO session idle timeout every 30 seconds and the sign-in addresses stayed *. The next release fixes it; nothing to do by hand after updating.
  • Outgoing mail with STARTTLS. Keycloak 26.8.2 sends nothing unless the STARTTLS upgrade succeeds. If Settings → Email uses STARTTLS against a server that does not offer it, Keycloak mail (password reset, email verification) stops; switch that server to SSL/TLS or to no encryption on a trusted network.
  • Compose admin variables. The keycloak service now uses KC_BOOTSTRAP_ADMIN_USERNAME and KC_BOOTSTRAP_ADMIN_PASSWORD (Keycloak deprecated KEYCLOAK_ADMIN*). They only create the admin on an empty database; your existing admin and .env stay as they are.
  • Your own scripts against Keycloak's admin API. Keycloak 26.8.2 only accepts admin API tokens that carry the kc-admin-api scope. The panel signs in with Keycloak's built-in admin-cli client, which Keycloak gives that scope during the upgrade, so the panel needs nothing. A script of yours that uses its own client or service account gets 401 Unauthorized until you add kc-admin-api to that client's client scopes in the Keycloak admin console.

On a box whose docker-compose.yml you manage yourself: set the keycloak service's image to the one in the release's docker-compose.yml, add cimd,resource-indicators to KC_FEATURES, take docker exec aiadminpanel_postgresql pg_dump -U aiadminpanel -d keycloak | gzip > keycloak-before-26.8.sql.gz, then run docker compose up -d keycloak.

Rolling back. Keycloak cannot run an older version on a migrated database. To go back to 26.0, stop Keycloak, restore the keycloak-pre-update-*.sql.gz dump into an empty keycloak database, set the previous image, and start Keycloak. Sign-ins and changes made in Keycloak after the dump are lost.

After upgrading: platform admins set up two-factor, and the sign-in realm is hardened (AI-2521)

--import-realm imports the aiadminpanel realm only when Keycloak first starts, so the panel now applies these settings to the realm itself at every start. A fresh install gets them from the realm export as well. Nothing needs to be done by hand.

  • Platform admins must set up two-factor at their next sign-in. Every platform admin who has no authenticator yet is asked for one right after the password, and the sign-in finishes once it is set up. Nobody is locked out, and open sessions keep working. An admin who deletes their authenticator later, or whose two-factor is reset, is asked again at the next sign-in. The panel checks this every 5 minutes, and only after the setup wizard is finished: the wizard's first admin signs in once without being stopped and sets up two-factor at the sign-in after that. Reseller staff and customers stay optional for now. Tell your platform admins to have an authenticator app ready.
  • Password policy: at least 12 and at most 128 characters, not the username or the email address, and none of the last 3 passwords again. Keycloak checks the policy when a password is set, so existing passwords keep working until their owner next changes one (or an administrator resets it). install.sh now refuses an ADMIN_PASSWORD that does not meet the policy before it changes anything; a generated password always does.
  • No password-only token. The password grant ("Direct Access Grants") is turned off on every client of the aiadminpanel realm, including Keycloak's built-in admin-cli there. It skipped two-factor: a customer's password alone returned a token. Nothing in the panel used it. The panel's own administration token comes from the master realm's admin-cli, which is not touched. A client you added to the realm that signs in with a password stops working and is switched off again at every start: give it the browser sign-in (authorization code with PKCE) or, for a machine, a service account (client credentials).
  • Sign-in and admin events are kept for 90 days (Keycloak admin console, realm aiadminpanel, Events), so failed sign-ins and admin changes leave a trail. Admin event details stay off, because they would store whole objects, the realm's SMTP password included.

The panel log says keycloak realm hardening applied (with what changed) or already in place, and platform admins must set up two-factor at their next sign-in with the emails it asked. keycloak realm hardening not applied or platform admin two-factor not required for every admin is an ERROR with the reason; the panel keeps running and retries.

There is no setting that turns the platform-admin requirement off on a real install. AAP_KEYCLOAK_ADMIN_TWO_FACTOR=optional exists only for the project's CI test runs, whose scripted sign-in cannot set up an authenticator: the panel honours it only when CI=true is also set, and otherwise logs an ERROR and keeps two-factor required. The password policy, the closed password grant and the events have no switch.

Rolling back to an earlier panel leaves the realm settings in place, because an older panel does not change them. To undo them by hand, use the Keycloak admin console (Authentication → Policies → Password policy, the client's Direct access grants, Realm settings → Events, and Users → the user → Required user actions for a pending two-factor setup).

Two-factor recovery codes

From this update on, users can set up two-factor recovery codes on their profile (AI-1457). It needs two things, and an in-product update does both:

  1. Keycloak runs with the feature. The release's docker-compose.yml sets recovery-codes in KC_FEATURES on the keycloak service (a preview feature in Keycloak 26.0, on by default since 26.3), and the update applies it, which restarts Keycloak once. On a box whose docker-compose.yml you manage yourself, add that line under the keycloak service's environment: and run docker compose up -d keycloak. KC_FEATURES is a list: if it already names other features, add recovery-codes to it (docker,recovery-codes) instead of replacing it.
  2. The sign-in flow offers the code. The panel copies Keycloak's built-in browser flow to aap browser, adds Recovery Authentication Code Form next to OTP Form (both Alternative) in its two-factor step and makes the realm sign in with aap browser. Existing users and their authenticators are not touched. The panel does this at start and then checks it every 5 minutes while it runs:
    • It does this only while two-factor is optional, the shipped default: browser's Browser - Conditional OTP is Conditional, with "Condition - user configured" and OTP Form (on a realm created by Keycloak 26.3 or newer: Browser - Conditional 2FA, which also holds "Condition - credential" and Disabled WebAuthn Authenticator and Recovery Authentication Code Form, Keycloak's own shape), and aap browser is step for step what the panel builds from the current browser: the same steps, subflows and requirements, plus only the recovery-code step and the two Alternatives in the two-factor step. Any other edit to aap browser, in any subflow (for example a Required WebAuthn Authenticator in aap browser forms), or a Required two-factor step, means the panel changes nothing at all, not even on the opt-out or without the feature, and logs one ERROR: see Mandatory two-factor.
    • If Keycloak runs without the feature while the realm signs in with aap browser, nobody can sign in, because Keycloak cannot run the recovery-code step. The panel then binds the realm back to browser (if both flows are still optional) and logs an ERROR. This happens at the next check, so after you change KC_FEATURES, restart the panel to repair sign-in at once. When the feature is back, the next check binds aap browser again, if browser is still in its default optional shape.
    • The panel also re-binds aap browser at every check. A rebind to browser by hand does not last; use the opt-out below.
    • Panels that share a database take turns (a database lock), so two panels never change the flows at the same time.

Check the panel log after the update:

  • keycloak two-factor recovery codes enabled: done.
  • keycloak two-factor recovery codes not enabled ... without the recovery-codes feature: Keycloak runs without KC_FEATURES=recovery-codes. The realm signs in with browser (the log says if the panel just bound it back), so sign-in works, without recovery codes. Do step 1, then restart the panel.
  • ... recovery codes are not managed on realms with mandatory two-factor yet (AI-1459): a two-factor step of browser or aap browser is Required. The panel changed nothing; see Mandatory two-factor.
  • ... the realm uses its own browser flow: the realm signs in with a flow chosen by hand, or aap browser differs from what the panel builds from browser (the log names the step). The panel leaves both alone, and the realm's flow works as before. To get recovery codes back, undo the edit or bind a flow by hand.

Mandatory two-factor

This release manages recovery codes only on realms where two-factor is optional. Recovery codes with mandatory two-factor come with AI-1459. Until then, a realm where a two-factor step of browser or aap browser is Required is left exactly as it is: the panel does not bind, copy or change any flow, and logs the ERROR above once.

To require two-factor for everyone on this release, without recovery codes:

  1. Set AAP_KEYCLOAK_RECOVERY_CODES=off in .env and run docker compose up -d panel; check that the realm signs in with browser (Authentication in the Keycloak admin console).
  2. In the browser flow, set Browser - Conditional OTP to Required. A user without an authenticator gets the setup page at the next sign-in.

Do not set aap browser Browser - Conditional OTP to Required: there, OTP Form and Recovery Authentication Code Form are alternatives, and Keycloak 26 then refuses every user without an authenticator ("Invalid username or password"). The panel does not repair it. If it happened, set the step back to Conditional.

If the realm signs in with a mandatory or hand-edited aap browser and Keycloak runs without the feature, every sign-in to the realm fails: the panel leaves the realm on aap browser rather than make sign-in password-only, and the log says every sign-in fails. In this state Keycloak cannot show aap browser's steps (404), so that flow cannot be edited, but the admin console still works (it signs in through the master realm) and browser can be edited. Checked on Keycloak 26.0. Recover in one of two ways:

  1. Preferred: run Keycloak with KC_FEATURES: recovery-codes again (step 1 above) and docker compose up -d keycloak. Everything returns unchanged.

  2. Otherwise, in the Keycloak admin console, open realm aiadminpanel, Authentication:

    1. In the flow list, open the menu on browser and choose Duplicate. Keycloak refuses new steps in the built-in browser itself.
    2. In the copy, add your second-factor step(s) with the requirement you need (for example WebAuthn Authenticator, or set the copy's Browser - Conditional OTP to Required).
    3. Open the menu on the copy, choose Bind flow, choose Browser flow, and Save.

    Binding the built-in browser itself is right only if you accept optional two-factor: anyone without an authenticator then signs in with the password alone. The panel leaves the realm on your copy (a flow chosen by hand), also when the feature is back.

Opting out (AAP_KEYCLOAK_RECOVERY_CODES=off in .env, then docker compose up -d panel): a realm that signs in with aap browser is bound back to browser at start and at every check, if both flows are still optional. The panel changes nothing else, and a realm on any other flow is left as it is. Users then sign in without recovery codes; codes they already have stay in Keycloak unused.

Rolling back (to a panel release before recovery codes, or to drop the feature). Keep this order: removing the feature while the realm still signs in with aap browser locks out every sign-in, and an older panel does not repair it.

  1. Set AAP_KEYCLOAK_RECOVERY_CODES=off in .env and run docker compose up -d panel.
  2. Check the panel log for keycloak two-factor recovery codes turned off, and that Authentication in the Keycloak admin console shows browser as the realm's browser flow. If the log says mandatory two-factor or its own browser flow instead, the realm is still on aap browser. Either undo that edit on aap browser (for example set its Browser - Conditional OTP back to Conditional, which makes two-factor optional) and wait for the next check, or keep two-factor mandatory: duplicate browser (menu on browser, Duplicate), add or require your second factor in the copy (for example its Browser - Conditional OTP Required), then bind the copy (its menu, Bind flow, Browser flow).
  3. Sign in once in a private browser window to confirm sign-in works.
  4. Only now roll the panel back, or remove recovery-codes from KC_FEATURES and run docker compose up -d keycloak.

An older panel's Disable 2FA does not remove recovery codes. After the rollback, if a user turns two-factor off and is asked for a recovery code at sign-in, delete their recovery-authn-codes entry under Users, the user, Credentials.

Before a Keycloak upgrade: Keycloak marks recovery codes as a preview. Check that the new version still has the feature under the same name; if it drops or renames it, every sign-in fails until the panel binds the realm back to browser (or you opt out first). aap browser is a copy made from the Keycloak version that was running when the panel first set it up: changes a later Keycloak makes to its built-in browser flow do not reach the copy. After a Keycloak upgrade, compare the two under Authentication; to start fresh, opt out, delete aap browser, then remove the opt-out and restart the panel, which makes a new copy.

Rolling back past the sign-out update

The release that ends the Keycloak login without a confirmation page (AI-1287) adds the column identity_sessions.id_token (migration 79). After the upgrade, a user's first sign-out may still show Keycloak's "Do you want to log out?" page once, until they have signed in again. The previous image has no file for version 79 and refuses to start, so roll back in this order:

cd /opt/aiadminpanel
docker exec aiadminpanel_postgresql psql -U aiadminpanel -d aiadminpanel -c \
  "ALTER TABLE identity_sessions DROP COLUMN IF EXISTS id_token; UPDATE schema_migrations SET version = 78, dirty = false;"

Use 77 instead of 78 when SELECT version FROM schema_migrations showed 79 and the install never had migration 78. Then start the previous image. Nobody is signed out; sign-out shows Keycloak's page again until the next upgrade.

After upgrading: rotate Git deploy keys entered before v2.13.0

Before v2.13.0 (AI-1130), deploying from Git with a deploy key put that private key into the arguments of the background deploy job, and the database kept it there in clear text, in every backup too. A repository address with a username and token in it (https://user:token@host/...) was kept the same way. This update removes both from the job records already in the database (migration 000173, AI-1138), and the panel has not written them there since v2.13.0. Database backups made before this update still contain them.

If anyone entered a deploy key, or a repository address with a token, on a panel older than v2.13.0:

  1. At the Git host, remove that deploy key from the repository (or revoke the token).
  2. Create a new deploy key, add it to the repository with read access, and enter it with Edit on the service's Git source card.
  3. Delete or re-encrypt database backups from before this update if you no longer need them.

Installs that were first set up on v2.13.0 or later have nothing to do.

After upgrading: customer apps that received the operator's AI key

Before AI-1434, an AI app deployed for a customer without metered AI could receive the operator's own Provider AI key in its environment, where the customer could read it. The update stops that for every new deploy, redeploy and reassignment, but a container that is already running keeps its environment until it is recreated. After upgrading:

  1. Rotate the Provider AI key at your AI provider and save the new one under Settings → AI → AI Providers. That makes any copy in a customer container worthless.
  2. Redeploy the customer AI apps that used Provider AI. They then get the customer's own key or their metered gateway key, or no key, with "AI is not available on this customer's plan" in the deploy progress. Apps deployed with Local AI chosen explicitly keep Local AI.
  3. Check customer AI apps on the automatic source ("Auto"). Before, they ran on the operator's key or fell back to Local AI; after their next redeploy they get no AI key. To keep AI for such an app, either pick Local AI for it explicitly, or turn on metered AI (or let the customer add their own key) and redeploy.

In-product updates

Open Settings → Updates to compare the running version with the available release and read its notes. You can check now, select Stable or Beta, and pin the current version. Stable is the default. Viewing and configuring the channel or pin requires system.update; applying an update requires system.update.apply, which is Admin-only by default.

Update now

Confirm Update now to request an update. The installed host updater:

  1. Validates the target, then downloads the release's signed manifest: a small file that names the exact image and the SHA-256 fingerprint of every file the updater may install, signed by the release run of that version. The updater checks the signature, downloads the release's Compose file and any host file the server is missing, and compares each with the manifest. If the manifest is missing or not valid, or one file does not match, the update stops here and nothing on the server has changed. There is no option to skip this check.
  2. Takes a panel PostgreSQL pg_dump backup, one of the Keycloak database (keycloak-pre-update-<time>.sql.gz) and one of the AI gateway's database (litellm-pre-update-<time>.sql.gz), because a release can move Keycloak or LiteLLM to a version that migrates its database one way. A server without one of those databases skips its dump. A failed backup aborts the update. It retains the three most recent pre-update dumps of each under /opt/aiadminpanel/backups/.
  3. Checks the target image's signature against the release run of exactly the target version, for the image digest the manifest names. Verification failure aborts the update. Then it installs the verified Compose file, preserving the previous one, and the verified host files that were missing. Existing host files are preserved, except the sign-in theme keycloak-theme: a release file nothing on the server edits, so it is replaced by the release's copy when the two differ, and Keycloak is restarted to show it (sign-in pauses for about half a minute). The previous theme is kept as backups/keycloak-theme.pre-update-<time>; a theme folder that is a symbolic link is left alone. A missing secrets/legacy_closed is created empty here (see How the panel stores secrets).
  4. Changes PANEL_VERSION in .env, pulls the image by the digest that was just verified (not by its tag), and applies the Compose stack when configuration changed (otherwise recreating only the panel). It checks panel health through /healthz. Other box-specific .env settings are preserved.
  5. Attempts an image/configuration rollback if the health check fails. The pre-update database backup remains available for operator recovery.
  6. Asks the healthy panel which kinds of stored secret have no value left in the old encryption format, adds each one to secrets/legacy_closed, and restarts the panel once if it added any. A failed health check after that restart rolls back like step 5; the added lines stay.

Releases up to 2.14.3 have no manifest and never get one. Updating to one of them installs the signed image only; the result says "only the panel image was updated" beside "Updated to …", and the Compose file on the server stays as it was. Apply again and --reapply on such a release are refused with "update to a newer release". Every release newer than 2.14.3 must have a valid manifest or is refused; a missing manifest never turns a new release into an image-only update.

An update that was cut off (power loss, a reboot or the updater being stopped before it finished) is reported as failed with "the previous update run was interrupted" when the server next starts the updater, at the latest at boot. The updater does not resume it on its own. Check which version the panel runs, then start the update again.

What the updater downloads comes only from the release's own folder (get.aiadminpanel.com/v<version>/). The copies at the top level of that server follow the development branch and are never used for an update.

Refresh the host updater

Updating the panel image does not replace /opt/aiadminpanel/aap-update.sh. A server installed before the first release with a manifest therefore keeps an updater that does not check the Compose file and the host files at all, however often the panel is updated. Refresh it before you update, with the installer of the first release that has a manifest (<new> below; a newer one is fine too), not with the installer of the release the server runs:

curl -fsSL https://get.aiadminpanel.com/v<new>/install.sh -o /tmp/aap-install.sh
sudo bash /tmp/aap-install.sh --refresh-updater

This writes the updater and its systemd units, (from the release with the nightly vault backup on) the backup scripts and the aap-backup.timer that runs them daily at 03:00 (see Backup and Restore), and (from the release with the container egress guard on) installs and applies that guard, which changes the host firewall (see Turn on the container egress guard). It does not touch the panel, its configuration or its containers. Then update, so that the first update is already a verified one. Updating first still works, but goes through the old unsigned path once more.

From the release that ships the self-refreshing updater on, the refresh waits for a running update or the nightly backup to finish (up to 10 minutes) before it writes the updater, and it replaces each file by rename, so a script that is running is never changed under it. If the wait runs out, it stops without changing anything; run it again once the update or backup is done.

The refresh runs the installer as root, and nothing checks it for you. From the first release after 2.21.0 you can check it yourself first: download install.sh.bundle from the same v<new>/ folder and run the cosign verify-blob command under Verify the installer before running it before sudo bash. Releases up to 2.21.0 publish no installer signature. To return to the previous updater, run the same two commands with an older release, for example v2.14.3. An older installer leaves the backup timer in place; to stop it, run sudo systemctl disable --now aap-backup.timer.

To see whether a server has the verifying updater:

grep -c 'release-manifest.json' /opt/aiadminpanel/aap-update.sh   # 0 means: not yet

The updater refreshes itself

From the release whose release notes announce it, Update now also brings the host updater of the release you update to, so each release is installed by the updater written for it. Servers whose updater is older than that release need the manual refresh above once; after it, they stay current by themselves.

How it works, on the server:

  1. The updater that is installed checks the target release's aap-update.sh, aap-updater.path and aap-updater.service against the release's signed manifest, the same check that protects the Compose file, and test-starts the new script. A release whose manifest names only part of the updater is refused, and nothing is changed.
  2. It keeps its own three files, then puts the new ones in place by renaming them: /opt/aiadminpanel/.update-work/updater-prev/aap-update.sh and /etc/systemd/system/.aap-updater-prev/. Drop-in files under aap-updater.service.d/ (for example a longer HEALTH_CHECK_TIMEOUT) are kept and still apply.
  3. It runs the new updater, which does the update exactly as described above, and waits for it.
  4. If the update does not succeed (it failed, rolled back or stopped), the previous updater is put back at once and the result says so ("updaterRestored": true). The next Update now tries again.

The updater is never replaced by one from an older release than the one installed or the panel release that runs. Going back to an older release with Update now still works; it is applied by the newer updater.

To put the previous updater back by hand, as root:

mv -fT /opt/aiadminpanel/.update-work/updater-prev/aap-update.sh /opt/aiadminpanel/aap-update.sh
mv -fT /etc/systemd/system/.aap-updater-prev/aap-updater.service /etc/systemd/system/aap-updater.service
mv -fT /etc/systemd/system/.aap-updater-prev/aap-updater.path /etc/systemd/system/aap-updater.path
systemctl daemon-reload && systemctl restart aap-updater.path
rm -f /opt/aiadminpanel/.update-work/updater-release

or run --refresh-updater with the versioned installer of the release you want, as above. The updater log shows each step, with the SHA-256 of the old and the new file:

sudo journalctl -u aap-updater.service -n 80 --no-pager | grep -i updater

The panel writes an update request; aap-updater.path and aap-updater.service run the privileged work on the host. The UI result and updater log explain whether an update succeeded, failed, or rolled back. When the result says "pulling or recreating the new image failed", the updater log has Docker's own message, for example a missing file under /opt/aiadminpanel/secrets/:

sudo journalctl -u aap-updater.service -n 50 --no-pager

After success, sign in, check the reported version, and open a deployed application. A health response alone does not verify those journeys.

Automatic updates

Automatic updates are off by default. An administrator with system.update.apply can enable them and select a daily time and timezone. When they are on, an available update installs at that time each day. It takes a database backup first and rolls back automatically if the new version fails its health check. They use the same host updater and backup/signature/health-check path. Pinning prevents automatic updates; a release that rolled back is not retried automatically each night. Check the last run result and notifications after a scheduled update.

Manual image changes (advanced)

The installed Compose file selects ghcr.io/aiadminpanel/ai-admin-panel:${PANEL_VERSION:-latest}. latest follows released versions. An explicit version pins the image; an unreleased main image is a separate channel.

After recording the current tag, making backups, and selecting a compatible released target in /opt/aiadminpanel/.env, run from the installation directory:

cd /opt/aiadminpanel
docker compose pull panel
docker compose up -d --no-deps --force-recreate panel

These commands only change the panel container. They do not perform the host updater's backup, signature verification, Compose reconciliation, or automatic rollback. A panel image from AI-1345 on, started on a Compose file that does not give it secrets/legacy_closed, runs but cannot close the old secret format and warns about it every hour; run aap-update.sh --reapply afterwards (see How the panel stores secrets). Database migrations run when the new panel starts. Preserve any installer-generated Compose overrides and verify login and application access.

Turn on the container egress guard

On most clouds a server can ask a fixed local address, 169.254.169.254 (the "metadata service"), for start-up data and sometimes for cloud credentials. Without the guard a customer's app, or a RUN line in a customer's Dockerfile during a Git build, can ask it too, and can reach services on the server itself, such as SSH on the Docker gateway address. The container egress guard is a small set of host firewall rules that stops both. A new installation sets it up. An existing installation is unprotected until you run the installer's refresh once, as root:

curl -fsSL https://get.aiadminpanel.com/v<new>/install.sh -o /tmp/aap-install.sh
sudo bash /tmp/aap-install.sh --refresh-updater

That writes /opt/aiadminpanel/aap-egress-guard.sh and two systemd units, aap-egress-guard.service and aap-egress-guard.timer, applies the rules once and starts the timer, which re-applies them every five minutes and at boot (a reboot empties the firewall, and a firewalld or ufw reload may). It does not touch the panel or its containers, and no network is recreated.

What the rules do:

  1. No container sends to a link-local address (169.254.0.0/16, plus Azure's 168.63.129.16 and Alibaba's 100.100.100.200), the platform's own containers included. DNS on port 53 stays open, because Google, AWS and Azure put their resolver on such an address. The same rule keeps containers off 100.64.0.0/10, the range Tailscale, Headscale and NetBird give their devices: once you put this server on such a private network, a container could otherwise reach your laptop, NAS or router there, arriving as the server. Nothing public lives in that range. Two things still pass: replies to connections opened from it (you, on your tailnet, using a published port; a provider load balancer that sends from it), and DNS to the server's own resolvers in it (Tailscale's 100.100.100.100 when the server uses Tailscale's DNS, Alibaba Cloud's 100.100.2.136). Port 53 on any other address in the range is blocked. Chain AAP-EGRESS-GUARD, jumped first from DOCKER-USER.
  2. Customer containers and Git build steps reach the server itself only on TCP 80, 443 and port 53. This covers Docker's default bridge (docker0, where build steps run), every customer network created by this release (interfaces named aapbr…) and older customer networks (by interface, listed again on every run). Chain AAP-HOST-GUARD, jumped first from INPUT. It only drops or hands back to your own firewall; it never accepts anything your firewall would refuse.

Both jumps go first in their chains, ahead of your own rules, and every run puts them back first if something moved them.

What can stop working

  • A customer app that uses a service on the server itself on another port, such as a database bound to the Docker gateway address. Move that service into a container on the customer's network.

  • Any container of your own on Docker's default bridge (docker0), panel or not, that uses a host service on another port.

  • A model server on the host that customer apps call directly. If the Provider AI under Settings → AI Providers points at the server itself (for example Ollama on port 11434 or LocalAI on 8080), set that port in /opt/aiadminpanel/.env, then re-apply. Edit the line if it is already there; if the variable appears more than once, the last line counts, as in Docker Compose:

    sudo grep -q '^AAP_EGRESS_GUARD_TENANT_HOST_PORTS=' /opt/aiadminpanel/.env \
      && sudo sed -i 's/^AAP_EGRESS_GUARD_TENANT_HOST_PORTS=.*/AAP_EGRESS_GUARD_TENANT_HOST_PORTS="11434"/' /opt/aiadminpanel/.env \
      || echo 'AAP_EGRESS_GUARD_TENANT_HOST_PORTS="11434"' | sudo tee -a /opt/aiadminpanel/.env
    sudo /opt/aiadminpanel/aap-egress-guard.sh apply
    

    The list is empty by default. The refresh run and aap-egress-guard.sh plan both print a line naming it, and say how to set it while it is empty. Space or comma separated, at most 16 TCP ports, each let through from every customer network and from build steps. A value that is not a list of port numbers is ignored and the guard reports failed with the reason. Do this before the refresh to avoid a gap.

  • A container that uses a service at a 100.64.0.0/10 address: a device on your Tailscale, Headscale or NetBird network, a provider service in that range (Alibaba Cloud's internal mirrors, for example), or another host of an AWS VPC with a 100.64 secondary range. Containers can no longer open connections there. Move the service to a public or private (10.x, 172.16–31.x, 192.168.x) address the containers can reach.

  • Docker networks with addresses in 100.64.0.0/10. If you set Docker's address pools there (default-address-pools in /etc/docker/daemon.json), the rule would cut traffic inside the panel's own networks. The guard then leaves the 100.64.0.0/10 rule out, the status says failed and names the network. Move the pools out of that range and recreate the network.

  • Not affected: the panel's own calls (the panel is not on customer networks); the AI gateway's and the proxy's calls to the server, such as a model server on the host named in litellm-config.yaml (they leave through the platform's own networks); anything on your LAN or other private ranges.

  • A moment without the proxy or gateway on a customer network, once. The panel now attaches the reverse proxy and the AI gateway to customer networks with a Docker gateway priority of -1, so their default route stays on the platform's own network. Where an older panel attached them without one, the refresh (and later the timer) detaches and re-attaches them with -1, keeping their names on that network, and prints a re-attached … line for each. During the second or so that takes, that customer's apps are not reachable through the proxy. Nothing is exempted by address instead: a customer container could forge an address.

What it does not cover

  • The two shared platform networks (aiadminpanel_ai_bus, aiadminpanel_traefik_public) keep their path to the server's ports: the model server of the ollama template, and every service from before tenant network isolation until it is redeployed (see the next section). Rule 1 still applies to them. aap-egress-guard.sh plan prints a not covered line for them.
  • LAN or other private ranges. A NetBird network moved to a custom range, or a ZeroTier network (its range is yours to choose), is not covered by the 100.64.0.0/10 rule.
  • IPv6 is not filtered; it is kept off. The rules are IPv4 rules, so the IPv6 range of Tailscale and Headscale (fd7a:115c:a1e0::/48) has no rule of its own. Containers have no IPv6 route because the panel creates every app network with IPv6 disabled (even when daemon.json turns it on by default) and refuses to reuse one that has it on. Each run checks the panel's aap_ networks, the shared platform networks and Docker's bridge: one with IPv6 on makes the status failed, names the network, and the dashboard shows it under Needs you. Fix: remove ipv6 and enable_ipv6 from /etc/docker/daemon.json, then recreate the network (an app's network: docker network rm it and redeploy the app).
  • A host without systemd gets no guard: rules applied once would vanish at the next reboot. The panel then logs the error below for good.
  • Docker older than 28 gets rule 1 only. Gateway priority needs Docker 28, and without it rule 2 would cut the gateway's and proxy's own calls to the server. The guard reports unsupported with the reason, setup prints a warning, the dashboard shows "The egress guard's host-port rule is off" under Needs you, and customer containers keep reaching the server's ports until Docker is upgraded: upgrade Docker Engine to 28 or later (Docker's install guide), then run sudo bash install.sh --refresh-updater. A fresh install gets Docker 28 or newer from Docker's repositories; only a distribution package or an older existing Docker is behind.
  • A customer network created by a panel that is not updated yet gets rule 2 within five minutes, at the next timer run.

Check it

sudo /opt/aiadminpanel/aap-egress-guard.sh status   # prints: active
sudo /opt/aiadminpanel/aap-egress-guard.sh plan     # the rules, changes nothing
# from a throwaway container; print only the exit code, the answer can hold secrets
docker run --rm busybox:1.37 sh -c 'wget -T 3 -qO /dev/null http://169.254.169.254/; echo $?'

The last command prints a non-zero code when the guard holds. The panel reads /opt/aiadminpanel/update/egress-guard.json at start and on each network reconcile pass, and logs ERROR tenant egress guard not active with the reason when the file is missing, older than 15 minutes, or does not say active.

Turn it off

sudo /opt/aiadminpanel/aap-egress-guard.sh remove
sudo systemctl disable --now aap-egress-guard.timer aap-egress-guard.service

That deletes both jumps and both chains. The panel keeps logging the error, so the state stays visible.

After upgrading: redeploy existing services to isolate them

Releases with tenant network isolation put each customer's services on that customer's own Docker network. The reverse proxy and, where the panel gave a service one, the AI gateway join that network. A customer's containers no longer sit on a network shared with other customers, so one customer's container cannot open a connection to another customer's application directly.

This applies to a service only once it has been deployed or redeployed on the new release. The upgrade does not touch running services. A service deployed earlier keeps the shared networks, and the exposure, until you redeploy it. Restarting it does not move it, and nothing moves it automatically.

What to do:

  1. Open Dashboard. If any service has not moved, a banner says how many.
  2. Open Services. Each such service carries a Not yet isolated tag; hover it for the reason.
  3. Open the service and choose Redeploy. When the redeploy finishes the tag clears, normally within half a minute.

What to know before you redeploy:

  • Who can redeploy. Platform administrators; resellers, for services of their own customers; and a customer's own agent through the tenant MCP redeploy_service tool where that is enabled. The customer portal has no redeploy button, which is why the portal does not show the tag: tell your resellers that redeploying their customers' services is theirs to do.
  • Redeploy pulls images again. A service whose image uses a floating tag such as :latest can come back on a newer image. The service is redeployed from its stored configuration, not from a newer version of its template. Redeploy one service at a time and check it, rather than all at once.
  • Services built from a Git repository. Redeploy moves them too. For a platform operator it clones the stored repository and builds again; for everyone else who manages the service it recreates the container from the image of the last build, without fetching new code. A Git service built from a Compose file in its repository runs several containers that only the repository describes, so it moves only with a platform operator's Redeploy. A Git service deployed before the panel kept the repository shows "No stored repository": enter it again on the service page, then redeploy. See Git Deploy.
  • Two limits of the isolation. The network is per customer, not per service: services of the same customer can reach one another (since AI-1424 by a name unique to each service, and the containers of one app find their own sidecars on a private network). And model servers deployed from the ollama template stay on the shared AI network, where they can reach one another.
  • A subdomain change can be refused first. A not-yet-isolated service that uses the panel's AI gateway or bundled local AI cannot have its subdomain changed until it has been redeployed once. The panel says so and leaves the service running.
  • A tag that says the image must be fixed. If the tag's help says the image defines its own proxy routing, redeploying is refused until the image is fixed; see the next section.

Platform container names

The proxy and the AI gateway now have a leg in every tenant network they serve, and Docker answers a container's name lookups from the tenant network first. A tenant service whose container is called ollama or postgresql on that network (the catalog templates of those names are) would then answer the gateway's own lookup of its model server or its database. The platform therefore refers to its own containers by their container names, which no tenant container can carry:

WhereBeforeNow
/opt/aiadminpanel/.envPANEL_INTERNAL_URL=http://panel:8080http://aiadminpanel_panel:8080
/opt/aiadminpanel/.envLITELLM_DATABASE_URL=…@postgresql:5432/litellm…@aiadminpanel_postgresql:5432/litellm
/opt/aiadminpanel/litellm-config.yamlapi_base: http://ollama:11434http://aiadminpanel_ollama:11434

A new installation is written this way. For an existing one:

  • The host updater makes the change, keeps the previous files under /opt/aiadminpanel/backups/ (env.pre-platform-names-…, litellm-config.yaml.pre-platform-names-…) and recreates the gateway. It rewrites only those exact three values; a host you chose yourself (an IP address, a full host name) is left alone. The updater script on the host is not replaced by a panel update (see above), so an installation whose /opt/aiadminpanel/aap-update.sh is older than this release does not get the change until the script is refreshed (see Refresh the host updater) and an update or --reapply has run.
  • The host updater also adds PANEL_INTERNAL_URL when .env has no value for it. The installer writes it, but keeps an .env that already existed, so an installation first set up before March 2026 may lack it. The updater then appends PANEL_INTERNAL_URL=http://aiadminpanel_panel:8080 (replacing an empty PANEL_INTERNAL_URL= line), keeps the previous .env as env.pre-platform-names-…, and the panel reads it when it is recreated. A value that is already set is never changed. The same condition applies: the host's aap-update.sh must be from this release or later.
  • Until the change is made the panel protects you and says so. At every start it logs an error naming each short name still in use. It refuses, with a message pointing here, any deploy that would put a service on a network together with a gateway that looks up that service's name for itself, in either order. On an install from before this release those names are ollama and postgresql; the same holds for any other short host name the gateway is configured with. Every such refusal happens before anything is stopped: the service that was running keeps running, and the redeploy succeeds once the change is made.

To make the change by hand, on the host:

cd /opt/aiadminpanel
cp -p .env backups/env.pre-platform-names && chmod 600 backups/env.pre-platform-names
cp -p litellm-config.yaml backups/litellm-config.yaml.pre-platform-names
sed -i -E \
  -e 's#^(PANEL_INTERNAL_URL=http://)panel:#\1aiadminpanel_panel:#' \
  -e 's#^(LITELLM_DATABASE_URL=[^[:space:]]*@)postgresql:#\1aiadminpanel_postgresql:#' .env
sed -i -E 's#^([[:space:]]*api_base:[[:space:]]*"?http://)ollama:#\1aiadminpanel_ollama:#' litellm-config.yaml
docker compose up -d --no-deps --force-recreate panel litellm

Add -f docker-compose.gpu.yml to the last command if that file exists. To check, without changing anything (each line must show an aiadminpanel_… host):

grep -E '^(PANEL_INTERNAL_URL|LITELLM_DATABASE_URL)=' /opt/aiadminpanel/.env | sed -E 's#://[^@/]*@#://…@#'
grep -n 'api_base' /opt/aiadminpanel/litellm-config.yaml

The panel reads every URL in the gateway's environment and in its configuration file, whatever the key and the YAML style, and treats each host without a dot as such a name. It also reads host:port without a scheme, several URLs in one value, a bare name under a key that ends in host (redis_host, REDIS_HOST), and the host of a URL whose password contains characters such as % or #. A configuration file it cannot parse as YAML, or a URL whose host it cannot make out, makes it refuse those deploys until the value is fixed; the message names the variable or key, never the value. If you added models to litellm-config.yaml yourself, give each api_base that points at a container on this host that container's name, not a short alias.

Names a service may no longer use. A template or Compose file whose service is named panel, traefik, keycloak, openbao, openbao_log_rotator or valkey, any name starting with aiadminpanel_, or any name containing a dot, is refused at deploy, redeploy, reassignment, secret rotation and subdomain change, before anything is stopped. No catalog template is affected.

A service that already runs under such a name, created before this release, keeps running. But the panel does not attach the proxy or the gateway to a network on which it sits, because that container would answer the platform's own lookups there. The effect is on that customer's network only: other services on it cannot be deployed or redeployed, and after a recreate of the proxy they lose routing, until the service is removed or redeployed under another Compose service name. The panel logs an error at every start naming each such container and its network, and each refused deploy names it too. A refusal happens before anything is stopped.

SSO-protected services deployed before this release keep the old login-check address (http://panel:8080) in their proxy labels until they are redeployed. That is safe, since no container may be called panel any more, and redeploying them is already part of the isolation steps above.

Service names and subdomains reserved for the platform

A service answers at <name>.<your domain>, and so do the login server (auth) and the AI gateway (ai). A new service, or a subdomain change, may no longer use one of these names: auth, ai, www, api, admin, panel, login, sso, keycloak, id, traefik, docs, status, mail, or any name that would produce a hostname your panel, login server or AI gateway answers on. The request is refused with "the name "auth" is reserved for the platform; choose another name" before anything is saved.

A service that already holds such a subdomain is not renamed, stopped or deleted by the update. After updating, search the panel log for reserved subdomain in use: the panel writes one error line per such service at every start, with the service ID and its hostname. No line means there is nothing to do. For each line, open the service's Settings tab and change the subdomain in its Domains card. Do this first for auth and ai, where the service competes with the login server or the AI gateway for the same address; the other names collide with nothing today.

One case stops working: a service created under a reserved name that never reached its first address (never deployed successfully) fails its next deploy with the same message. A service cannot be renamed, so delete it and create it under another name.

A subdomain must now also be one DNS label: lowercase letters, digits and hyphens. A subdomain with capitals or a dot, which the panel accepted before, is refused when you next change it; the stored one keeps working until then.

Proxy and gateway containers

The update recreates the Traefik, LiteLLM and Ollama containers once, because their Compose definition now switches packet forwarding off (net.ipv4.ip_forward=0): each of them has a leg in every tenant network it serves and must not route between tenants.

The panel requires that setting. It does not attach a platform container that runs without it to a customer network, and it does not attach one whose setting it cannot read. What that means on an installation where the setting was never applied (the panel image was replaced but the Compose file was not, or the update was to a release up to 2.14.3, of which only the image is installed):

  • Nothing that is running is stopped. Services deployed before this release are on the shared networks and keep working as before.
  • Deploys and redeploys are refused, with a message that names the container, as are reassignment, subdomain change and the recreate after a secret rotation. The refusal comes before anything is stopped, so the service that was running keeps running. No service can move to the isolated layout until the setting is applied. The deploy progress screen shows it as Deploy refused: nothing was changed with an Open Updates button; releases up to 2.14.1 showed "An unexpected error occurred during deployment" there, while the dashboard notice and the service's History tab (called Deployments in those releases) already carried the reason.
  • A service already on the isolated layout loses routing (or inference) if its platform container is recreated without the setting, because the panel does not re-attach it. An attachment that already exists is left alone, and the service then shows Not yet isolated with the reason platform_forwarding_enabled.
  • The administrator's dashboard shows a red notice naming each such container, with a link to Settings → Updates. GET /api/v1/system/network-isolation lists them as unpinnedPlatforms, and the panel log repeats the finding hourly.
  • While the panel cannot read the setting at all (Docker does not answer, or a platform container cannot be inspected), it attaches nothing either, every service shows as unknown, and the dashboard says that the network isolation of the host cannot be checked. Right after a panel restart that notice clears within a minute or two.

The fix is on the Updates page. Open Settings → Updates as an administrator:

  • An update is offered: press Update now. The host updater installs the release's Compose file and recreates the three containers from it.

  • No update is offered (the installation is already on the newest release): the page shows a notice with Apply again. It requests the version that is already running, so the host updater installs that release's Compose file and recreates what differs. It takes the same database backup and checks the same image signature, the panel restarts once, and no other version is installed. This works with every host updater, including one installed before this release, because the updater sees an ordinary request.

    On 2.14.0 itself this notice is not shown, because of a fault in that release (fixed in 2.14.1). An installation on 2.14.0 is offered the newer release instead: press Update now, which does the same repair. Without a newer release, use the shell command below.

The panel re-attaches the containers within about a minute and the notice disappears. A deploy that was refused can simply be started again, including the first deploy of a new service.

From a shell on the host, when you prefer it or the panel is not reachable:

sudo /opt/aiadminpanel/aap-update.sh --reapply

--reapply applies the Compose file of the release that is running. It pulls no image and does not change PANEL_VERSION; when .env says PANEL_VERSION=latest (the installer's default) it reads the release from the running panel image. It ends as failed, with the reason under Settings → Updates and in the updater log, when it cannot work out which release is running, when PANEL_VERSION names another release than the one running (correct .env or update the panel first), when the running release is 2.14.3 or older and so has no signed manifest (update to a newer release), when that release's manifest or Compose file cannot be downloaded or does not verify, or when a platform container still forwards packets afterwards. It never reports success in those cases.

--reapply needs this release's updater script, and a panel update does not replace /opt/aiadminpanel/aap-update.sh. To see which one a host has:

grep -c -- '--reapply' /opt/aiadminpanel/aap-update.sh   # 0 means: older than this release

An older script ignores the flag and answers no update request found. Refresh it first, as described under Refresh the host updater; this writes only the updater script and its two systemd units and touches nothing else on the installation.

The installer is served over HTTPS; from the first release after 2.21.0 you can check its signature first (see Verify the installer before running it). If you do not want to run it, use Apply again in the panel, which needs no change on the host. With an updater from before signed manifests, Apply again installs the release's Compose file without checking it.

If the result says a container is still running with packet forwarding on, the Compose file on the host has no such setting after the run. Put the release's docker-compose.yml in /opt/aiadminpanel/ and run docker compose up -d there (add -f docker-compose.gpu.yml if that file exists). An update to a release up to 2.14.3 installs the image only; when a container still forwards packets after it, its result carries the same sentence as a note beside "Updated to …".

The connections between the proxy or gateway and each tenant network are made at runtime and are lost when one of those containers is recreated. The panel restores them by itself: at start and every 30 seconds it re-attaches what is missing, only on networks that belong to its own services. Expect routing to isolated services to be interrupted for up to about a minute after such a recreate.

Capacity

Each customer, each service that has no customer, and (since AI-1424) each service with several containers that belongs to a customer uses one Docker network. With Docker's default address pool a host holds about 31 networks, of which the installation itself uses four. That leaves 27, for example 9 customers with 2 multi-container apps each; this limit applies only to a host without the larger address pools. A host installed with the pools, or given them as described in Let Docker hold more networks, holds about 3,500; memory and CPU then set the limit. The panel removes a customer's network when that customer's last service is removed, and an app's own network when the app is removed or moved to no customer, and warns in its log above 80% of the pool. When no range is left, a deploy fails with "no address range left for another network" and points to install.sh --docker-address-pools.

Let Docker hold more networks

The panel gives each customer its own Docker network, and each app with several containers of a customer one more. Docker's built-in address pools allow only about 31 networks per host. When they run out, deploying an app fails with "no address range left for another network" (Docker's own message is all predefined address pools have been fully subnetted). A new installation sets larger pools by itself. An existing installation keeps Docker's defaults until you run this once, as root:

curl -fsSL https://get.aiadminpanel.com/v<new>/install.sh -o /tmp/aap-install.sh
sudo bash /tmp/aap-install.sh --docker-address-pools

This restarts Docker, and with it every container on the host: the panel, its database, the login service and every customer app. Expect one to two minutes of downtime for everything; run it in a maintenance window. It is not part of --refresh-updater for that reason, and re-running the full installer on a server whose Docker already runs containers does not do it either. --refresh-updater prints a reminder while the pools are still Docker's defaults.

What it does to /etc/docker/daemon.json:

  1. If there is no file, it writes one with only default-address-pools. It never sets a storage driver on a server that already runs Docker: that would hide every image and container.
  2. It reads the file and refuses to continue if it is not valid JSON. Docker would not start with such a file either; fix it first. An empty file, or one with only spaces and line breaks, counts as "no settings", as it does for Docker.
  3. If the file already sets default-address-pools, it keeps those and changes nothing.
  4. Otherwise it copies the file to daemon.json.aap-backup-<UTC time>, adds only the default-address-pools key (all your other settings stay as they are) and replaces the file in one step. If daemon.json is a symbolic link (for example managed by a configuration tool), the link stays and the file it points to is changed and backed up next to itself.
  5. It restarts Docker only if the file changed. A second run changes nothing and restarts nothing.
  6. If Docker does not answer within 90 seconds of the restart, it puts the original back, keeps the new one as daemon.json.aap-rejected-<UTC time> and restarts Docker again.

It needs jq; the installer downloads it to /usr/local/bin/jq when it is missing and uses it from there even when sudo leaves /usr/local/bin off the search path (the default on Rocky Linux and AlmaLinux).

The new pools are networks of 254 addresses from 172.18.0.0 to 172.31.255.255, about 3,500 of them. Docker already uses this range by default, so this adds no new overlap with your LAN; 192.168.0.0/16, which Docker's defaults also used, is no longer taken. Networks that exist already keep their addresses, and new networks skip them. If your server's own network lies inside 172.18.0.0–172.31.255.255 (the common case is an AWS default VPC, 172.31.0.0/16, which Docker's own defaults overlap too), set your own pools in daemon.json before running the command; it then keeps them.

To check: docker info --format '{{json .DefaultAddressPools}}' prints the three pools (null means Docker's defaults). To undo, copy the backup back over /etc/docker/daemon.json and run sudo systemctl restart docker (again restarting every container). The networks created meanwhile keep their addresses.

Rolling back

An earlier panel version has no re-attach job, and rolling back recreates the proxy and gateway containers. Services already redeployed onto the isolated layout then lose routing until the attachments are restored by hand. The steps are in the repository runbook docs/runbooks/tenant-network-isolation.md.

After upgrading: check for image-supplied routing labels

Newer releases refuse to deploy an image that ships traefik.* or aiadminpanel.* labels, because Docker copies image labels onto containers and the proxy routes from them. The upgrade does not touch containers that are already running. A service created earlier from such an image keeps its labels, and any route they define, until you remove or rebuild it. The panel marks such a service Not yet isolated, with help text saying that the image defines its own proxy routing, and logs an error naming it.

To list affected services yourself, run this on the host. It only reads; it prints one line per container and label, and nothing when the host is clean:

for c in $(docker ps -aq --filter label=aiadminpanel.managed=true); do
  name=$(docker inspect -f '{{.Name}}' "$c")
  docker image inspect -f '{{range $k, $v := .Config.Labels}}{{println $k}}{{end}}' \
    "$(docker inspect -f '{{.Image}}' "$c")" 2>/dev/null \
    | grep -iE '^(traefik|aiadminpanel)\.' | sed "s|^|${name#/}: |"
done

For every service it lists: rebuild or re-tag the image without those labels and redeploy, or remove the service. Redeploying, moving, rotating a secret on, or changing the subdomain of such a service is refused until the image is fixed; there is no override. The service keeps running in the meantime.

After upgrading: everyone signs in once more

The release that fixes AI-1181 changes how the browser proves who is signed in.

What was wrong. The panel login was one cookie, oidc_session, issued for the whole panel domain. Deployed services live at <name>.<your domain>, so the browser sent that cookie to every service with every request. A service that logs request headers could copy an administrator's cookie and act as that administrator. It is like forwarding your SSH agent to every customer VM you open.

What changes on update.

  • The update deletes all stored sessions, because any of them may already have been copied. Every user signs in once more. Accounts, passwords, API keys and services are not touched.
  • The cookie is now __Host-aap_session and is valid for the panel hostname only. oidc_session is no longer accepted. A script that sent that cookie by hand gets 401; API keys keep working.
  • Hermes and IronClaw (the templates behind the sign-on lock) get their own cookie per hostname. The first visit to such a service makes two quick redirects, service → panel → service. No service needs a redeploy.
  • A signed-out visitor to a locked service now lands on the panel login page instead of a 401 error, and opens the service again after signing in.
  • Nothing changes in DNS, certificates or /opt/aiadminpanel/.env, for both your own domain and a managed domain.

What the update cannot undo. If an untrusted service ran on this installation, a copied session may already have been used. Rotate administrator API keys and look through the audit log for API keys you did not create; a key minted with a stolen session keeps working after the update.

Not fixed by this update. A page on a service hostname can still make the browser send form posts to the panel with the user's cookie attached. Run only services you trust under the panel domain.

Rolling back past this update

The order matters. The panel applies database migrations from its own files at every start. The previous image does not have the files for migration 72, so with the database at version 72 it stops at start with no migration found for version 72. Undo the migration by hand first, then start the previous image:

# 1. As root on the host: remove the sign-on table and set the version back to 71.
docker exec aiadminpanel_postgresql psql -U aiadminpanel -d aiadminpanel -c \
  "BEGIN; DROP TABLE IF EXISTS app_sso_grants; UPDATE schema_migrations SET version = 71, dirty = false WHERE version = 72; COMMIT;"

# 2. Then restore the recorded previous PANEL_VERSION and recreate the panel
#    with the manual commands above.

The deleted sessions do not come back: users sign in again on the previous version too, and the old exposure returns with it.

After upgrading: Keycloak tokens are no longer stored

Earlier releases wrote each user's Keycloak access and refresh tokens into the identity_sessions table, protected only by a weak, home-made scheme. The panel never read them back. From this release it does not store them at all, and migration 000074 empties the values already stored. Nobody is signed out and nothing needs doing after the update.

Backups taken before the update still hold the old values. If such a backup has left your control, sign out all Keycloak sessions once (Keycloak admin console, Realm → Sessions → Sign out all); the refresh tokens in it stop working with their Keycloak session.

Rolling back past the stored-token update

The previous image has no file for migration 000074, so it stops at start while the database is at version 74. The migration changes no table, so the only manual step is to set the version back before starting the previous image:

# 1. As root on the host: set the migration version back (nothing else to undo).
docker exec aiadminpanel_postgresql psql -U aiadminpanel -d aiadminpanel -c \
  "UPDATE schema_migrations SET version = 73, dirty = false WHERE version = 74;"

# 2. Then restore the recorded previous PANEL_VERSION and recreate the panel
#    with the manual commands above.

If a later release added further migrations, undo them highest number first. Sign-in keeps working on the previous version, because the columns still exist, and its new sessions are again stored with the old weak tokens until you repeat the update. The emptied values do not come back; nothing needs them.

After upgrading: Keycloak accepts only the panel's own addresses

What was wrong. Both Keycloak clients the panel ships, panel-frontend and panel-backend, allowed * as redirect address. Keycloak would hand a login code to any address a link asked for, so a crafted login link could send the code to someone else's site. It is like an SSH jump host that forwards to any destination instead of a fixed list.

What changes on update. At every start the panel writes the allowed addresses onto both clients itself, read-modify-write, so no other client setting changes:

ClientValid redirect URIsWeb originsValid post logout redirect URIs
login client (OIDC_FRONTEND_CLIENT_ID, default panel-frontend)the login callback, OIDC_REDIRECT_URI or https://{PANEL_DOMAIN}/api/v1/auth/oidc/callbackits origin, https://{PANEL_DOMAIN}https://{PANEL_DOMAIN}/login
panel-backend (not used for login)https://unconfigured.invalid/nonehttps://unconfigured.invalid/

.invalid can never resolve, so the placeholder means "no address allowed". A realm without panel-backend is fine; the panel logs one INFO line and goes on.

  • Nothing needs doing on an install where the panel has KEYCLOAK_ADMIN_PASSWORD (every install made with the installer). Sign-in and sign-out work as before when you open the panel at https://{PANEL_DOMAIN}. If you open it under another name or address, sign-out now ends on https://{PANEL_DOMAIN}/login, the one address Keycloak allows.
  • Addresses you added by hand to panel-frontend or panel-backend are overwritten at every start. There is no switch to keep them. If another application signs in through Keycloak, give it its own client in the Keycloak console.
  • Until a later release also changes the shipped realm file, a fresh install still imports * and the panel corrects it at its first start.
  • The panel log shows keycloak redirect allow-list applied once it has written the addresses. While Keycloak is not reachable, or rejects the admin password, it logs ERROR keycloak redirect allow-list not applied and tries again every 30 seconds. The panel itself starts and works meanwhile; only the old * stays until a try succeeds.

Without KEYCLOAK_ADMIN_PASSWORD the panel cannot reach the Keycloak admin API. It logs keycloak redirect allow-list not applied once at start, and the * stays. Set the addresses by hand in the Keycloak admin console (realm aiadminpanel, Clients):

  1. Open panel-frontend, tab Settings. Replace the entries so that Valid redirect URIs holds only https://{PANEL_DOMAIN}/api/v1/auth/oidc/callback, Valid post logout redirect URIs only https://{PANEL_DOMAIN}/login, and Web origins only https://{PANEL_DOMAIN}. If /opt/aiadminpanel/.env sets OIDC_REDIRECT_URI, use that value as the redirect URI instead. OIDC_FRONTEND_REDIRECT_URI in .env changes nothing: the panel container does not receive it. Click Save.
  2. Open panel-backend, tab Settings. Set Valid redirect URIs and Valid post logout redirect URIs to https://unconfigured.invalid/, remove every Web origins entry, and click Save.
  3. Check: sign out of the panel and in again. The browser must end on the panel, not on a Keycloak error page saying "Invalid redirect uri".

Rolling back past the redirect-address update

Restore the recorded previous PANEL_VERSION and recreate the panel with the manual commands above. The previous image does not write any addresses; the ones this release wrote stay in Keycloak and keep sign-in working. The * does not come back.

After upgrading: Rollback redeploys a saved version

What changed. POST /api/v1/services/{id}/rollback, and the Roll back button on the deploy screen, used to stop and remove every container of the service. From this release they deploy a saved version of the service again (see Roll Back a Service). Migration 000084 adds the table of saved versions and a pin column on services. Nothing needs doing after the update: the first deploy of each app saves the version it replaces before it changes anything.

A script that called /rollback to remove containers now gets a redeploy, or a 409 with nothing changed; use POST /api/v1/services/{id}/stop to stop a service. The route now needs services.deploy instead of services.manage, so a Project Member, who could already Redeploy, can also roll back, and so can an API key whose deny list names services.manage but not services.deploy.

Rolling back past the saved-versions update

A service that was rolled back is pinned: its Compose names its images by digest. The previous image still deploys such a service, but no longer removes the pin on Redeploy. Before going back, Redeploy every service that was rolled back, or accept that it stays on those images until its Compose is edited.

The previous image has no file for migration 000084, so it stops at start while the database is at version 84. Undo the migration (it removes only the saved versions) before starting the previous image:

# 1. As root on the host: drop what migration 000084 added and set the version back.
docker exec aiadminpanel_postgresql psql -U aiadminpanel -d aiadminpanel -c \
  "BEGIN; ALTER TABLE services DROP COLUMN IF EXISTS pinned_snapshot_id; DROP TABLE IF EXISTS service_snapshots; DROP TYPE IF EXISTS service_snapshot_origin; UPDATE schema_migrations SET version = 83, dirty = false WHERE version = 84; COMMIT;"

# 2. Then restore the recorded previous PANEL_VERSION and recreate the panel
#    with the manual commands above.

If a later release added further migrations, undo them highest number first. Images that saved versions kept on the host (tags named aap-git-<id>:snap-… and aap-snap-<id>:…) stay until you remove them with docker image rm.

Recovery and rollback limits

An older image does not undo database migrations. Automatic rollback restores the previous image/configuration, not the database. One migration needs a manual step before the older image can start at all; see Rolling back past the private-apps update and Rolling back past the stored-token update. If schema compatibility is uncertain, stop and plan a coordinated restore of the matching version, database, configuration, and secret material. Restoring an older database can lose writes made after the backup. Do not import a dump into a running database and assume it reverses a migration.

For an image-only rollback confirmed compatible with the current database, restore the recorded previous PANEL_VERSION, then recreate the panel with the manual commands above. Inspect the result and application behavior before reopening access.

Supporting services such as PostgreSQL, Keycloak, and OpenBao have their own upgrade and backup requirements. Do not change a database major version by simply replacing its image tag. Review the component's migration procedure and test recovery separately. OpenBao backup, restore, and unseal procedures are maintained in docs/runbooks/openbao.md in the repository.

Stop while preserving data

To stop the installation for later recovery, first disable automatic updates in Settings and wait for any running update to finish. Then stop its host updater units and Compose stack:

sudo systemctl disable --now aap-updater.path
sudo systemctl stop aap-updater.service
cd /opt/aiadminpanel
docker compose down

down without -v preserves named volumes. Keep /opt/aiadminpanel, its .env, Compose files, secrets/, certificates, and backups, plus any configuration under /etc/aiadminpanel. Removing those files can make retained volumes unusable. Independently deployed application containers and volumes need separate handling.

Permanent removal

Inventory all panel and application containers, volumes, host files, and backups before deleting anything. Confirm a tested off-server backup and explicit approval to destroy the intended installation. Stop it as above first.

docker compose down -v deletes the installed stack's declared named volumes and attached anonymous volumes. It does not mean every deployed application's container or data volume has been removed. Review those resources separately. Remove installation files and the aap-updater systemd units only after deciding which configuration, secrets, certificates, and backups must be retained; reload systemd after removing unit files.

Do not remove shared Docker storage to uninstall one panel: other applications may use the same Docker host.