Environment variables
Every environment variable that an application, the service, the executor, the console and the Compose files read, and the service's operator commands.
Variables are grouped by the process that reads them. Developers need only Application. The rest is for operators, and Self-host Acclimate shows where each runtime file lives.
Application
Read by the SDKs
createAcclimate() and Acclimate.from_env() read these, or take each value as an option. acclimate pull reads ACCLIMATE_TOKEN when its config names no token.
| Variable | Required | Value |
|---|---|---|
ACCLIMATE_URL | Yes | Public HTTPS base URL of the API |
ACCLIMATE_WORKSPACE | Yes | Workspace ID |
ACCLIMATE_TOKEN | Yes | The credential for the application's calls. See Credentials and rights. |
Used by convention
The SDKs do not read these. The console's App setup code and the repository examples pass them to the client.
| Variable | Value |
|---|---|
ACCLIMATE_BUNDLE | Bundle ID |
ACCLIMATE_CHANNEL | Channel name, such as stable |
ACCLIMATE_CONNECTION | Connection ID, passed as connectionId |
ACCLIMATE_RECEIPT_TOKEN | Optional receipt credential, kept apart from ACCLIMATE_TOKEN |
ACCLIMATE_CACHE | Cache directory, in place of the SDK's default |
ACCLIMATE_JOB_DIR | Directory the job's files are written to |
AGENT_TASK | Task text for the console's connected agent example |
Service
The issuer and the login and console tokens must equal their console values. The login token, the console token and every static machine token must differ from each other.
| Variable | Required | Default | Value |
|---|---|---|---|
DATABASE_URL | Yes | None | postgresql:// or postgres:// URL with an explicit host, user and database. URL-encode only the password. |
ACCLIMATE_BIND | No | 127.0.0.1:3000 | Private API listener. Compose sets 0.0.0.0:3000. |
ACCLIMATE_INTERNAL_BIND | No | 127.0.0.1:3001 | Listener the executor connects to. Compose sets executor-listener:3001. |
ACCLIMATE_OIDC_ISSUER | Yes | None | HTTPS realm issuer, including any trailing slash, with no credentials, query or fragment |
ACCLIMATE_LOGIN_TOKEN | Yes | None | Login authority token |
ACCLIMATE_CONSOLE_TOKEN | Yes | None | Console transport token |
ACCLIMATE_OPERATORS | Yes | None | Non-empty JSON array of { "issuer", "subject" }, one for each operator |
ACCLIMATE_AUTH | Yes | None | JSON array of static machine grants, or [] |
ACCLIMATE_SERVICE_BINARY | No | target/release/acclimate-service under the checkout | Executable path, read only by the npm start wrapper outside a container |
- Each operator pair must be unique. Its
issuermust equalACCLIMATE_OIDC_ISSUER, and itssubjectmust be nonempty and at most 512 bytes. - Use
ACCLIMATE_AUTH=[]when every machine token is issued from the console, or none is needed.
Removed settings
The service refuses to start when any of these is defined, even when empty, and names the first one it finds. The console also refuses the first two. Delete them from older runtime files.
| Variables | Log message |
|---|---|
ACCLIMATE_MODE, CONSOLE_MODE | are obsolete from the service, is obsolete from the console |
ACCLIMATE_CRITIC_MODEL, ACCLIMATE_CRITIC_ENDPOINT, ACCLIMATE_CRITIC_TOKEN, ACCLIMATE_LEARNING_REVIEW_SECONDS, ACCLIMATE_LEARNING_PARENT_MAX_REUSES, ACCLIMATE_LEARNING_PARENT_MAX_AGE_SECONDS, ACCLIMATE_LEARNING_PAIR_BUDGET, ACCLIMATE_LEARNING_MAX_REPETITIONS, ACCLIMATE_LEARNING_CALIBRATION_REPETITIONS, ACCLIMATE_LEARNING_MAX_STEPS_BETWEEN_AUDITS, ACCLIMATE_LEARNING_MAX_CHAIN_AGE_SECONDS, ACCLIMATE_LEARNING_CALIBRATION_ATTEMPTS, ACCLIMATE_LEARNING_FAILURE_WINDOW_SECONDS, ACCLIMATE_PROPOSAL_GROWTH_FLOOR_BYTES, ACCLIMATE_EVALUATION_ABANDON_SECONDS | <name> has been removed |
Static machine grants
ACCLIMATE_AUTH holds machine tokens fixed in the service's environment. Changing it needs a restart.
[
{
"token": "<secret>",
"principalId": "support-agent",
"workspaceId": "<workspace-id>",
"rights": ["read", "write"]
}
]rightsholds any ofread,writeandpromote.- A token identifies one principal and can appear once for each workspace. A
principalIdmust not contain a colon.
Optimizer
These service variables set the optimizer, the model that changes bundles in a learning round. Without them, delivery works but starting a loop gets optimizer-required. See Set the optimizer model.
| Variable | Required | Default | Value |
|---|---|---|---|
ACCLIMATE_MODEL_ENDPOINT | No | Unset | Full URL of an OpenAI-compatible Chat Completions route, posted to as written, with no embedded credentials |
ACCLIMATE_MODEL_TOKEN | With the endpoint | None | Bearer credential, nonblank, with no control characters |
ACCLIMATE_MODEL | With the endpoint | None | Model ID, 1 to 256 bytes after trimming, with no control characters |
ACCLIMATE_MODEL_REASONING_EFFORT | No | Unset | low, medium, high, xhigh, max or ultra. Unset omits reasoning_effort. |
ACCLIMATE_MODEL_TIMEOUT_SECONDS | No | 600 | Timeout for each HTTP attempt, 30 to 3,600 |
ACCLIMATE_MODEL_MAX_COMPLETION_TOKENS | No | 32768 | max_completion_tokens on each call, 1,024 to 262,144 |
ACCLIMATE_LEARNING_MAX_FAILED_ROUNDS | No | 3 | Consecutive failed rounds before the loop pauses, 1 to 4,294,967,295 |
- A round pins
ACCLIMATE_MODELandACCLIMATE_MODEL_REASONING_EFFORTwhen it starts. - An invalid timeout, token limit or reasoning effort stops the service at startup, even without an endpoint. An unset, zero or invalid failed-round limit uses
3. - The service retries HTTP 429, HTTP 5xx and connection or timeout errors twice.
Model provider
The task model and the judge model come from the model provider a workspace administrator saves in the console. These service variables control how it is stored and reached.
| Variable | Required | Default | Value |
|---|---|---|---|
ACCLIMATE_PROVIDER_ENCRYPTION_KEY | For learning | Unset | 64 hex characters that encrypt the stored provider API keys |
ACCLIMATE_PROVIDER_HTTP_HOSTS | No | Empty | Comma-separated hosts a provider may reach over plain HTTP or at a private address |
Without the provider encryption key, the service starts but cannot save a model provider. See Keep the provider encryption key.
Provider addresses
Set ACCLIMATE_PROVIDER_HTTP_HOSTS to the same value on the service and the executor. Each entry is an exact hostname or IP address, compared without case. The service checks a provider's base URL when it is saved, and the executor checks the addresses the host resolves to.
- The base URL must use HTTPS, or plain HTTP for a listed host. It must not contain a user name, password, query or fragment.
- Loopback addresses,
localhostand*.localhost, private IPv4, carrier-grade NAT (100.64.0.0/10) and IPv6 unique-local addresses need the host on the list, even over HTTPS. - These are always refused: link-local, unspecified, multicast and broadcast addresses, the cloud metadata addresses
100.100.100.200,168.63.129.16andfd00:ec2::254, and the hostnamesmetadata.google.internalandmetadata.goog.
Invitation email
Set these on the service to send workspace invitations by email. Keycloak's own email is configured separately.
| Variable | Required | Default | Value |
|---|---|---|---|
ACCLIMATE_SMTP_HOST | No | Unset | SMTP relay hostname, required when any other ACCLIMATE_SMTP_* variable is set |
ACCLIMATE_SMTP_FROM | With SMTP | None | Sender mailbox, such as Acclimate <noreply@example.com> |
ACCLIMATE_CONSOLE_ORIGIN | With SMTP | None | The console's CONSOLE_ORIGIN, used in invitation links |
ACCLIMATE_SMTP_TLS | No | starttls | starttls, tls for implicit TLS, or none |
ACCLIMATE_SMTP_PORT | No | 465 with tls, otherwise 587 | 1 to 65,535 |
ACCLIMATE_SMTP_USERNAME | No | Unset | SMTP user name, set together with the password |
ACCLIMATE_SMTP_PASSWORD | No | Unset | SMTP password, set together with the user name |
ACCLIMATE_SMTP_TLS=none is accepted only for localhost, 127.0.0.1, ::1 and mailpit, and only without SMTP credentials.
Executor
The executor runs learning rollouts in sandboxes. In the bundled deployment, Compose sets most of these. See Enable learning.
| Variable | Required | Default | Value |
|---|---|---|---|
ACCLIMATE_EXECUTOR_SERVICE | Yes | None | Base URL of the service's executor listener. Compose sets http://service:3001. |
ACCLIMATE_EXECUTOR_TOKEN_FILE | One of the two | None | File that holds the executor credential, as the token alone or the JSON that --create-executor-token prints. A missing, unreadable or empty file stops the executor. |
ACCLIMATE_EXECUTOR_TOKEN | One of the two | None | The executor credential itself, read only when the file variable is unset |
ACCLIMATE_SANDBOX_RUNTIME | No | runsc | runsc for gVisor, or docker |
ACCLIMATE_RUNNER_IMAGE | No | acclimate-chat:1 | Runner image each sandbox runs, present at startup. Compose sets the release's acclimate-runner. |
ACCLIMATE_SANDBOX_DIR | No | /var/lib/acclimate-executor | Directory for the files of each leased rollout |
ACCLIMATE_SANDBOX_VOLUME | No | Unset | Docker volume mounted at ACCLIMATE_SANDBOX_DIR, when the executor runs in a container |
ACCLIMATE_EXECUTOR_CONCURRENCY | No | 1 | Rollouts run at once |
ACCLIMATE_EXECUTOR_HEALTH_FILE | No | /tmp/acclimate-executor-health | File touched after each successful lease request and heartbeat |
ACCLIMATE_PROVIDER_HTTP_HOSTS | No | Empty | The service's value. See Provider addresses. |
acclimate-executor --healthexits 0 when the health file is at most 120 seconds old.- A wrong credential, runner image or sandbox runtime, or a failed startup sandbox check, makes the executor exit with status 78 and a message naming the fault. See Check the executor.
Console
| Variable | Required | Default | Value |
|---|---|---|---|
CONSOLE_ORIGIN | Yes | None | Canonical public HTTPS origin, with no path or trailing slash |
CONSOLE_PUBLIC_API_URL | Yes | None | Public HTTPS base URL of the API, shown in App setup |
CONSOLE_SERVICE_URL | Yes | None | Private HTTP or HTTPS base URL of the API, http://service:3000 in Compose |
CONSOLE_LOGIN_TOKEN | Yes | None | The service's ACCLIMATE_LOGIN_TOKEN |
CONSOLE_SERVICE_TOKEN | Yes | None | The service's ACCLIMATE_CONSOLE_TOKEN |
CONSOLE_OIDC_ISSUER | Yes | None | The service's ACCLIMATE_OIDC_ISSUER |
CONSOLE_OIDC_CLIENT_ID | Yes | None | Confidential OIDC client ID. The bundled realm uses acclimate-console. |
CONSOLE_OIDC_CLIENT_SECRET | Yes | None | Secret of that client |
CONSOLE_ALLOW_EDITS | No | Disabled | The literal true lets members with the right role make changes. Otherwise the console is read-only. |
CONSOLE_WORKSPACE | No | Unset | Fallback workspace when the user has no saved selection. Prefer choosing in the console. |
CONSOLE_BUNDLE | No | Unset | Fallback bundle in the same case |
CONSOLE_CHANNEL | No | Unset | Fallback channel in the same case. Many operations use stable without one. |
HOST | No | 127.0.0.1 | Listener address. Compose sets 0.0.0.0. |
PORT | No | 3100 | Listener port, 1 to 65,535 |
NODE_ENV | No | None | The console image runs with production |
- The trusted proxy must send the host of
CONSOLE_ORIGINasHost. - Register
CONSOLE_ORIGINplus/auth/callbackas the OIDC client's redirect URI. CONSOLE_SESSION_TOKENis not a setting. The console derives it from each request's session cookie.- In the bundled deployment, leave Nitro's
NITRO_HOST,NITRO_PORT,NITRO_UNIX_SOCKET,NITRO_SSL_CERTandNITRO_SSL_KEYunset, so the health check and proxy reach the private HTTP listener.
Compose
Compose reads these from .env in the checkout, for compose.yaml and the Keycloak overlay compose.keycloak.yaml. deploy/init.sh writes COMPOSE_FILE, the hostnames, ACME_EMAIL, ACCLIMATE_CONFIG_DIR and ACCLIMATE_VERSION. Every path is absolute.
| Variable | Required | Default | Value |
|---|---|---|---|
COMPOSE_FILE | No | compose.yaml | Compose files to merge, separated by :. init.sh adds the overlay. |
CONSOLE_HOST | Yes | None | Public hostname of the console, with no scheme or path |
API_HOST | Yes | None | Public hostname of the API, different from CONSOLE_HOST |
KEYCLOAK_HOST | With the overlay | None | Public hostname of Keycloak, different from the other two |
ACME_EMAIL | Yes | None | Contact email for the certificates Caddy requests |
ACCLIMATE_CONFIG_DIR | Unless every file below is set | None | Private directory with the runtime files |
ACCLIMATE_VERSION | No | local | Tag of the service, console, executor and runner images. local names images built from the checkout. |
COMPOSE_PROFILES | No | None | learning adds the executor and the runner. See Enable learning. |
ACCLIMATE_SERVICE_ENV | No | service.env in the private directory | Service runtime file |
ACCLIMATE_CONSOLE_ENV | No | console.env | Console runtime file |
ACCLIMATE_POSTGRES_PASSWORD_FILE | No | postgres-password | The raw PostgreSQL password |
ACCLIMATE_EXECUTOR_TOKEN_FILE | No | executor-token | The executor credential |
ACCLIMATE_KEYCLOAK_ENV | No | keycloak.env | Keycloak runtime file |
ACCLIMATE_KEYCLOAK_POSTGRES_PASSWORD_FILE | No | keycloak-postgres-password | Keycloak's raw database password |
KEYCLOAK_ADMIN_PORT | No | 8180 | Port of Keycloak's admin console on the host's 127.0.0.1 |
ACCLIMATE_SERVICE_IMAGE, ACCLIMATE_CONSOLE_IMAGE, ACCLIMATE_EXECUTOR_IMAGE, ACCLIMATE_RUNNER_IMAGE | No | GHCR at ACCLIMATE_VERSION | Full image reference. The runner image is also passed to the executor. |
- The password in
postgres-passwordmust match the URL-encoded password inDATABASE_URL.init.shwrites hex passwords, which need no encoding. - Set
ACCLIMATE_VERSIONto an exact release without the Git tag's leadingv, such as0.1.0, or keeplocalto build from the checkout. See Versioning and compatibility. - Compose passes
ACCLIMATE_PROVIDER_HTTP_HOSTS,ACCLIMATE_EXECUTOR_CONCURRENCYandACCLIMATE_SANDBOX_RUNTIMEfrom.envto the executor, not from the service's runtime file. - Every container keeps at most five 10 MB log files, so Docker needs no log rotation setting.
Keycloak runtime file
keycloak.env holds these for the co-hosted Keycloak. Keycloak reads all but KC_DB_PASSWORD only when it first imports the realm.
| Variable | Value |
|---|---|
KC_DB_PASSWORD | Raw password from the keycloak-postgres-password file |
ACCLIMATE_CONSOLE_ORIGIN | The console's CONSOLE_ORIGIN |
ACCLIMATE_OIDC_CLIENT_SECRET | The console's CONSOLE_OIDC_CLIENT_SECRET |
ACCLIMATE_FIRST_USER_ID | UUID of the first person, also their subject in ACCLIMATE_OPERATORS |
ACCLIMATE_FIRST_USER_EMAIL | The first person's email address and Keycloak user name |
ACCLIMATE_FIRST_USER_PASSWORD | The first person's temporary password |
Service commands
Every command except --check-grants connects to the database, so run it with the service's DATABASE_URL. In the bundled deployment, run it through docker compose exec -T service acclimate-service. When the service will not stay up, use docker compose run --rm service <command> instead. Enable learning gives the order for the executor commands.
| Command | What it does |
|---|---|
acclimate-service --create-executor-token | Creates an executor credential and prints it as JSON with id and token |
acclimate-service --list-executor-tokens | Prints a JSON array of executor credentials, never their tokens |
acclimate-service --revoke-executor-token <id> | Revokes one executor credential |
acclimate-service --set-model-provider <workspace-id> | Saves the workspace's model provider from a JSON document on standard input |
acclimate-service --reset-provider-keys --confirm | Deletes every stored model provider and the key check value, then prints {"removedProviders": n} |
acclimate-service --check-grants | Checks an ACCLIMATE_AUTH value from standard input, without starting the service |
--list-executor-tokensprints each credential'sid,createdAt,lastSeenAt, declaredruntime,revokedandrevokedAt.--set-model-providerreads up to 1 MiB of{"baseUrl": "…", "allowedModels": ["…"], "apiKey": "…"}with no other field, and prints nothing. It needsACCLIMATE_PROVIDER_ENCRYPTION_KEY, applies the provider address rules and replaces any provider the workspace has. A loop cannot start until the executor has verified the new provider.--reset-provider-keysdeletes each provider's URL, allowed models and provider API key. Use it only to start again with a new provider encryption key, after which each workspace administrator enters the model provider again. Without--confirm, it deletes nothing.--check-grantsreads up to 1 MiB of JSON and never echoes it. It prints{"schemaVersion":1,"valid":true}and exits 0, or prints{"schemaVersion":1,"valid":false,"code":"grants.invalid"}to standard error and exits with a failure status.