Skip to content

Runtime Configuration Reference

Runtime environment variables and configuration item reference.

Updated View as Markdown

Stable identifier

This page collects Appaloft’s runtime environment variables — the ones you can set when starting the CLI, the Web console, or a self-hosted service. This is a different layer from appaloft.yml (the app deployment config file, see Configuration File Reference): appaloft.yml describes “what to deploy and how,” while this page describes “how Appaloft itself runs.”

CLI and authentication

VariableDescription
APPALOFT_HOMEThe storage directory for the CLI’s local profile, context, and handshake info; defaults to the user’s local Appaloft home
APPALOFT_TOKENThe scoped token used for non-interactive scenarios; takes priority over the legacy cookie in credential resolution
APPALOFT_AUTH_COOKIEFor legacy/diagnostic compatibility on trusted local operators only — not the recommended authentication path for an AI agent
APPALOFT_CONTROL_PLANE_MODEOverrides the CLI’s execution target: none (local), cloud, or self-hosted
APPALOFT_CONTROL_PLANE_URLExplicitly specifies the remote control plane address

See CLI reference for details.

VariableDescription
APPALOFT_DEV_DOCS_HOSTThe hostname the docs server binds to during local development
APPALOFT_DEV_DOCS_PORTThe port the docs server binds to during local development
APPALOFT_WEB_DEV_DOCS_TARGETOverrides the full target address for the Web dev server’s /docs/* redirect
APPALOFT_DOCS_STATIC_DIRThe directory for embedded docs static assets in a self-hosted deployment

Product version

VariableDescription
APPALOFT_APP_VERSIONInjects the product version shown in the Web console; development environments default to reading the version from the repository root package.json

Self-hosting: Web and authentication

VariableDescription
APPALOFT_WEB_ORIGINThe externally reachable origin for the Web console
APPALOFT_BETTER_AUTH_URLThe base URL of the authentication service
APPALOFT_BETTER_AUTH_COOKIE_DOMAINThe scope domain for the authentication cookie
APPALOFT_BETTER_AUTH_COOKIE_PREFIXThe name prefix for the authentication cookie
APPALOFT_BETTER_AUTH_TRUSTED_PROXY_HEADERSWhether to trust authentication-related headers forwarded by a reverse proxy

Self-hosting: login providers

ProviderRelated variables
GitHubAPPALOFT_GITHUB_CLIENT_ID, APPALOFT_GITHUB_CLIENT_SECRET, APPALOFT_GITHUB_REDIRECT_URI
GoogleAPPALOFT_GOOGLE_CLIENT_ID, APPALOFT_GOOGLE_CLIENT_SECRET, APPALOFT_GOOGLE_REDIRECT_URI
Generic OIDCAPPALOFT_OIDC_CLIENT_ID, APPALOFT_OIDC_CLIENT_SECRET, APPALOFT_OIDC_DISCOVERY_URL, APPALOFT_OIDC_REDIRECT_URI
GitHub integration (not login)APPALOFT_GITHUB_WEBHOOK_SECRET, APPALOFT_GITHUB_PREVIEW_FEEDBACK_TOKEN

Self-hosting: first admin bootstrap

VariableDescription
APPALOFT_FIRST_ADMIN_EMAILThe first admin account’s email
APPALOFT_FIRST_ADMIN_PASSWORD / APPALOFT_INITIAL_ADMIN_PASSWORDThe first admin account’s password
APPALOFT_FIRST_ADMIN_DISPLAY_NAMEThe first admin’s display name
APPALOFT_FIRST_ADMIN_ORGANIZATION_NAME / APPALOFT_FIRST_ADMIN_ORGANIZATION_SLUGThe first organization’s name and slug
APPALOFT_BOOTSTRAP_FIRST_ADMIN_OUTPUT_FILEThe file path the bootstrap result (excluding the plaintext password) is written to

See Creating The First Admin for details.

Self-hosting: database and upgrades

VariableDescription
APPALOFT_DATABASE_POOL_MAXThe database connection pool limit
APPALOFT_INSTANCE_UPGRADE_APPLY_ENABLEDWhether the instance is allowed to automatically apply upgrades
APPALOFT_REMOTE_PGLITE_SYNC_BACKUP_MAX_COUNT / APPALOFT_REMOTE_PGLITE_SYNC_BACKUP_RETENTION_DAYSThe count and retention-day limit for remote-state sync backups

See Database Maintenance for details.

Self-hosting: control plane encryption and tracing

VariableDescription
APPALOFT_CONTROL_PLANE_SECRET_KEYSThe set of keys the control plane uses for encryption/decryption
APPALOFT_CONTROL_PLANE_ACTIVE_SECRET_KEY_IDThe currently active key id
APPALOFT_EXPORT_PASSPHRASEThe encryption passphrase for data export
APPALOFT_TRACE_LINK_BASE_URLThe base address of the tracing system linked from structured errors

Self-hosting: worker and queue

Durable worker runtime configuration controls how accepted long-running work is claimed and monitored after a request returns an id. Operators can run appaloft worker for a dedicated worker process.

VariableDescription
APPALOFT_WORKER_COUNTThe number of workers started within a single process
APPALOFT_WORKER_GROUP / APPALOFT_WORKER_OBSERVED_GROUPSThe worker’s group and the observed groups
APPALOFT_WORKER_RUNTIME_MODEThe worker runtime mode
APPALOFT_WORKER_QUEUE_BACKEND / APPALOFT_WORKER_EXTERNAL_BACKEND_KINDThe queue backend type
APPALOFT_WORKER_SLOTThe worker slot identifier

Self-hosting: background schedulers

appaloft doctor, GET /api/system/doctor, and the Web Instance page show configured worker status only; they do not start workers, tick schedulers, or run maintenance work. By default at the configuration-library level, the certificate retry scheduler starts with the backend service so accepted certificate work can retry. Other scheduled workers are disabled by default.

Scheduled workers are disabled by default unless noted otherwise. The certificate retry scheduler is the default-on exception because it drains already accepted managed certificate work that is in retry-scheduled state. Runtime execution, runtime prune, history retention, monitoring collection, and preview cleanup workers stay disabled until an operator explicitly enables the matching APPALOFT_*_ENABLED setting.

VariableDefault
APPALOFT_CERTIFICATE_RETRY_SCHEDULER_ENABLEDtrue
APPALOFT_CERTIFICATE_RETRY_SCHEDULER_INTERVAL_SECONDS30
APPALOFT_CERTIFICATE_RETRY_DEFAULT_DELAY_SECONDS60
APPALOFT_CERTIFICATE_RETRY_SCHEDULER_BATCH_SIZE50
APPALOFT_SCHEDULED_TASK_RUNNER_ENABLEDfalse
APPALOFT_SCHEDULED_TASK_RUNNER_INTERVAL_SECONDS30
APPALOFT_SCHEDULED_TASK_RUNNER_BATCH_SIZE20
APPALOFT_SCHEDULED_RUNTIME_PRUNE_RUNNER_ENABLEDfalse
APPALOFT_SCHEDULED_RUNTIME_PRUNE_RUNNER_INTERVAL_SECONDS300
APPALOFT_SCHEDULED_RUNTIME_PRUNE_RUNNER_BATCH_SIZE20
APPALOFT_SCHEDULED_HISTORY_RETENTION_RUNNER_ENABLEDfalse
APPALOFT_SCHEDULED_HISTORY_RETENTION_RUNNER_INTERVAL_SECONDS3600
APPALOFT_SCHEDULED_HISTORY_RETENTION_RUNNER_BATCH_SIZE100
APPALOFT_RUNTIME_MONITORING_COLLECTOR_RUNNER_ENABLEDfalse
APPALOFT_RUNTIME_MONITORING_COLLECTOR_RUNNER_INTERVAL_SECONDS60
APPALOFT_RUNTIME_MONITORING_COLLECTOR_RUNNER_BATCH_SIZE50
APPALOFT_RUNTIME_MONITORING_RAW_RETENTION_HOURS24
APPALOFT_PREVIEW_EXPIRY_CLEANUP_SCHEDULER_ENABLEDfalse
APPALOFT_PREVIEW_EXPIRY_CLEANUP_SCHEDULER_INTERVAL_SECONDS300
APPALOFT_PREVIEW_EXPIRY_CLEANUP_SCHEDULER_BATCH_SIZE20
APPALOFT_PREVIEW_CLEANUP_RETRY_SCHEDULER_ENABLEDfalse
APPALOFT_PREVIEW_CLEANUP_RETRY_SCHEDULER_INTERVAL_SECONDS300
APPALOFT_PREVIEW_CLEANUP_RETRY_SCHEDULER_BATCH_SIZE20

These schedulers are disabled by default or require explicit enablement; a bad setting fails closed without starting the corresponding worker slice. The set includes the certificate retry scheduler, preview cleanup, preview expiry cleanup, scheduled task runner, scheduled runtime prune, scheduled history retention, and runtime monitoring collector.

Multiple background schedulers share the same variable naming pattern: APPALOFT_<SCHEDULER>_ENABLED (whether it’s enabled), APPALOFT_<SCHEDULER>_BATCH_SIZE (batch size per run), APPALOFT_<SCHEDULER>_INTERVAL_SECONDS (polling interval in seconds). For example, the certificate retry scheduler:

APPALOFT_CERTIFICATE_RETRY_SCHEDULER_ENABLED=true
APPALOFT_CERTIFICATE_RETRY_SCHEDULER_BATCH_SIZE=50
APPALOFT_CERTIFICATE_RETRY_SCHEDULER_INTERVAL_SECONDS=30

Other schedulers following the same pattern include:

  • APPALOFT_PREVIEW_CLEANUP_RETRY_SCHEDULER_* (preview cleanup retry)
  • APPALOFT_PREVIEW_EXPIRY_CLEANUP_SCHEDULER_* (preview expiry cleanup)
  • APPALOFT_RUNTIME_MONITORING_COLLECTOR_RUNNER_* (runtime monitoring collection)
  • APPALOFT_SCHEDULED_DEPENDENCY_BACKUP_RUNNER_* (scheduled dependency resource backups)
  • APPALOFT_SCHEDULED_STORAGE_VOLUME_BACKUP_RUNNER_* (scheduled storage volume backups)
  • APPALOFT_SCHEDULED_TASK_RUNNER_* (scheduled tasks)
  • APPALOFT_SCHEDULED_HISTORY_RETENTION_RUNNER_* (history retention cleanup)
  • APPALOFT_SCHEDULED_RUNTIME_PRUNE_RUNNER_* (runtime pruning)
  • APPALOFT_TUNNEL_RECONCILER_ENABLED / APPALOFT_TUNNEL_RECONCILE_BATCH_SIZE / APPALOFT_TUNNEL_RECONCILE_INTERVAL_SECONDS (tunnel reconciliation)

Self-hosting: retention windows and proxy

VariableDescription
APPALOFT_RUNTIME_MONITORING_RAW_RETENTION_HOURSRetention hours for raw runtime monitoring samples
APPALOFT_TERMINAL_SESSION_ACTIVE_TTL_SECONDSThe TTL for an active terminal session
APPALOFT_TERMINAL_SESSION_OUTPUT_RETENTION_BYTESThe byte limit for retained terminal session output
APPALOFT_TRAEFIK_IMAGEThe Traefik image reference used by the self-hosted proxy
APPALOFT_DOCKER_SWARM_EXECUTION_ENABLED / APPALOFT_DOCKER_SWARM_EDGE_NETWORKDocker Swarm execution mode and edge network

Error codes and recovery hints

If a misconfigured environment variable is preventing the service from starting, or is disabling some feature, run:

appaloft doctor

It checks the current instance’s system capabilities and known configuration problems, and gives actionable next steps.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close