Configuration
Complete the setup wizard, then use Settings for routine changes. Configure AI providers, email, DNS, licence activation, and updates in the panel. The installer creates the underlying Docker Compose stack and identity-provider configuration.
Installation files and advanced settings
A standard installation uses /opt/aiadminpanel/docker-compose.yml, with host settings in /opt/aiadminpanel/.env and persistent secret files under /opt/aiadminpanel/secrets/. A GPU host may also have a Compose override generated by the installer. Preserve these files together when backing up the installation.
The production stack includes the panel, PostgreSQL, Valkey, Traefik, Keycloak, OpenBao, its audit-log rotation sidecar, Ollama, and LiteLLM. The panel image is ghcr.io/aiadminpanel/ai-admin-panel:${PANEL_VERSION:-latest}. latest is the released channel; it does not mean an unreleased build from main.
The .env file supplies Compose substitutions; adding an arbitrary variable there does not automatically pass it into a container. These are supported examples, not an exhaustive replacement for the installed Compose file:
| Variable | Purpose |
|---|---|
PANEL_DOMAIN | Base hostname chosen during installation |
PANEL_VERSION | Panel image tag; defaults to latest. Image tags carry no v (2.22.0, not v2.22.0); the installer and aap-update.sh --reapply write that form |
SETUP_TOKEN_SHA256 | SHA-256 fingerprint of the setup code (AI-1184). Written by the installer; the code itself is secrets/setup_token. Empty means the setup wizard refuses all saves. Replace both with install.sh --new-setup-token, not by hand |
PANEL_INTERNAL_URL | Address at which the proxy asks the panel whether a visitor may open a sign-on-protected app; the installer writes http://aiadminpanel_panel:8080, and docker-compose.yml uses the same value when .env has none. Every new app starts private behind this check, so while it is empty the panel refuses to deploy any app, and to redeploy Hermes, IronClaw or an app that is still private |
ACME_EMAIL | Certificate notification email |
TLS_MODE | Installer choice, not written to .env: letsencrypt (default, HTTP-01) or letsencrypt-dns (DNS-01). cloudflare is the old name for letsencrypt-dns and still works. Any other value stops the installer |
CERT_RESOLVER | Certificate resolver for the panel, login and app routes; the installer sets letsencrypt-dns for TLS_MODE=letsencrypt-dns (or cloudflare), which also gives every app one shared wildcard certificate, and letsencrypt otherwise |
CF_DNS_API_TOKEN | Cloudflare DNS token; supply privately, with no shared default. Deprecated for certificates: with the DNS-01 bridge only the panel reads it, as a fallback until a token is saved in Settings |
DNS01_PROVIDER | Traefik's DNS-01 provider: httpreq (the panel's DNS-01 bridge; new installations, and older ones once the updater has proven the bridge) or cloudflare / unset for Traefik's own provider. The panel reads the same value, and CERT_RESOLVER, for the dns01_bridge check in Settings → DNS |
TRAEFIK_CF_DNS_API_TOKEN | Set empty by the updater once the bridge works with the token saved in Settings, so Traefik holds no Cloudflare token; unset means Traefik gets CF_DNS_API_TOKEN |
DNS01_BRIDGE_SECRET | Per-install secret Traefik uses to call the DNS-01 bridge; generated by the installer (or by the updater on an older DNS-01 installation), no default. Empty means no bridge |
GOMEMLIMIT | Optional Go soft memory budget; defaults to off, not 0 |
COMPOSE_PROFILES | Optional Compose services to run. ollama runs the bundled local AI engine; the host updater adds it when the first local model is pulled, and the installer or updater adds it when the engine already runs. Without it, docker compose neither pulls nor starts Ollama |
OLLAMA_MEM_LIMIT | Hard memory limit of the bundled Ollama, with no swap on top (for example 3744m). The installer sizes it from host RAM and an update adds it when missing; without it the limit is 3g |
SECRETS_BACKEND | openbao by default; file selects legacy encrypted-column storage |
BAO_ADDR | Internal OpenBao address; normally http://openbao:8200 |
OPENBAO_VERSION | Bundled OpenBao image tag; default 2.7.3, pinned by digest. Setting it replaces the tag and drops the digest pin, so leave it unset outside tests |
LITELLM_MASTER_KEY | Per-install gateway key generated by the installer; required by Compose |
AAP_LOCAL_AI_MODEL | Model the installer downloaded into the bundled Ollama; handed to apps deployed with the Local AI source while it is installed. Absent on servers installed with v2.13.0 or earlier, where the panel uses an installed model instead |
After changing a Compose environment setting, recreate the affected service from the installation directory; a restart alone does not load new container environment values. For a panel-only setting:
cd /opt/aiadminpanel
docker compose up -d --no-deps --force-recreate panel
This briefly interrupts panel access. Changes to routing, authentication, database, or secret settings can affect multiple services; back up the existing configuration and plan those changes before applying them.
Platform container names
The panel connects the reverse proxy and the AI gateway to each customer's network by container name: aiadminpanel_traefik, aiadminpanel_litellm and aiadminpanel_ollama on a standard installation. AAP_PLATFORM_CONTAINER_PREFIX (default aiadminpanel_) changes the part before traefik, litellm and ollama. Leave it unset unless your stack names those containers differently, as the development Compose file does (aiadmin_). A value that could not start a Docker container name stops the panel at startup. The panel logs the three names it uses.
Authentication
Keycloak is the identity provider. The installer imports the aiadminpanel realm, configures the panel-backend OIDC client, and creates the panel administrator admin@{PANEL_DOMAIN} with a generated password. See Installation for the first-login path and the separate Keycloak management-console account.
Keycloak runs in production mode (start --import-realm) at auth.{PANEL_DOMAIN}. Traefik terminates TLS; Keycloak serves plain HTTP on the internal Docker networks only and trusts Traefik's X-Forwarded-* headers (KC_PROXY_HEADERS=xforwarded). The realm is imported on the first start only; later starts leave it as it is.
The production panel uses OIDC_DISCOVERY_URL (defaulting to Keycloak's internal realm discovery endpoint), OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, and OIDC_REDIRECT_URI (normally https://{PANEL_DOMAIN}/auth/callback). Changing a hostname requires DNS for the new name; editing only the panel URL is insufficient.
At every start the panel writes the addresses Keycloak may send a browser to onto its two Keycloak clients: on the login client (OIDC_FRONTEND_CLIENT_ID, default panel-frontend) exactly the login callback the panel sends, its origin, and the /login page for sign-out; on panel-backend, which is not used for login, the placeholder https://unconfigured.invalid/, which allows nothing. Addresses added to these two clients by hand are overwritten at the next start. An integration that needs its own redirect address gets its own Keycloak client. This needs KEYCLOAK_ADMIN_PASSWORD; without it the panel logs an error and the addresses must be set by hand, see Upgrade.
The panel also manages the realm's sign-in flow for two-factor recovery codes (AI-1457): it signs the realm in with its own copy aap browser, which offers a recovery code as an alternative to the authenticator code, and checks it every 5 minutes, only while two-factor is optional (a realm with mandatory two-factor is left alone). AAP_KEYCLOAK_RECOVERY_CODES=off turns this off: a realm on aap browser signs in with Keycloak's built-in browser flow again. Set it before you remove recovery-codes from the Keycloak service's KC_FEATURES; see Upgrade.
At every start the panel also hardens the realm (AI-2521): it turns off the password grant on every client of the realm (the master realm, where the panel gets its own admin token, is not touched), sets the password policy (12 to 128 characters, not the username or email, not one of the last 3), and keeps sign-in and admin events for 90 days. Platform administrators without an authenticator must set one up at their next sign-in; this has no switch on a real install (AAP_KEYCLOAK_ADMIN_TWO_FACTOR=optional is for CI test runs only and is refused unless CI=true). See Upgrade.
Roles, permissions, edition, and organization scope determine which actions are available. A sidebar choice does not grant permission. Use the panel's customer and user management flows when adding people so identity and panel membership stay aligned.
Navigation and persona
The wizard asks how you will use the panel. The answer is a starting point. It changes only two things: what the menu shows first, and which Getting started list the dashboard suggests (see First steps).
| You pick | The menu shows | Suggested first steps |
|---|---|---|
| Just for my company | Your projects, services, AI and settings | Run an AI assistant |
| For my clients | Also Customers, Customer plans, Users and Audit log | Host apps for my customers |
| As a hosting business (Web Host only) | Also Resellers and Resource plans | Host apps for my customers |
It does not change your licence, features, limits, security or billing, and it locks nothing. Advanced view in the user menu shows every menu entry your edition and permissions allow; it does not upgrade them. A Web Host licence always shows the full menu, whatever you picked. With Just for my company, the customer checklist (Host apps for my customers) is not offered unless you are a reseller.
To change the answer later, open Settings → General → How do you use the panel? (platform admins). It saves at once and has the same limit as the wizard: As a hosting business needs the Web Host edition, and is greyed out with an upgrade link otherwise. The menu and the suggested Getting started list follow the new answer. A list you already picked on the dashboard stays, with one exception: after a change to Just for my company, a picked Host apps for my customers list is dropped and the dashboard asks the question again. Over the API: PUT /api/v1/settings/persona with {"value": "solo"} (solo, web_pro or hosting; anything else is 400, hosting without Web Host is 403). Customers, Projects, Customer Plans, Resellers and Resource Plans sit under one Business entry, with a tab per page (see Customers).
AI providers
Use the wizard's AI step or Settings → AI → AI Providers to pick a provider, enter its key privately, choose a model, and check the connection. Provider availability and model access depend on the configured provider account.
The wizard checks the key before it saves it. Save & Continue on the wizard's AI step asks the provider whether it accepts the key (the same check as Test Connection below; the panel makes the call, the browser never talks to the provider). The key is only saved when the provider accepts it:
- The provider rejects the key (HTTP 401 or 403): the step shows The provider rejected this API key under the key field, with the provider's reason, and saves nothing. Paste the whole key again, pick the provider the key belongs to, or use Skip for now.
- The provider does not answer (no network, a timeout, a rate limit, an unexpected reply): the step says The key could not be checked and offers Save anyway. The key is then saved unchecked; test it later with Test Connection in Settings → AI → AI Providers. Skip for now stays available, so an outage never blocks setup.
The check runs on the panel server and only connects to public internet addresses, which is what the wizard's cloud providers use. A local Ollama is set up later in Settings.
One provider for everything, by default. Use the same provider for the panel and for apps is on unless you turn it off: one key then powers the panel's own AI features (optional Git analysis, the assistant) and is offered to apps at deploy. The wizard's Use this provider for apps too does the same. Turn it off to keep two separate forms:
- Panel AI: the panel's own AI features.
- Provider AI: the source customers' apps can pick at deploy (Hermes, OpenClaw, workspaces, …).
Optional Git analysis uses global Panel AI first. It can use global Provider AI only when Panel AI is genuinely unconfigured; a configured keyless Ollama stays the selected provider. A configured provider error never switches to another provider. Per-customer BYOK remains for deployed apps, not platform analysis.
The providers are Anthropic, OpenAI, OpenRouter, Ollama (Local AI) and an OpenAI-compatible endpoint (vLLM, LiteLLM, Azure OpenAI or any server that speaks the OpenAI API), which asks for its base URL. Ollama needs no key; the bundled Local AI is http://ollama:11434/v1.
Test Connection checks the key with a call that needs it and costs nothing: Anthropic's model list, OpenRouter's key check, an OpenAI-compatible model list, or Ollama's model list. The result shows next to the button: Connected · N models, or the reason it failed (the key was rejected, the provider could not be reached, the base URL is wrong, or the provider is rate-limiting), in your language. A passed test fills the model picker with the models your key can use and preselects the recommended one. Before a test, the picker offers the panel's recommended models; Enter custom accepts any other id.
Save takes effect without reloading the page. Saving a cloud provider without a model stores the recommended default. For Anthropic that is Claude Sonnet 5.5 (claude-sonnet-5-5), which answers the Assistant at about half the cost of Claude Opus 5.5. Pick Opus in the same list when you want the bigger model; a model you saved before stays as it is. Agents can switch the model too, with the MCP tool set_ai_model. Remove deletes the provider and its stored key; apps already deployed keep what they were given at deploy.

This older screenshot shows the two separate forms, which the page now shows only when Use the same provider for the panel and for apps is off.
Hosting providers can seed Provider AI on first boot with AAP_PROVIDER_AI_API_KEY, AAP_PROVIDER_AI_BASE_URL, AAP_PROVIDER_AI_MODEL, and AAP_PROVIDER_AI_PROVIDER_TYPE. The panel stores that configuration for later editing in Settings. Do not include keys in screenshots, examples, or support logs. See How AI Works for Panel AI versus the sources used by deployed apps.
DNS and certificates
For a domain you own, point both the panel hostname and its wildcard subdomain at the server before installation. The default HTTP-01 certificate challenge needs inbound port 80; HTTPS needs port 443. Traefik routing and certificate resolvers are configured in the installed Compose file.
DNS-01 Certificates (Cloudflare)
Choose TLS_MODE=letsencrypt-dns at installation and supply CF_DNS_API_TOKEN privately with DNS edit permission for the intended zone. The installer sets CERT_RESOLVER=letsencrypt-dns, selecting the DNS-01 resolver for panel and login routes and for deployed apps. Apps share one wildcard certificate for PANEL_SERVICE_DOMAIN and *.PANEL_SERVICE_DOMAIN instead of one certificate each (see Domains and DNS). A token alone does not switch the router's resolver. TLS_MODE=cloudflare, the old name, still works and gives the same result; the installer prints a one-line note when you use it. Existing installations keep CERT_RESOLVER=letsencrypt-dns in .env and need no change. DNS-01 does not need inbound port 80 for certificate validation; HTTPS still needs port 443. Custom domains still use HTTP-01 and need port 80.
How the challenge is answered (DNS-01 bridge). A new installation writes DNS01_PROVIDER=httpreq and a random DNS01_BRIDGE_SECRET to .env. Traefik then holds no DNS token: for each challenge it calls the panel on the internal port 8081, and the panel publishes the TXT record with the DNS provider saved in Settings → Connectivity → DNS & Domains (Cloudflare or PowerDNS). Until a token is saved there, the panel uses CF_DNS_API_TOKEN from .env (deprecated; it will be removed in a later release). The bridge:
- is not routed by Traefik and not published on the host, and accepts requests only from the Traefik container, with the per-install secret;
- writes only
_acme-challengeTXT records with a DNS-01 value, only for the panel domain, the service domain and names under them, and only in the configured zone; - needs the panel to be running when a certificate is issued or renewed. Traefik renews 30 days before expiry, so a short panel outage does not cost a certificate.
Installations from before the bridge move to it automatically on update. Their .env has no DNS01_PROVIDER, so Traefik keeps its own Cloudflare provider with CF_DNS_API_TOKEN until the bridge is proven to work. The host updater does this on an update or on Settings → Updates → Apply again:
- It adds a generated
DNS01_BRIDGE_SECRETto.env, so the new panel starts its bridge. Traefik still uses its own token. - Once the update is healthy, it asks the bridge from inside the Traefik container whether it can answer a challenge for the panel domain (a check that only lists DNS zones and writes no record). Only when it answers does the updater add
DNS01_PROVIDER=httpreq, recreate Traefik and the panel, and check again. - When the second check fails, it puts back the copy of
.envit made just before (/opt/aiadminpanel/backups/env.pre-dns01-bridge-*) and recreates Traefik on its own token again. The update itself still succeeds.
When the bridge answers with the token saved in Settings, the updater also adds TRAEFIK_CF_DNS_API_TOKEN= (empty), so Traefik no longer holds a Cloudflare token. CF_DNS_API_TOKEN stays in .env: the panel falls back to it, and a rollback to a release from before the bridge needs it. When the bridge does not answer (no DNS token in Settings and none in .env, or a token that does not reach the panel domain's zone), nothing is switched and the next update tries again; save the token in Settings, then use Apply again. A DNS01_PROVIDER you set yourself is never changed.
This needs a host updater from this release or later. A panel update does not yet replace the updater on the host (AI-1471); run sudo bash install.sh --refresh-updater once on an older installation, then update or use Apply again.
To go back to Traefik's own token, set DNS01_PROVIDER=cloudflare in .env, delete the TRAEFIK_CF_DNS_API_TOKEN line, and run docker compose up -d traefik panel in /opt/aiadminpanel. The updater does not change a DNS01_PROVIDER that is set.
The secret stays in .env (mode 600 at /opt/aiadminpanel/.env); the panel never logs it. Rotate it by replacing the value and recreating both containers.
Cloudflare record automation and certificate validation are separate concerns. Without record automation, a wildcard record can cover service subdomains. Confirm the final service URL opens; a deployed container alone does not prove DNS or TLS.
Temporary domains
When the installer claims a temporary domain, its claim token is stored in /opt/aiadminpanel/secrets/managed_domain_token and mounted as a Compose secret. Keep that file with the installation. Use the wizard or Settings → DNS & Domains to verify your email and monitor renewal. See Keeping your free domain for lease and recovery details.
Browser security headers
The panel sets these headers on its own responses, whatever proxy is in front of it. Nothing needs configuring, and apps you deploy keep their own headers.
| Header | Value | Why |
|---|---|---|
Content-Security-Policy | see below | The browser runs only scripts the panel serves and connects only to the panel and its sign-in service. Another website cannot show the panel in a frame and trick you into clicking (clickjacking). |
X-Frame-Options | SAMEORIGIN | The same protection for older browsers. |
X-Content-Type-Options | nosniff | The browser uses each file only as its declared type. |
Referrer-Policy | strict-origin-when-cross-origin | Other sites see only the panel's address, never the page path. |
Strict-Transport-Security | max-age=15552000 | Over HTTPS only: the browser uses HTTPS for the panel for 180 days. It does not cover subdomains, so apps on subdomains are not affected. |
The content security policy, for a panel at panel.example.com:
default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline';
img-src 'self' data: blob:; font-src 'self' data:;
connect-src 'self' wss://panel.example.com https://auth.panel.example.com;
frame-src 'self' https://auth.panel.example.com; worker-src 'self' blob:;
frame-ancestors 'self'; object-src 'none'; base-uri 'self'
- Scripts run only from files the panel serves. An injected
<script>oronclick=does not run. - The browser connects only to the panel, its websockets (terminal, live logs) and the sign-in service (
auth.<panel-domain>, orOIDC_ISSUER_URL). The websocket address comes fromPANEL_URL, orPANEL_DOMAINwhen that is unset. - Inline styles are allowed because the panel's UI library writes them at runtime. They cannot run code.
- Images come only from the panel itself and from
data:/blob:addresses (uploaded branding logos, QR codes). The panel loads no image from another website.
If a page stops working after an update, open the browser's developer console: a blocked file is named there with the directive that blocked it. Please report it.
Private answers (the API, the customer portal API and MCP, errors included) carry Cache-Control: no-store, so a browser or proxy does not keep a copy. The app page is checked for a new version on every load, and the app's hashed files under /assets/ are cached for a year. A missing file answers 404, not the app page.
To check an installation, run curl -sI https://<panel-domain>/ and look for the headers above.
Secrets and recovery
The default OpenBao backend stores managed secrets; some configuration also lives in the database and installation files. Keeping only a PostgreSQL dump is not a complete recovery plan. Include OpenBao data, its unseal material, volumes, and host configuration using the procedures in Backup and Restore and the repository's docs/runbooks/openbao.md. Restrict access to backups as you would to the running server.