> For the complete documentation index, see [llms.txt](https://www.health-samurai.io/docs/interbox/llms.txt).
> Use it to discover all available pages before guessing URLs.

---
# Environment variables

The environment variables an operator sets on Interbox: the engine, the API and dashboard, the
workspace service, the command-line tool and the Docker image. Each row gives the default the code
applies, what the variable sets, and the page that explains it. Values that workspace code reads
through `env()` in a pipeline belong to your workspace and are on
[Env and config](../guides/env-and-config.md), not here.

The Helm chart sets some of them for you. The last section lists the ones where its value
differs from the default below.

## Database

| variable | default | what it sets | see |
|---|---|---|---|
| `DATABASE_URL` | none, required | the PostgreSQL connection string of the engine, the API and the migration scripts | [Deployment](../deploy/deployment.md#tls-to-postgresql) |
| `INTERBOX_DB_BOOTSTRAP` | `postgres` | the maintenance database the start-up script connects to when it creates the target database | |
| `INTERBOX_SKIP_ENSURE_DB` | unset | any non-empty value skips creating the database at start, for a database you created yourself | [Deployment](../deploy/deployment.md) |
| `INTERBOX_DB_AUTH_METHOD` | `password` | how Interbox authenticates to PostgreSQL: `password` or `databricks-autoscale` | [Databricks Lakebase](../deploy/lakebase.md) |
| `INTERBOX_DB_DATABRICKS_HOST` | none | the Databricks workspace address, required with `databricks-autoscale` | [Databricks Lakebase](../deploy/lakebase.md) |
| `INTERBOX_DB_DATABRICKS_CLIENT_ID` | none | the service principal's client id, required with `databricks-autoscale` | [Databricks Lakebase](../deploy/lakebase.md) |
| `INTERBOX_DB_DATABRICKS_CLIENT_SECRET` | none | the service principal's secret, required with `databricks-autoscale` | [Databricks Lakebase](../deploy/lakebase.md) |
| `INTERBOX_DB_DATABRICKS_ENDPOINT` | none | the Lakebase endpoint to mint credentials for, required with `databricks-autoscale` | [Databricks Lakebase](../deploy/lakebase.md) |
| `FACET_WORK_MEM` | `128MB` | the PostgreSQL `work_mem` of the dashboard's facet queries; a value that is not digits followed by `kB`, `MB` or `GB` uses the default | [System requirements](../deploy/requirements.md) |

## Workspace and workspace service

| variable | default | what it sets | see |
|---|---|---|---|
| `INTERBOX_WORKSPACE_GIT_URL` | none | the workspace repository: an `https://` or SSH remote, a `file:` URL or a local path | [The workspace](../deploy/workspace.md#pointing-a-deployment-at-a-workspace) |
| `INTERBOX_WORKSPACE_GIT_REF` | `main` | the branch or tag to run; a branch wins over a tag of the same name | [The workspace](../deploy/workspace.md#pointing-a-deployment-at-a-workspace) |
| `INTERBOX_WORKSPACE_GIT_KEY` | none | the credential for a private remote: a token for `https://`, a PEM or base64 PEM private key for SSH | [The workspace](../deploy/workspace.md#the-credential) |
| `INTERBOX_WORKSPACE_GIT_KEY_PATH` | none | the same credential, read from a file; the inline variable wins when both are set | [The workspace](../deploy/workspace.md#the-credential) |
| `INTERBOX_WORKSPACE_SSH_KNOWN_HOSTS` | none | inline `known_hosts` lines for an SSH remote, added to the image's built-in host keys | [The workspace](../deploy/workspace.md#the-credential) |
| `INTERBOX_WORKSPACE_SSH_KNOWN_HOSTS_PATH` | none | a `known_hosts` file for an SSH remote; a path that cannot be read fails the clone | [The workspace](../deploy/workspace.md#the-credential) |
| `INTERBOX_WORKSPACE_MODE` | `clone` for a remote URL, else `worktree` | `clone`: the workspace service owns a copy it fetches; `worktree`: it builds a local directory in place | [The workspace](../deploy/workspace.md) |
| `INTERBOX_WORKSPACE_ACCESS` | `read` | what the dashboard may do to the workspace: `read`, `push` or `apply` | [The workspace](../deploy/workspace.md) |
| `INTERBOX_WORKSPACE_POLL_MS` | `30000` | how often the engine and the workspace service look for a new build or a moved ref, in milliseconds; `0` turns polling off | [The workspace](../deploy/workspace.md#pointing-a-deployment-at-a-workspace) |
| `INTERBOX_WORKSPACE_CACHE` | `interbox-engine` in the system temp directory | where the workspace service keeps its clone and unpacked builds | |
| `INTERBOX_WORKSPACE_LINK_SDK` | unset; the image sets `1` | `1` or `true` runs the workspace against the SDK built into the image; `0` resolves it from the registry | [Network access](../secure/network.md) |
| `INTERBOX_WORKSPACE_SERVICE_URL` | unset | the address of the workspace service; unset, the API routes that need it answer `404` | [Operating pipelines](../operate/operating.md#environment) |
| `INTERBOX_COMMIT_NAME` | `interbox-dashboard` | the author name of commits the dashboard makes | |
| `INTERBOX_COMMIT_EMAIL` | `interbox-dashboard@users.noreply.github.com` | the author email of those commits | |
| `WORKSPACE_ACTION_TIMEOUT_MS` | `900000` | the deadline of one workspace action, in milliseconds | [The workspace](../deploy/workspace.md#workspace-actions) |
| `WORKSPACE_ACTION_RESULT_MAX_BYTES` | `262144` | the largest action result kept, in bytes; `0` keeps none | [The workspace](../deploy/workspace.md#workspace-actions) |

## Sign-in and dashboard access

| variable | default | what it sets | see |
|---|---|---|---|
| `INTERBOX_PUBLIC_URL` | none, required | the origin browsers use to reach the dashboard, with no path | [Securing dashboard access](../secure/dashboard-access.md#required-in-every-deployment) |
| `INTERBOX_AUTH_ENABLED` | `true` | `false` or `0` turns dashboard sign-in off | [Securing dashboard access](../secure/dashboard-access.md#turning-it-off) |
| `INTERBOX_AUTH_ADMIN_ENABLED` | `true` | `false` or `0` removes the password account, which needs an OIDC issuer | [Securing dashboard access](../secure/dashboard-access.md#turning-the-password-account-off) |
| `INTERBOX_AUTH_ADMIN_PASSWORD` | none | the password account's password, at least 20 characters; required while that account is on | [Securing dashboard access](../secure/dashboard-access.md#signing-in) |
| `INTERBOX_AUTH_ISSUER` | none | the OIDC issuer URL; set, the dashboard offers sign-in through it | [Sign-in provider examples](../secure/sign-in-providers.md) |
| `INTERBOX_AUTH_CLIENT_ID` | none | the client id registered with the issuer; required with an issuer | [Sign-in provider examples](../secure/sign-in-providers.md) |
| `INTERBOX_AUTH_CLIENT_SECRET` | none | the client secret registered with the issuer | [Sign-in provider examples](../secure/sign-in-providers.md) |
| `INTERBOX_AUTH_PROVIDER_LABEL` | none | the provider name on the sign-in button, up to 64 characters | [Securing dashboard access](../secure/dashboard-access.md#the-sign-in-button-names-your-provider) |
| `INTERBOX_AUTH_ALLOWED_EMAILS` | none | comma-separated email addresses that may sign in through the issuer | [Securing dashboard access](../secure/dashboard-access.md#who-may-sign-in) |
| `INTERBOX_AUTH_ALLOWED_DOMAINS` | none | comma-separated email domains that may sign in | [Securing dashboard access](../secure/dashboard-access.md#who-may-sign-in) |
| `INTERBOX_AUTH_ALLOWED_GROUPS` | none | comma-separated provider groups that may sign in | [Securing dashboard access](../secure/dashboard-access.md#who-may-sign-in) |
| `INTERBOX_AUTH_ALLOWED_SUBJECTS` | none | comma-separated provider subject ids that may sign in | [Securing dashboard access](../secure/dashboard-access.md#who-may-sign-in) |
| `INTERBOX_AUTH_REQUIRED_CLAIMS` | none | a JSON object of claims the sign-in must carry, narrowing the rules above | [Securing dashboard access](../secure/dashboard-access.md#who-may-sign-in) |
| `INTERBOX_AUTH_ALLOW_INSECURE_HTTP` | `false` | `true` permits plain `http` for the public URL and the issuer on a private network | [Securing dashboard access](../secure/dashboard-access.md#when-there-is-no-tls-anywhere) |
| `INTERBOX_ALLOWED_ORIGINS` | none | comma-separated extra origins the same-origin guard accepts for writes | [Securing dashboard access](../secure/dashboard-access.md#writes-are-same-origin-only) |

## API

| variable | default | what it sets | see |
|---|---|---|---|
| `API_PORT` | `3001` | the port of the API and the dashboard | [Network access](../secure/network.md#inbound) |
| `INTERBOX_API_READ_TIMEOUT_MS` | `10000` | the time budget of one dashboard read, in milliseconds | [Operating pipelines](../operate/operating.md#environment) |
| `TERMINOLOGY_URL` | `https://tx.fhir.org/r4` | the terminology server the dashboard queries for LOINC | [Network access](../secure/network.md) |
| `TERMINOLOGY_AUTH` | none | the `Authorization` header value sent to the terminology server, as written | [Network access](../secure/network.md) |

## Sources and webhooks

| variable | default | what it sets | see |
|---|---|---|---|
| `INTERBOX_WEBHOOK_PORT` | `3002` | the one port every webhook source and pull sender listens on; `0` picks a free port | [Operating pipelines](../operate/operating.md#environment) |
| `WEBHOOK_EGRESS_ALLOWLIST` | empty, which denies every delivery | comma-separated hosts outbound webhooks may reach, with `*.` wildcards | [Webhooks](../guides/webhooks.md) |
| `WEBHOOK_RETENTION_DAYS` | `30` | days to keep delivered webhook outbox rows; `0` turns the sweep off | [Webhooks](../guides/webhooks.md) |
| `WEBHOOK_BLOCK_PRIVATE` | `false` | `true` or `1` also refuses webhook targets on private addresses | [Webhooks](../guides/webhooks.md) |
| `S3_REGION` | `AWS_REGION`, else the SDK's own lookup | the region of an Amazon S3 file transport | [Amazon S3](../guides/reading-files/amazon-s3.md) |
| `AWS_REGION` | none | the same, when `S3_REGION` is unset | [Amazon S3](../guides/reading-files/amazon-s3.md) |
| `S3_ENDPOINT`, `AWS_ENDPOINT` | none | either one found without an `endpoint` on the transport fails the transport; set the endpoint on the transport instead | [Amazon S3](../guides/reading-files/amazon-s3.md) |
| `S3_ACCESS_KEY_ID` | none | the access key for `credentials: "keys"`, with `S3_SECRET_ACCESS_KEY`; `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are the fallback | [Amazon S3](../guides/reading-files/amazon-s3.md) |
| `S3_SECRET_ACCESS_KEY` | none | the secret key that goes with it | [Amazon S3](../guides/reading-files/amazon-s3.md) |
| `AZURE_STORAGE_KEY` | none | the account key for an Azure Blob Storage transport with `credentials: "key"` | [Azure Blob Storage](../guides/reading-files/azure-blob-storage.md) |
| `AZURE_CLIENT_ID` | none | the user-assigned managed identity an Azure transport signs in as | [Azure Blob Storage](../guides/reading-files/azure-blob-storage.md) |
| `STORAGE_EMULATOR_HOST` | none | found without an `endpoint` on a Google Cloud Storage transport, it fails the transport | [Google Cloud Storage](../guides/reading-files/google-cloud-storage.md) |

The image sets `MLLP_HOST` (`0.0.0.0`) and `MLLP_PORT` (`2575`) for the workspace's
MLLP source, which reads them through `env()`. Interbox itself does not read them.

## Aidbox

| variable | default | what it sets | see |
|---|---|---|---|
| `AIDBOX_URL` | none | the Aidbox base URL the dashboard checks for health and licence, and the assistant's Aidbox command reads | [Network access](../secure/network.md) |
| `AIDBOX_PUBLIC_URL` | derived from `AIDBOX_URL` and the request's host | the Aidbox address the dashboard links to | [Network access](../secure/network.md#from-the-users-browser) |
| `AIDBOX_AUTH` | none | the `Authorization` header value of the dashboard's health check | |
| `AIDBOX_CLIENT_ID` | `root` | the client the command-line tool's Aidbox query signs in as | [CLI](cli.md) |
| `AIDBOX_CLIENT_SECRET` | none | that client's secret; required with `AIDBOX_URL` for the query | [CLI](cli.md) |
| `INTERBOX_AIDBOX_MAX_BODY_BYTES` | `8388608` | the largest body of one `aidbox()` sender request | [Built-in sources, steps and senders](built-in-stages.md) |
| `INTERBOX_AIDBOX_MAX_ENTRIES_PER_REQUEST` | none | the most entries in one request | [Built-in sources, steps and senders](built-in-stages.md) |
| `INTERBOX_AIDBOX_CONCURRENCY` | `4` | requests in flight within one send | [Built-in sources, steps and senders](built-in-stages.md) |
| `INTERBOX_AIDBOX_REQUEST_TIMEOUT_MS` | none | the timeout of one request, in milliseconds | [Built-in sources, steps and senders](built-in-stages.md) |

## Logging and instances

| variable | default | what it sets | see |
|---|---|---|---|
| `LOG_LEVEL` | `info` | the engine's log level | [`@health-samurai/interbox`](index.md#logging) |
| `NODE_ENV` | unset; the image sets `production` | `production` writes JSON log lines; anything else writes pretty ones | |
| `INTERBOX_INSTANCE_ID` | the host name | the instance's id on the Instances page and in its logs | [Operating pipelines](../operate/operating.md#environment) |
| `INTERBOX_STOP_GRACE_MS` | `10000` | how long a stop lets started work finish, in milliseconds | [Updating the engine](../upgrade/updating.md#what-happens-on-a-stop) |

## Dashboard assistant

| variable | default | what it sets | see |
|---|---|---|---|
| `CLAUDE_CODE_OAUTH_TOKEN` | none | the assistant's credential from a Claude subscription | |
| `ANTHROPIC_API_KEY` | none | the assistant's credential from an API key | |
| `ANTHROPIC_AUTH_TOKEN` | none | the assistant's credential as a bearer token | |

## Licence

| variable | default | what it sets | see |
|---|---|---|---|
| `INTERBOX_LICENSE` | none | the licence token; a licence stored by dashboard activation wins over it | [Network access](../secure/network.md) |

## Command-line tool

| variable | default | what it sets | see |
|---|---|---|---|
| `INTERBOX_API_URL` | `http://localhost:3001` | the API the command-line tool calls | [CLI](cli.md) |
| `INTERBOX_SERVICE_TOKEN` | none | set by the dashboard assistant for its own commands; a value you set yourself is rejected with `401` | [Securing dashboard access](../secure/dashboard-access.md#the-command-line-tool) |
| `INTERBOX_VERSION` | none | the version `interbox pin` uses when you give none | [CLI](cli.md) |
| `INTERBOX_UPSTREAM_URL` | the public workspace template | the upstream repository of `interbox workspace` commands | [CLI](cli.md) |

## What the Helm chart sets

The chart sets the variables below on its pods. Variables not listed keep the defaults above.

| engine variable | what the chart sets it to (a chart value is in `code` with its name) | engine default |
|---|---|---|
| `INTERBOX_WORKSPACE_POLL_MS` | `5000`, a default you can override under `config` | `30000` |
| `INTERBOX_WORKSPACE_SERVICE_URL` | the workspace service's address | unset |
| `INTERBOX_API_URL` | `http://localhost:<apiPort>`, for the assistant's tool | `http://localhost:3001` |
| `API_PORT` | `apiPort`, `3001` | `3001` |
| `INTERBOX_WEBHOOK_PORT` | `webhook.port`, `3002` | `3002` |
| `MLLP_HOST` and `MLLP_PORT` | `0.0.0.0` and `2575` | the image's values, the same |
| `AIDBOX_URL` | `http://aidbox:8080` | none |
| `INTERBOX_SKIP_ENSURE_DB` | `1` when the chart value `database.createDatabase` is `false` | unset |

The chart refuses `DATABASE_URL`, `API_PORT`, `INTERBOX_INSTANCE_ID`, `INTERBOX_WEBHOOK_PORT` and
`INTERBOX_WORKSPACE_CACHE` under `config`. It does not check that `INTERBOX_WORKSPACE_GIT_URL`
and `INTERBOX_PUBLIC_URL` are set. Each pod's host name, which is its name, is its instance id.
