Skip to main content

Environment Variables Reference

This page consolidates all environment variables used across all deployment targets.

Backend Variables​

Required (All Targets)​

VariableDescriptionExample
CLERK_PUBLISHABLE_KEYClerk publishable keypk_live_abc123...
CLERK_SECRET_KEYClerk secret keysk_live_xyz789...
CORS_ORIGINAllowed CORS origin (frontend URL)https://app.example.com

The two Clerk keys are required in Clerk mode, the default. An install that signs in through its own identity provider (AUTH_MODE=oidc) needs no Clerk key: see Sign-in.

Required (Production)​

VariableDescriptionNotes
ENCRYPTION_SECRETKey for the settings encrypted at rest (Elasticsearch, integration and certificate secrets)At least 32 characters (openssl rand -base64 32). There is no fallback: without it, encrypted settings can be neither saved nor read. Keep it stable; if it changes, the saved settings can no longer be read
CLI_AUTH_SECRETJWT signing key for CLI device-flow sign-in (achilles login)openssl rand -base64 32. Without it CLI sign-in returns an error. Not used on Vercel (no CLI sign-in routes)
AGENT_SERVER_URLExternal URL agents use to reach the backend. It is put in enrollment commands, and CLI tokens are bound to it: changing it invalidates outstanding CLI access tokens (the CLI gets a new one on its next refresh)Must include https://
SESSION_SECRETNot read by the backend today. The setup scripts, render.yaml and the installer still generate it, and it is harmless to keepopenssl rand -base64 32

Sign-in​

Which way people sign in to the console: Clerk (the default) or your organization's own identity provider over OpenID Connect (OIDC Sign-in, which explains each setting, roles, and when access ends). The OIDC_* variables are read only when AUTH_MODE=oidc; with Clerk, the backend warns at start when OIDC_ISSUER is set. OIDC mode needs the console and its API on one origin, as the Server Installer sets them up, and is not available on Vercel.

VariableDefaultDescription
AUTH_MODEclerkclerk or oidc. Unset or empty means Clerk; any other value stops the backend at start
OIDC_ISSUERRequired in OIDC modeThe provider's issuer URL. https, or http only for localhost, 127.0.0.1 and [::1]; no user info, query string or fragment. For Entra ID it must name the tenant (https://login.microsoftonline.com/<tenant-id>/v2.0): common, organizations and consumers are refused
OIDC_CLIENT_IDRequired in OIDC modeThe console's client ID at the provider
OIDC_CLIENT_SECRETRequired in OIDC modeThe client secret
OIDC_PROVIDER_NAMEyour organizationName shown on the sign-in button and in messages
OIDC_SCOPESopenid profile email offline_accessScopes requested. Must include openid. Without offline_access the provider may issue no refresh token, and the backend warns at start
OIDC_ROLE_CLAIMrolesThe ID-token claim that holds the person's roles
OIDC_ROLE_MAPadmin=admin,operator=operator,analyst=analyst,explorer=explorerComma-separated role=value pairs: which provider value gives which console role. A person with no mapped value gets no access
OIDC_ORG_IDUnsetThe organization every person signs in to. Required with REQUIRE_ORG_ISOLATION=true, and when the install already holds data under an organization; never default
OIDC_SESSION_IDLE_MINUTES120Minutes without a request before a session ends. 1 to 43200, and at most OIDC_SESSION_MAX_HOURS × 60
OIDC_SESSION_MAX_HOURS12Hours a session lasts at most. 1 to 720
OIDC_REVALIDATE_MINUTES60Minutes between re-checks of a signed-in person with the provider. 1 to 1440
OIDC_LOGOUTlocallocal: sign-out ends the console session only. provider: it also sends the browser to the provider's sign-out page
OIDC_TOKEN_AUTH_METHODbasicHow the client secret reaches the provider's token endpoint: basic (HTTP Basic header) or post (request body)
OIDC_CA_CERT_FILEUnsetPEM file with the certificate of a private certificate authority, trusted for requests to the provider only. There is no setting that skips the certificate check

In OIDC mode the backend also needs PUBLIC_APP_URL (one address, see Server) and an ENCRYPTION_SECRET of at least 32 characters, which encrypts the stored refresh tokens. A setting the backend refuses stops it at start with the list of problems.

On a server install these live in deploy.config.env (section "Sign-in"); the deploy script writes them into backend/.env on every run, so change them with achilles-installer auth set (Changing the settings), not in backend/.env.

Retention​

VariableDescription
TASK_OUTPUT_RETENTION_DAYSDays to keep full task output in SQLite. After that, finished tasks lose their stdout, keep the last 400 characters of stderr, and lose each stage's details; exit code, error and stage results are kept, and the Tasks page says the output was removed. Test results are compacted only once they are in Elasticsearch; agent update and uninstall output (never in Elasticsearch) is compacted after the window; admin shell-command (execute_command) output is never compacted. 0 disables. Default 90
AGENT_EVENT_RETENTION_DAYSDays to keep agent events (online/offline, task, key and version events). Each agent's latest went-offline event is always kept, so a long-offline agent is not reported offline again. 0 disables. Default 90

The SQLite file does not shrink (no VACUUM); freed pages are reused, so growth stops. Both jobs run hourly.

Elasticsearch​

VariableDescription
ELASTICSEARCH_CLOUD_IDElastic Cloud deployment ID
ELASTICSEARCH_API_KEYAPI key for authentication (see required permissions below)
ELASTICSEARCH_NODEDirect node URL (e.g., http://localhost:9200)
ELASTICSEARCH_USERNAME / ELASTICSEARCH_PASSWORDBasic authentication, as an alternative to ELASTICSEARCH_API_KEY
ELASTICSEARCH_CA_CERTCA certificate (PEM text) used to verify the Elasticsearch server certificate
ELASTICSEARCH_TLS_INSECURE_SKIP_VERIFYtrue skips TLS certificate verification. For labs only
ELASTICSEARCH_INDEX_PATTERNRead index pattern (default: achilles-results-*)
ELASTICSEARCH_WRITE_INDEX_PREFIXWrite index prefix (default: achilles-results-)
ELASTICSEARCH_WRITE_INDEX_ROLLOVERWrite index rollover mode: none (default), daily, or monthly
ES_TIMING_LOGoff stops the [es-timing] log line written for each API request that queried Elasticsearch (calls, client wait, and the took Elasticsearch reports; never the query string). The same numbers are always sent in the Server-Timing response header, visible in the browser's developer tools. Default: on
Elasticsearch API Key Permissions

When creating an API key manually (Kibana → Stack Management → API Keys), use these role descriptors:

{
"achilles_role": {
"cluster": ["monitor"],
"indices": [{
"names": ["achilles-*", "archived-*"],
"privileges": ["manage", "read", "write"],
"allow_restricted_indices": false
}]
}
}

For local development, start.sh creates this key automatically from the elastic user password.

Test Library​

VariableDescription
TESTS_REPO_URLGit URL for the test library. Unset: the public f0_library (https://github.com/ubercylon8/f0_library.git). Set it to an empty value to turn Git sync off and use TESTS_SOURCE_PATH
TESTS_REPO_BRANCHBranch to sync (default: main)
TESTS_LOCAL_PATHFolder the test library is cloned into
TESTS_REPO_TOKENAccess token for the main test library repository. Sent only over https://, and only after anonymous access fails
TESTS_REPO_USERNAMEUser name sent with the token (default x-access-token; GitLab oauth2, Bitbucket x-token-auth). See Your Own Test Library
CUSTOM_TESTS_REPO_URLYour organization's own test repository, read beside the main library. Its tests win when a UUID is in both
CUSTOM_TESTS_REPO_BRANCHBranch of the own repository (default main)
CUSTOM_TESTS_REPO_TOKENAccess token for the own repository. With an http:// URL the own repository is not synced
CUSTOM_TESTS_REPO_USERNAMEUser name sent with the token (default x-access-token)
CUSTOM_TESTS_REPO_LOCAL_PATHFolder the own repository is cloned into (default data/custom-library)
GITHUB_TOKENPAT for private repos (agent source). For the test library it is used only when TESTS_REPO_TOKEN is unset and TESTS_REPO_URL is https:// on github.com; never for the own repository
TESTS_SOURCE_PATHLocal tests_source folder, used when Git sync is off
CUSTOM_TESTS_PATHFolder for your own tests. They are listed before the synced library and win when two tests share a UUID (default: ~/.projectachilles/custom-tests)
TESTS_UPDATE_CHECKoff turns off the timed check of the published test versions (2 minutes after start, then every 6 hours) and the check after a re-index of the library. Check now still works, and a Sync still records what it fetched as the published version. Restart the backend after changing it. Not used on Vercel. See Test Versions. Default: on

Test Builds​

VariableDescription
BUILD_NICENiceness level (for example 15) for build subprocesses (go build, go mod, build_all.sh), so a build cannot starve the API on a small instance. Unset or off: normal priority. render.yaml sets 15. Ignored on Windows
BUILD_ENV_PASSTHROUGHComma-separated names of extra environment variables that build subprocesses may see. Builds get a fixed allowlist (path, Go toolchain, proxy and CA variables), never the backend's full environment, so test-library code cannot read the backend's secrets. Add a name here when a build on your install needs one more variable

Agent Build​

VariableDescription
AGENT_REPO_URLGit URL of the agent source. When set, the backend clones the agent/ folder and refreshes the clone before every Build from source
AGENT_REPO_BRANCHBranch to clone (default: main)
AGENT_LOCAL_PATHFolder the agent source is cloned into
AGENT_SOURCE_PATHAgent source folder used when AGENT_REPO_URL is unset or the clone fails. The compose files set it to /agent-src, the host checkout's agent/ mounted read-only
AGENT_SOURCE_GIT_DIRThe .git folder of that checkout, so a build can record the commit it compiled. The compose files mount the host's .git read-only at /agent-src-git. Default: .git next to the agent source

With the compose files (Docker Compose and server installs) and no AGENT_REPO_URL, Build from source compiles the host checkout: run git pull on the host before you build, or the old code is built under the new version. With AGENT_REPO_URL set, the backend builds from its own clone, which it refreshes before every build.

Server​

VariableDescriptionDefault
PORTServer port3000
NODE_ENVNode environmentdevelopment
TRUST_PROXY_HOPSNumber of reverse proxies in front of the backend (Express trust proxy). It decides which address the backend takes as the client IP. Server installs set 2 in docker-compose.server.yml (Caddy, then nginx); plain Docker Compose has nginx only and stays at 11
CLUSTER_WORKERS2 or more starts that many HTTP worker processes, and the primary process runs the background jobs. Unset, 0 or 1: one processUnset
PUBLIC_APP_URLThe address people open the console at. Clerk mode: used for the sign-up link in user invitations. OIDC mode: required, one https address (http only on localhost); the redirect URI is this address plus /api/auth/oidc/callback. Server installs write it from ACHILLES_DOMAINCORS_ORIGIN
AGENT_DOWNLOAD_BUDGET_MB_PER_MINTest binary handouts per minute, in MB. Once a minute's worth of test binaries has been handed out, other agents get "no task" and pick theirs up at the next poll (agent update tasks are not paced). At 1500 MB/min, a 30-minute pre-execution notice pickup window covers about 2,600 agents with a 17 MB binary (about 1,100 with 40 MB); raise the budget or the window beyond that. 0 disables pacing. Read once at startup. Not used on Vercel.1500

Organization​

VariableDescriptionDefault
ORGANIZATION_NAMEThe organization this deployment serves. The execution report prints it on the cover, in the scope table and in every page header, unless CONSOLE_ORG_NAME is set or a console identity is saved in Settings → General (the saved full name wins). A name longer than 56 characters is cut with an ellipsis in the report.Unset: the report says All organizations
ORG_NAMESDisplay names for organization UUIDs (routing.oid) in Analytics, the execution report and the compliance export. JSON keyed by org UUID; each value is a short name or {"shortName": "...", "fullName": "..."}, for example {"<org-uuid>": {"shortName": "ACME", "fullName": "Acme Corporation"}}.Unset: organizations show the first 8 characters of their UUID
CONSOLE_ORG_CODEOrganization code (2-6 letters or digits, uppercased) shown in the sidebar, page headers, colour ribbon, browser tab and favicon. See console identity. A code saved in Settings → General replaces these three variables. Not supported on Vercel.Unset: no console identity
CONSOLE_ORG_NAMEOptional full name shown beside the code (up to 80 characters), and printed as the organization name on the execution report. Falls back to ORGANIZATION_NAME. See console identity.Unset: no name
REQUIRE_ORG_ISOLATIONtrue rejects (403) every signed-in user or API key that belongs to no Clerk organization, on every organization-scoped route: agents, tasks, schedules, Analytics and reports, enrollment tokens, campaigns, pre-execution notices and alert settings. It also makes the shared EDR settings read-only from the UI. Users and keys that belong to an organization only ever see and act on their own organization's agents, tasks, schedules and results, whether this is set or not. Install-wide configuration (agent versions, the Elasticsearch connection and index creation, agent key auto-rotation) can only be changed by users without an organization, and they keep that access when this is set. This is defense in depth, not a tenant boundary: sharing one install between organizations is not supported (one install per organization is).Unset: users without an organization see the whole install (single-organization installs)
CONSOLE_ORG_COLORIdentity colour preset: violet, indigo, blue, cyan, fuchsia, pink, orange, silver or none. See console identity.none

EDR and Identity Integrations​

Optional. Each integration can be configured in Settings → Integrations or with these variables. EDR settings apply to the whole install. With REQUIRE_ORG_ISOLATION=true the EDR settings are read-only in the UI, so use the variables there. While the variables are set, the integration cannot be disconnected from the UI. SentinelOne and Sophos are not available on Vercel.

VariableDescription
DEFENDER_TENANT_ID, DEFENDER_CLIENT_IDMicrosoft Defender app registration. Both are needed, plus a secret or a certificate
DEFENDER_CLIENT_SECRETClient secret
DEFENDER_CERT_THUMBPRINT, DEFENDER_PRIVATE_KEY_PEMCertificate authentication. Used instead of the secret when both are set
DEFENDER_TENANT_LABELDisplay label
CROWDSTRIKE_CLIENT_ID, CROWDSTRIKE_CLIENT_SECRETCrowdStrike Falcon API client
CROWDSTRIKE_REGIONus-1 (default), us-2, eu-1 or us-gov-1. An invalid value is ignored
CROWDSTRIKE_LABELDisplay label
SENTINELONE_BASE_URL, SENTINELONE_API_TOKENSentinelOne console URL (*.sentinelone.net or *.s1gov.net) and API token
SENTINELONE_PERMISSION_MODEread_only (default) or response
SENTINELONE_LABELDisplay label
SOPHOS_CLIENT_ID, SOPHOS_CLIENT_SECRETSophos Central tenant API credential
SOPHOS_PERMISSION_MODEread_only (default) or response
SOPHOS_LABELDisplay label
AZURE_TENANT_ID, AZURE_CLIENT_IDAzure / Entra ID app registration used by the identity tests. Both are needed, plus a secret or a certificate
AZURE_CLIENT_SECRETClient secret
AZURE_CERT_THUMBPRINT, AZURE_PRIVATE_KEY_PEMCertificate authentication. Used instead of the secret when both are set
AZURE_TENANT_LABELDisplay label
F0_EDR_LAST_SEEN_HOURSHow recently Sophos or SentinelOne must have seen an endpoint for its console data to be used as evidence for cyber-hygiene bundle controls. 1 to 720 hours. Default 24

Vercel-Only​

VariableDescription
TURSO_DATABASE_URLTurso database URL (libsql://...)
TURSO_AUTH_TOKENTurso authentication token
SIGNING_PRIVATE_KEY_B64Ed25519 private key (base64, PKCS8 DER)
SIGNING_PUBLIC_KEY_B64Ed25519 public key (base64, SPKI DER)
BLOB_READ_WRITE_TOKENVercel Blob storage token (auto-provisioned when Blob integration is added via Vercel Marketplace)
CRON_SECRETProtects the /api/cron/* routes. Vercel sets it and sends it with every cron call

The Vercel backend does not read the retention, download budget, build, agent build, console identity, SentinelOne, Sophos or CLI_AUTH_SECRET variables: those features are not on Vercel.

Server Install (Caddy)​

The single-server install (scripts/deploy-server.sh, achilles-installer) reads its own settings from deploy.config.env: ACHILLES_DOMAIN, TLS_MODE, ES_MODE, ADMIN_EMAIL, CADDY_BIND_IP, CA_ZONE, the sign-in settings and others. The script writes backend/.env and the root .env from them. See the Server Installer guide and the comments in deploy.config.env.example.

Local Tunnel (./scripts/start.sh --tunnel)​

VariableDescription
NGROK_FRONTEND_DOMAINngrok domain for frontend tunnel
NGROK_BACKEND_DOMAINngrok domain for backend/agent tunnel

Frontend Variables​

VariableDescriptionNotes
VITE_CLERK_PUBLISHABLE_KEYClerk publishable key (Clerk mode only: the console reads the sign-in mode from the backend)Must have VITE_ prefix
VITE_BACKEND_PORTBackend port for Vite proxyDefault: 3000 (dev only)
VITE_API_URLFull backend URLProduction — direct CORS mode
VITE_BRAND_WORDMARKWordmark shown in the console headerBuild time. Default: f0_csv
VITE_BRAND_TAGLINETagline shown with the wordmarkBuild time. Default: continuous security testing

PaaS Frontend Variables​

VariableDescriptionUsed By
CLERK_PUBLISHABLE_KEYClerk key (without VITE_ prefix)docker-entrypoint.sh injects as window.__env__
BACKEND_HOSTBackend internal hostnamenginx proxy mode (Standard+ Render)
BACKEND_PORTBackend internal portnginx proxy mode

Per-Target Summary​

VariableDockerRenderFly.ioVercel
CLERK_PUBLISHABLE_KEYYesYesYesYes
CLERK_SECRET_KEYYesYesYesYes
AUTH_MODE, OIDC_*Optional†Standard+ with BACKEND_HOST†With BACKEND_HOST only†Not supported
CORS_ORIGINYesYesYesYes
ENCRYPTION_SECRETRequiredRequiredRequiredRequired
AGENT_SERVER_URLProdYesYesYes
CLI_AUTH_SECRETOptionalYesYesNot used
ELASTICSEARCH_*OptionalOptionalOptionalOptional
TESTS_REPO_URLOptionalOptionalOptionalOptional
ORGANIZATION_NAMEOptionalOptionalOptionalOptional
ORG_NAMESOptionalOptionalOptionalOptional
CONSOLE_ORG_CODEOptionalOptionalOptionalNot supported
CONSOLE_ORG_NAMEOptionalOptionalOptionalNot supported
CONSOLE_ORG_COLOROptionalOptionalOptionalNot supported
REQUIRE_ORG_ISOLATIONOptionalOptionalOptionalOptional
TASK_OUTPUT_RETENTION_DAYS, AGENT_EVENT_RETENTION_DAYSOptionalOptionalOptionalNot used
AGENT_DOWNLOAD_BUDGET_MB_PER_MINOptionalOptionalOptionalNot used
BUILD_NICE, BUILD_ENV_PASSTHROUGHOptionalOptional (render.yaml sets BUILD_NICE=15)OptionalNot used
DEFENDER_*, CROWDSTRIKE_*, AZURE_*OptionalOptionalOptionalOptional
SENTINELONE_*, SOPHOS_*OptionalOptionalOptionalNot supported
TURSO_*———Required
SIGNING_*_B64———Required
BLOB_READ_WRITE_TOKEN———Auto
BACKEND_HOSTAutoNo*No—
VITE_API_URL—YesYesYes

* Render Standard plan supports BACKEND_HOST; Starter plan uses VITE_API_URL instead.

† OIDC mode needs the console and its API on one origin. It is validated and documented on the Server Installer, which also gives you achilles-installer auth and break-glass. Other deployments that serve the console and its API from one https address (Docker Compose behind your own TLS proxy, or http://localhost; Render Standard or Fly.io with BACKEND_HOST) can set the same variables in backend/.env by hand, but were not tested and have no installer commands. Render Starter, the default Fly.io setup (VITE_API_URL) and Vercel stay Clerk. With AUTH_MODE=oidc, the Clerk keys are not needed.