Skip to Content
Acclimate
Reference

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.

VariableRequiredValue
ACCLIMATE_URLYesPublic HTTPS base URL of the API
ACCLIMATE_WORKSPACEYesWorkspace ID
ACCLIMATE_TOKENYesThe 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.

VariableValue
ACCLIMATE_BUNDLEBundle ID
ACCLIMATE_CHANNELChannel name, such as stable
ACCLIMATE_CONNECTIONConnection ID, passed as connectionId
ACCLIMATE_RECEIPT_TOKENOptional receipt credential, kept apart from ACCLIMATE_TOKEN
ACCLIMATE_CACHECache directory, in place of the SDK's default
ACCLIMATE_JOB_DIRDirectory the job's files are written to
AGENT_TASKTask 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.

VariableRequiredDefaultValue
DATABASE_URLYesNonepostgresql:// or postgres:// URL with an explicit host, user and database. URL-encode only the password.
ACCLIMATE_BINDNo127.0.0.1:3000Private API listener. Compose sets 0.0.0.0:3000.
ACCLIMATE_INTERNAL_BINDNo127.0.0.1:3001Listener the executor connects to. Compose sets executor-listener:3001.
ACCLIMATE_OIDC_ISSUERYesNoneHTTPS realm issuer, including any trailing slash, with no credentials, query or fragment
ACCLIMATE_LOGIN_TOKENYesNoneLogin authority token
ACCLIMATE_CONSOLE_TOKENYesNoneConsole transport token
ACCLIMATE_OPERATORSYesNoneNon-empty JSON array of { "issuer", "subject" }, one for each operator
ACCLIMATE_AUTHYesNoneJSON array of static machine grants, or []
ACCLIMATE_SERVICE_BINARYNotarget/release/acclimate-service under the checkoutExecutable path, read only by the npm start wrapper outside a container
  • Each operator pair must be unique. Its issuer must equal ACCLIMATE_OIDC_ISSUER, and its subject must 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.

VariablesLog message
ACCLIMATE_MODE, CONSOLE_MODEare 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"]
  }
]
  • rights holds any of read, write and promote.
  • A token identifies one principal and can appear once for each workspace. A principalId must 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.

VariableRequiredDefaultValue
ACCLIMATE_MODEL_ENDPOINTNoUnsetFull URL of an OpenAI-compatible Chat Completions route, posted to as written, with no embedded credentials
ACCLIMATE_MODEL_TOKENWith the endpointNoneBearer credential, nonblank, with no control characters
ACCLIMATE_MODELWith the endpointNoneModel ID, 1 to 256 bytes after trimming, with no control characters
ACCLIMATE_MODEL_REASONING_EFFORTNoUnsetlow, medium, high, xhigh, max or ultra. Unset omits reasoning_effort.
ACCLIMATE_MODEL_TIMEOUT_SECONDSNo600Timeout for each HTTP attempt, 30 to 3,600
ACCLIMATE_MODEL_MAX_COMPLETION_TOKENSNo32768max_completion_tokens on each call, 1,024 to 262,144
ACCLIMATE_LEARNING_MAX_FAILED_ROUNDSNo3Consecutive failed rounds before the loop pauses, 1 to 4,294,967,295
  • A round pins ACCLIMATE_MODEL and ACCLIMATE_MODEL_REASONING_EFFORT when 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.

VariableRequiredDefaultValue
ACCLIMATE_PROVIDER_ENCRYPTION_KEYFor learningUnset64 hex characters that encrypt the stored provider API keys
ACCLIMATE_PROVIDER_HTTP_HOSTSNoEmptyComma-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, localhost and *.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.16 and fd00:ec2::254, and the hostnames metadata.google.internal and metadata.goog.

Invitation email

Set these on the service to send workspace invitations by email. Keycloak's own email is configured separately.

VariableRequiredDefaultValue
ACCLIMATE_SMTP_HOSTNoUnsetSMTP relay hostname, required when any other ACCLIMATE_SMTP_* variable is set
ACCLIMATE_SMTP_FROMWith SMTPNoneSender mailbox, such as Acclimate <noreply@example.com>
ACCLIMATE_CONSOLE_ORIGINWith SMTPNoneThe console's CONSOLE_ORIGIN, used in invitation links
ACCLIMATE_SMTP_TLSNostarttlsstarttls, tls for implicit TLS, or none
ACCLIMATE_SMTP_PORTNo465 with tls, otherwise 5871 to 65,535
ACCLIMATE_SMTP_USERNAMENoUnsetSMTP user name, set together with the password
ACCLIMATE_SMTP_PASSWORDNoUnsetSMTP 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.

VariableRequiredDefaultValue
ACCLIMATE_EXECUTOR_SERVICEYesNoneBase URL of the service's executor listener. Compose sets http://service:3001.
ACCLIMATE_EXECUTOR_TOKEN_FILEOne of the twoNoneFile 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_TOKENOne of the twoNoneThe executor credential itself, read only when the file variable is unset
ACCLIMATE_SANDBOX_RUNTIMENorunscrunsc for gVisor, or docker
ACCLIMATE_RUNNER_IMAGENoacclimate-chat:1Runner image each sandbox runs, present at startup. Compose sets the release's acclimate-runner.
ACCLIMATE_SANDBOX_DIRNo/var/lib/acclimate-executorDirectory for the files of each leased rollout
ACCLIMATE_SANDBOX_VOLUMENoUnsetDocker volume mounted at ACCLIMATE_SANDBOX_DIR, when the executor runs in a container
ACCLIMATE_EXECUTOR_CONCURRENCYNo1Rollouts run at once
ACCLIMATE_EXECUTOR_HEALTH_FILENo/tmp/acclimate-executor-healthFile touched after each successful lease request and heartbeat
ACCLIMATE_PROVIDER_HTTP_HOSTSNoEmptyThe service's value. See Provider addresses.
  • acclimate-executor --health exits 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

VariableRequiredDefaultValue
CONSOLE_ORIGINYesNoneCanonical public HTTPS origin, with no path or trailing slash
CONSOLE_PUBLIC_API_URLYesNonePublic HTTPS base URL of the API, shown in App setup
CONSOLE_SERVICE_URLYesNonePrivate HTTP or HTTPS base URL of the API, http://service:3000 in Compose
CONSOLE_LOGIN_TOKENYesNoneThe service's ACCLIMATE_LOGIN_TOKEN
CONSOLE_SERVICE_TOKENYesNoneThe service's ACCLIMATE_CONSOLE_TOKEN
CONSOLE_OIDC_ISSUERYesNoneThe service's ACCLIMATE_OIDC_ISSUER
CONSOLE_OIDC_CLIENT_IDYesNoneConfidential OIDC client ID. The bundled realm uses acclimate-console.
CONSOLE_OIDC_CLIENT_SECRETYesNoneSecret of that client
CONSOLE_ALLOW_EDITSNoDisabledThe literal true lets members with the right role make changes. Otherwise the console is read-only.
CONSOLE_WORKSPACENoUnsetFallback workspace when the user has no saved selection. Prefer choosing in the console.
CONSOLE_BUNDLENoUnsetFallback bundle in the same case
CONSOLE_CHANNELNoUnsetFallback channel in the same case. Many operations use stable without one.
HOSTNo127.0.0.1Listener address. Compose sets 0.0.0.0.
PORTNo3100Listener port, 1 to 65,535
NODE_ENVNoNoneThe console image runs with production
  • The trusted proxy must send the host of CONSOLE_ORIGIN as Host.
  • Register CONSOLE_ORIGIN plus /auth/callback as the OIDC client's redirect URI.
  • CONSOLE_SESSION_TOKEN is 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_CERT and NITRO_SSL_KEY unset, 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.

VariableRequiredDefaultValue
COMPOSE_FILENocompose.yamlCompose files to merge, separated by :. init.sh adds the overlay.
CONSOLE_HOSTYesNonePublic hostname of the console, with no scheme or path
API_HOSTYesNonePublic hostname of the API, different from CONSOLE_HOST
KEYCLOAK_HOSTWith the overlayNonePublic hostname of Keycloak, different from the other two
ACME_EMAILYesNoneContact email for the certificates Caddy requests
ACCLIMATE_CONFIG_DIRUnless every file below is setNonePrivate directory with the runtime files
ACCLIMATE_VERSIONNolocalTag of the service, console, executor and runner images. local names images built from the checkout.
COMPOSE_PROFILESNoNonelearning adds the executor and the runner. See Enable learning.
ACCLIMATE_SERVICE_ENVNoservice.env in the private directoryService runtime file
ACCLIMATE_CONSOLE_ENVNoconsole.envConsole runtime file
ACCLIMATE_POSTGRES_PASSWORD_FILENopostgres-passwordThe raw PostgreSQL password
ACCLIMATE_EXECUTOR_TOKEN_FILENoexecutor-tokenThe executor credential
ACCLIMATE_KEYCLOAK_ENVNokeycloak.envKeycloak runtime file
ACCLIMATE_KEYCLOAK_POSTGRES_PASSWORD_FILENokeycloak-postgres-passwordKeycloak's raw database password
KEYCLOAK_ADMIN_PORTNo8180Port of Keycloak's admin console on the host's 127.0.0.1
ACCLIMATE_SERVICE_IMAGE, ACCLIMATE_CONSOLE_IMAGE, ACCLIMATE_EXECUTOR_IMAGE, ACCLIMATE_RUNNER_IMAGENoGHCR at ACCLIMATE_VERSIONFull image reference. The runner image is also passed to the executor.
  • The password in postgres-password must match the URL-encoded password in DATABASE_URL. init.sh writes hex passwords, which need no encoding.
  • Set ACCLIMATE_VERSION to an exact release without the Git tag's leading v, such as 0.1.0, or keep local to build from the checkout. See Versioning and compatibility.
  • Compose passes ACCLIMATE_PROVIDER_HTTP_HOSTS, ACCLIMATE_EXECUTOR_CONCURRENCY and ACCLIMATE_SANDBOX_RUNTIME from .env to 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.

VariableValue
KC_DB_PASSWORDRaw password from the keycloak-postgres-password file
ACCLIMATE_CONSOLE_ORIGINThe console's CONSOLE_ORIGIN
ACCLIMATE_OIDC_CLIENT_SECRETThe console's CONSOLE_OIDC_CLIENT_SECRET
ACCLIMATE_FIRST_USER_IDUUID of the first person, also their subject in ACCLIMATE_OPERATORS
ACCLIMATE_FIRST_USER_EMAILThe first person's email address and Keycloak user name
ACCLIMATE_FIRST_USER_PASSWORDThe 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.

CommandWhat it does
acclimate-service --create-executor-tokenCreates an executor credential and prints it as JSON with id and token
acclimate-service --list-executor-tokensPrints 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 --confirmDeletes every stored model provider and the key check value, then prints {"removedProviders": n}
acclimate-service --check-grantsChecks an ACCLIMATE_AUTH value from standard input, without starting the service
  • --list-executor-tokens prints each credential's id, createdAt, lastSeenAt, declared runtime, revoked and revokedAt.
  • --set-model-provider reads up to 1 MiB of {"baseUrl": "…", "allowedModels": ["…"], "apiKey": "…"} with no other field, and prints nothing. It needs ACCLIMATE_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-keys deletes 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-grants reads 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.

On this page