> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openhands.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Variables

> Environment variables that configure OpenHands Enterprise, with their defaults

OpenHands Enterprise reads its configuration from environment variables. Each table lists the default that
OpenHands uses when you don't set the variable. The Helm chart and the Docker Compose stack set many of these
variables for you, so your installation can use a different value.

Set boolean variables to `true` or `false`.

## Set a Variable

> [tab] Helm
>
> Many variables have a dedicated value in the Helm chart, such as `smtp.host` or `github.enabled`, and the chart
> sets the variable for you. See the chart's
> [configuration reference](https://github.com/OpenHands/OpenHands-Cloud/blob/main/charts/openhands/README.md#configuration)
> for those values.
>
> To set any variable on this page directly, add it under `env` in your values and apply them with
> `helm upgrade`. An `env` entry takes precedence over the value that the chart sets for the same variable.
>
> ```yaml values.yaml theme={null}
> env:
>   LOG_LEVEL: DEBUG
> ```

> [tab] Docker Compose
>
> Add any variable on this page to a `.env` file next to `docker-compose.yml`, then run
> `docker compose up --wait`. The stack passes each variable to OpenHands and the automation service.
>
> ```bash .env theme={null}
> WEB_HOST=openhands.example.com
> WEB_URL=https://openhands.example.com
> AGENT_CANVAS_LOCK_TO_CLOUD=https://openhands.example.com
> ```
>
> The stack fixes the values that connect its services, such as `DB_HOST` and `REDIS_HOST`. Set `DB_NAME`,
> `DB_USER`, and `DB_PASS` before the first start.
>
> These variables configure the stack itself:
>
> | Variable | Default | Description |
> | - | - | - |
> | `APP_PORT` | `9043` | Port on the host that serves the stack. |
> | `WEB_URL` | `http://localhost:<APP_PORT>` | Full URL that users open, such as `https://openhands.example.com`. |
> | `AGENT_CANVAS_LOCK_TO_CLOUD` | `http://localhost:<APP_PORT>` | URL that Agent Canvas connects to. Set it to the same value as `WEB_URL`. |
> | `COMPOSE_FILE` | None | Compose files to load, separated by colons. Use it to add the [HTTPS overlay](https://docs.openhands.dev/enterprise/docker-compose/https.md). |
> | `AUTOMATION_SERVICE_KEY` | Placeholder | Key that OpenHands and the automation service share. Set it to a random value. |
> | `AUTOMATION_KV_SECRET` | Placeholder | Key that encrypts the state that automations store. Set it to a random value. |
> | `AUTOMATION_DB_NAME` | `automations` | Database for the automation service. |
> | `APP_IMAGE` `AUTOMATION_IMAGE` `AGENT_CANVAS_IMAGE` | Release image | Images for OpenHands, the automation service, and Agent Canvas. |

## General

| Variable | Default | Description |
| - | - | - |
| `WEB_HOST` | `app.all-hands.dev` | Hostname that users open OpenHands on, such as `openhands.example.com`. |
| `OH_WEB_URL` | `https://<WEB_HOST>` | Full URL that users open, such as `https://openhands.example.com`. |
| `OH_SANDBOX_WEB_URL` | `OH_WEB_URL` | URL that sandboxes use to reach OpenHands. |
| `PERMITTED_CORS_ORIGINS` | `https://<WEB_HOST>` | Comma-separated origins that can call the API from a browser. |
| `CONTENT_SECURITY_POLICY` | Built-in policy | Value of the `Content-Security-Policy` header. |
| `LOG_LEVEL` | `INFO` | Log level: `DEBUG`, `INFO`, `WARNING`, or `ERROR`. |
| `MAINTENANCE_START_TIME` | None | Start of planned maintenance, as an ISO 8601 timestamp. When set, OpenHands shows a maintenance banner. |

## License

| Variable | Default | Description |
| - | - | - |
| `OPENHANDS_LICENSE_KEY` | None | License key from Customer Center. |
| `OPENHANDS_OFFLINE_LICENSE` | None | Contents of an offline license file from Customer Center. |
| `OPENHANDS_OFFLINE_LICENSE_FILE` | None | Path to an offline license file. |
| `LICENSE_SERVER_URL` | `https://customercenter.openhands.dev` | Customer Center URL. |
| `LICENSE_CHECK_INTERVAL_SECONDS` | `1800` | Seconds between license checks against Customer Center. The minimum is `60`. |

## Database

For production, we recommend your own PostgreSQL. See [External PostgreSQL](https://docs.openhands.dev/enterprise/external-postgres.md).

| Variable | Default | Description |
| - | - | - |
| `DB_HOST` | None | Hostname of PostgreSQL. Required. |
| `DB_PORT` | `5432` | Port of PostgreSQL. |
| `DB_NAME` | `openhands` | Application database. |
| `DB_USER` | `postgres` | Database user. |
| `DB_PASS` | `postgres` | Database password. |
| `DB_SSL_MODE` | `prefer` | SSL mode: `prefer`, `require`, or `disable`. |
| `DB_POOL_SIZE` | `25` | Connections in each database connection pool. |
| `DB_MAX_OVERFLOW` | `10` | Connections that each pool can open above `DB_POOL_SIZE`. |
| `RUN_MIGRATIONS_ON_STARTUP` | `false` | Migrate the database schema when OpenHands starts. |
| `CREATE_DATABASE_IF_MISSING` | `false` | Create `DB_NAME` before migrating, if it doesn't exist. The database user needs the `CREATEDB` privilege. |

## Redis

| Variable | Default | Description |
| - | - | - |
| `REDIS_HOST` | `localhost` | Hostname of Redis. |
| `REDIS_PORT` | `6379` | Port of Redis. |
| `REDIS_PASSWORD` | None | Redis password. |
| `REDIS_DB` | `0` | Redis database number. |

## Conversation Storage

Use an S3-compatible store, Google Cloud Storage, or a local directory. Google Cloud Storage uses the workload's
service account. For Amazon S3 on EKS, see [object storage](https://docs.openhands.dev/enterprise/k8s-install/eks.md#object-storage).

| Variable | Default | Description |
| - | - | - |
| `FILE_STORE` | `local` | Storage backend: `s3`, `google_cloud`, or `local`. |
| `FILE_STORE_PATH` | `/.openhands` | Bucket for `s3` and `google_cloud`, or the directory for `local`. |
| `AWS_S3_ENDPOINT` | Amazon S3 | Endpoint of an S3-compatible store other than Amazon S3, such as `s3.example.com`. |
| `AWS_S3_SECURE` | `true` | Connect to `AWS_S3_ENDPOINT` over HTTPS. Set it to `false` to connect over HTTP. |
| `AWS_ACCESS_KEY_ID` `AWS_SECRET_ACCESS_KEY` | None | Access key pair for S3. |

## Authentication

| Variable | Default | Description |
| - | - | - |
| `JWT_SECRET` | Generated | Key that signs session tokens and encrypts the secrets that OpenHands stores. Set it to a random value. |
| `ENABLE_INTEGRATED_IDP` | `false` | Turn on email and password sign-in on the first start. |
| `SUPER_ADMIN_EMAILS` | None | Comma-separated email addresses that get the Super Admin role when they sign in through an auth provider. Requires `ENABLE_OAUTH_V2_LOGIN`. |
| `DUPLICATE_EMAIL_CHECK` | `true` | Reject a sign-up whose email address matches an existing account, ignoring plus-address suffixes. |
| `REQUIRE_VERIFIED_EMAILS` | `false` | Block users whose email address isn't verified. |
| `EMAIL_CHANGE_ENABLED` | `true` | Let users change their email address. |

### Keycloak

| Variable | Default | Description |
| - | - | - |
| `KEYCLOAK_SERVER_URL` | None | URL that OpenHands uses to reach Keycloak, such as `http://keycloak`. |
| `AUTH_WEB_HOST` | None | Public hostname of Keycloak, such as `auth.openhands.example.com`. |
| `AUTH_URL` | `auth.<hostname>` | Keycloak URL that browsers sign in through. |
| `KEYCLOAK_REALM_NAME` | None | Keycloak realm for OpenHands. |
| `KEYCLOAK_CLIENT_ID` | None | Keycloak client that OpenHands uses. |
| `KEYCLOAK_CLIENT_SECRET` | None | Secret of the Keycloak client. |
| `KEYCLOAK_ADMIN_PASSWORD` | None | Password of the Keycloak `admin` user, which OpenHands uses to manage users. |
| `ENABLE_ENTERPRISE_SSO` | None | Show the [SAML](https://docs.openhands.dev/enterprise/integrations/saml-sso.md) sign-in option. Any value turns it on. |

## Users and Organizations

| Variable | Default | Description |
| - | - | - |
| `USER_PROVISIONING_ENABLED` | `false` | Turn on the admin API that creates a user, their organization membership, and an API key in one call. |
| `OPENHANDS_DEFAULT_ORG_ENABLED` | `false` | Create a default organization when the first user signs in, and make that user its owner. |
| `OPENHANDS_DEFAULT_ORG_NAME` | `Enterprise Org` | Name of the default organization. |
| `OPENHANDS_DEFAULT_ORG_AUTO_ADD_USERS` | `false` | Add each user who signs in to the default organization. |
| `OPENHANDS_ORG_DEFAULTS_CONDENSER_MAX_TOKENS` | None | Token count at which agents condense the conversation, for new organizations. |
| `OPENHANDS_ORG_DEFAULTS_CONDENSER_APPLY_TO_EXISTING` | `false` | Also apply the default to existing organizations that have no value. |
| `OPENHANDS_ORG_DEFAULTS_CONDENSER_OVERWRITE_EXISTING` | `false` | Also replace values that existing organizations already have. |

## LLM

By default, OpenHands routes LLM requests through a LiteLLM proxy, which manages each user's key and budget. See
[LLM Gateways](https://docs.openhands.dev/enterprise/integrations/external-llm-gateways) for provider examples.

| Variable | Default | Description |
| - | - | - |
| `ENABLE_LEGACY_LITELLM` | `true` | Route LLM requests through the LiteLLM proxy. |
| `LITE_LLM_API_URL` | `https://llm-proxy.app.all-hands.dev` | URL of your LiteLLM proxy. |
| `LITE_LLM_API_KEY` | None | Master key of the LiteLLM proxy. |
| `LITE_LLM_TEAM_ID` | None | LiteLLM team for new users. |
| `LITELLM_DEFAULT_MODEL` | Release's default model | Default model for new users and organizations, such as `litellm_proxy/claude-sonnet-4-5`. |

To give every new user the same model and key without LiteLLM, set `OPENHANDS_LLM_PROVIDER_ROUTE` to `direct`:

| Variable | Default | Description |
| - | - | - |
| `OPENHANDS_LLM_PROVIDER_ROUTE` | None | Set it to `direct` to give new users the model and key below. |
| `OPENHANDS_DEFAULT_LLM_MODEL` | None | Model for new users and organizations. |
| `OPENHANDS_DEFAULT_LLM_BASE_URL` | Provider's URL | Base URL of the model's API. |
| `OPENHANDS_DEFAULT_LLM_API_KEY` | None | API key for new users and organizations. |

## Sandboxes

| Variable | Default | Description |
| - | - | - |
| `RUNTIME` | Docker | Set it to `remote` to run sandboxes through the Runtime API. |
| `OH_APP_CONVERSATION_SANDBOX_GROUPING_STRATEGY` | `NO_GROUPING` | How OpenHands assigns new conversations to sandboxes. `NO_GROUPING` starts a sandbox for each conversation. |
| `OH_APP_CONVERSATION_MAX_NUM_CONVERSATIONS_PER_SANDBOX` | `20` | Maximum number of conversations that OpenHands adds to one sandbox. |
| `OH_APP_CONVERSATION_SANDBOX_STARTUP_TIMEOUT` | `120` | Seconds that a conversation waits for its sandbox to start. |

### Runtime API

These variables apply when `RUNTIME` is `remote`. The Runtime API sets the sandbox image and environment. For
sandbox CPU and memory on Kubernetes, see [Resource Limits](https://docs.openhands.dev/enterprise/k8s-install/resource-limits.md).

| Variable | Default | Description |
| - | - | - |
| `SANDBOX_REMOTE_RUNTIME_API_URL` | None | URL of the Runtime API. Required. |
| `SANDBOX_API_KEY` | None | Key that OpenHands uses to call the Runtime API. Required. |
| `OH_SANDBOX_MAX_NUM_SANDBOXES` | `10` | Maximum number of running sandboxes for each user. |
| `OH_DAILY_SANDBOX_LIMIT` | No limit | Maximum number of sandboxes that each user can create per day, in UTC. |
| `OH_HTTPX_TIMEOUT` | `15` | Seconds that OpenHands waits for a response from the Runtime API and other services. |

### Docker

These variables apply when `RUNTIME` is unset.

| Variable | Default | Description |
| - | - | - |
| `AGENT_SERVER_IMAGE_REPOSITORY` | `ghcr.io/openhands/agent-server` | Repository of the sandbox image. See [Custom Sandbox Images](https://docs.openhands.dev/enterprise/custom-sandbox-images/index). |
| `AGENT_SERVER_IMAGE_TAG` | `<release version>-python` | Tag of the sandbox image. Requires a custom `AGENT_SERVER_IMAGE_REPOSITORY`. |
| `OH_AGENT_SERVER_ENV` | None | Environment variables for every sandbox, as a JSON object with string values, such as `{"MY_VAR": "value"}`. |
| `SANDBOX_CONTAINER_URL_PATTERN` | `http://localhost:{port}` | URL that browsers use to reach a sandbox port. OpenHands replaces `{port}` with the port and `{sandbox_id}` with the container name. |
| `SANDBOX_DOCKER_NETWORK` | Default bridge network | Docker network for sandbox containers. When set, `SANDBOX_CONTAINER_URL_PATTERN` must include `{sandbox_id}`. |
| `SANDBOX_INTERNAL_URL` | None | URL that OpenHands uses to reach sandboxes. |
| `SANDBOX_HOST_PORT` | `3000` | Port that sandboxes use to reach OpenHands on the host. |
| `SANDBOX_STARTUP_GRACE_SECONDS` | `15` | Seconds that a new sandbox has to respond before OpenHands marks it as failed. |
| `SANDBOX_VOLUMES` | None | Comma-separated bind mounts for every sandbox, in the form `host_path:container_path[:mode]`. |
| `SANDBOX_KVM_ENABLED` | `false` | Pass `/dev/kvm` to sandboxes. |
| `SANDBOX_PAUSE_ON_SHUTDOWN` | `false` | Pause running sandboxes when OpenHands stops. |
| `OH_SANDBOX_LIFECYCLE_IDLE_SECONDS` | `1200` | Pause a sandbox after its agent has been idle for this many seconds. Set it to `0` to turn it off. |
| `OH_SANDBOX_LIFECYCLE_MAX_SESSION_SECONDS` | `43200` | Pause a sandbox this many seconds after it starts or resumes. Set it to `0` to turn it off. |
| `OH_SANDBOX_LIFECYCLE_DELETE_AFTER_SECONDS` | `864000` | Delete a sandbox and its workspace after it hasn't run for this many seconds. Set it to `0` to turn it off. |

### Workspace Archives

With the Runtime API, OpenHands can archive a conversation's workspace to object storage before it deletes the
sandbox.

| Variable | Default | Description |
| - | - | - |
| `RUNTIME_FILE_ARCHIVE_ENABLED` | `false` | Archive workspaces before OpenHands deletes their sandboxes. |
| `RUNTIME_FILE_ARCHIVE_STORE_TYPE` | `google_cloud` | Storage backend: `google_cloud`, `s3`, or `local`. `s3` uses the `AWS_*` variables in [Conversation Storage](#conversation-storage). |
| `RUNTIME_FILE_ARCHIVE_BUCKET` | None | Bucket for archives, or the directory for `local`. |
| `RUNTIME_FILE_ARCHIVE_PREFIX` | `workspace-archives` | Prefix of archive object keys. |
| `RUNTIME_FILE_ARCHIVE_FORMAT` | `both` | Archive format: `git-delta` for a Git diff, `tar.gz` for the full workspace, or `both`. |
| `RUNTIME_FILE_ARCHIVE_REQUIRED` | `false` | Keep the sandbox when its archive fails, instead of deleting it. |
| `RUNTIME_FILE_ARCHIVE_TIMEOUT` | `660` | Seconds that OpenHands waits for an archive. |
| `RUNTIME_FILE_ARCHIVE_ENRICH` | `true` | Add installed packages and runtime versions to each archive's manifest. |

## Automations

For a Helm installation, see [Enable Automations with Helm](https://docs.openhands.dev/enterprise/k8s-install/automations.md).

| Variable | Default | Description |
| - | - | - |
| `AUTOMATION_SERVICE_URL` | None | URL that OpenHands uses to reach the automation service, including `/api/automation`. |
| `AUTOMATIONS_SERVICE_KEY` | None | Key that the automation service uses to call OpenHands. It must match `AUTOMATION_SERVICE_KEY` on the automation service. |
| `AUTOMATION_WEBHOOK_SECRET` | None | Secret that signs the events that OpenHands forwards to the automation service. It must match the automation service. |
| `AUTOMATION_EVENT_FORWARDING_ENABLED` | `false` | Forward GitHub, Azure DevOps, Jira Data Center, and Bitbucket Data Center events to [automations](https://docs.openhands.dev/enterprise/automations/data-center-events.md). |
| `AUTOMATION_SERVICE_TIMEOUT` | `30` | Seconds that OpenHands waits when it forwards an event. |
| `ENABLE_SERVICE_ACCOUNTS` | `false` | Turn on [service accounts](https://docs.openhands.dev/enterprise/automations/service-accounts.md). |

## Automation Service

The automation service runs separately from OpenHands and reads its own variables. On Helm, the `automation`
subchart sets most of them for you. To set one directly, add it under `automation.env` in your values. In the
Docker Compose stack, add it to `.env`.

| Variable | Default | Description |
| - | - | - |
| `AUTOMATION_OPENHANDS_API_BASE_URL` | `https://app.all-hands.dev` | URL that the automation service uses to reach OpenHands. |
| `AUTOMATION_BASE_URL` | `http://localhost:8000` | Public URL of the automation service, without `/api/automation`. |
| `AUTOMATION_SANDBOX_INTERNAL_URL` | None | URL that the automation service uses to reach sandboxes. |
| `AUTOMATION_CORS_ORIGINS` | `AUTOMATION_OPENHANDS_API_BASE_URL` | Comma-separated origins that can call the automation service from a browser. |
| `AUTOMATION_SERVICE_KEY` | None | Key that the automation service uses to call OpenHands. It must match `AUTOMATIONS_SERVICE_KEY` on OpenHands. |
| `AUTOMATION_WEBHOOK_SECRET` | None | Secret that verifies the events that OpenHands forwards. It must match `AUTOMATION_WEBHOOK_SECRET` on OpenHands. |
| `AUTOMATION_KV_SECRET` | None | Key that encrypts the state that automations store. Set it to a random value. |
| `LOG_LEVEL` | `INFO` | Log level: `DEBUG`, `INFO`, `WARNING`, or `ERROR`. |
| `AUTOMATION_LOG_LEVEL` | `LOG_LEVEL` | Log level for the automation service's own messages. |
| `AUTOMATION_POSTHOG_API_KEY` | None | PostHog project key. |
| `AUTOMATION_POSTHOG_HOST` | `https://us.i.posthog.com` | PostHog host. |

### Database

| Variable | Default | Description |
| - | - | - |
| `AUTOMATION_DB_HOST` | `localhost` | Hostname of PostgreSQL. |
| `AUTOMATION_DB_PORT` | `5432` | Port of PostgreSQL. |
| `AUTOMATION_DB_NAME` | `automations` | Database for the automation service. |
| `AUTOMATION_DB_USER` | `postgres` | Database user. |
| `AUTOMATION_DB_PASS` | `postgres` | Database password. |
| `AUTOMATION_DB_SSL_MODE` | `DB_SSL_MODE` | SSL mode: `prefer`, `require`, or `disable`. |
| `AUTOMATION_DB_POOL_SIZE` | `10` | Connections in the database connection pool. |
| `AUTOMATION_DB_MAX_OVERFLOW` | `5` | Connections that the pool can open above `AUTOMATION_DB_POOL_SIZE`. |
| `AUTOMATION_RUN_MIGRATIONS_ON_STARTUP` | `false` | Migrate the database schema when the automation service starts. |
| `AUTOMATION_CREATE_DATABASE_IF_MISSING` | `false` | Create `AUTOMATION_DB_NAME` before migrating, if it doesn't exist. The database user needs the `CREATEDB` privilege. |

### Storage

The automation service stores uploaded automation files. Its storage variables have the same names as the ones in
[Conversation Storage](#conversation-storage), but they take different values. The Docker Compose stack keeps
automation files in a local volume, so storage variables in `.env` apply only to OpenHands.

| Variable | Default | Description |
| - | - | - |
| `FILE_STORE` | `local` | Storage backend: `local`, `gcs`, or `s3`. |
| `LOCAL_STORAGE_PATH` | `~/.openhands/automation/storage` | Directory for `local`. |
| `GCS_BUCKET_NAME` | None | Bucket for `gcs`. Required with `gcs`. |
| `AWS_S3_BUCKET` | None | Bucket for `s3`. Required with `s3`. |
| `AWS_S3_ENDPOINT` | Amazon S3 | Endpoint of an S3-compatible store other than Amazon S3. |
| `AWS_S3_SECURE` | `true` | Connect to `AWS_S3_ENDPOINT` over HTTPS. |
| `AWS_S3_AUTO_CREATE_BUCKET` | `false` | Create the bucket if it doesn't exist. |
| `AWS_ACCESS_KEY_ID` `AWS_SECRET_ACCESS_KEY` | None | Access key pair for S3. |

### Runs

| Variable | Default | Description |
| - | - | - |
| `AUTOMATION_DEFAULT_RUN_DURATION` | `600` | Seconds that a run can take when its automation doesn't set a limit. |
| `AUTOMATION_MAX_RUN_DURATION` | `1800` | Longest run time, in seconds, that users can set. |
| `AUTOMATION_SCHEDULER_INTERVAL_SECONDS` | `60` | Seconds between checks for scheduled automations that are due. |
| `AUTOMATION_SANDBOX_READY_TIMEOUT` | `300` | Seconds that a run waits for its sandbox to start. |
| `AUTOMATION_SANDBOX_PROVISION_MAX_ATTEMPTS` | `3` | Sandboxes that a run tries before it fails. |
| `AUTOMATION_SANDBOX_CLEANUP_DELAY_SECONDS` | `0` | Seconds after a run ends before its sandbox is deleted. |
| `AUTOMATION_FAILURE_DISABLE_THRESHOLD` | `3` | Consecutive permanent failures before an automation is turned off. |
| `AUTOMATION_CONSECUTIVE_FAILURE_DISABLE_THRESHOLD` | None | Consecutive failures of any kind before an automation is turned off. |
| `AUTOMATION_CONSECUTIVE_FAILURE_DISABLE_WINDOW_HOURS` | `24` | Hours without a successful run before `AUTOMATION_CONSECUTIVE_FAILURE_DISABLE_THRESHOLD` applies. |

### Git Sync

Each organization sets its own repository on the Git Sync page. These variables set the defaults.

| Variable | Default | Description |
| - | - | - |
| `AUTOMATION_GIT_SYNC_SECRET` | `AUTOMATION_KV_SECRET` | Key that encrypts each organization's Git credentials. |
| `AUTOMATION_GIT_SYNC_BRANCH` | `main` | Branch to sync. |
| `AUTOMATION_GIT_SYNC_PATH` | `automations` | Directory in the repository that holds automations. |
| `AUTOMATION_GIT_SYNC_AUTHOR_NAME` | `OpenHands Automation` | Author name of sync commits. |
| `AUTOMATION_GIT_SYNC_AUTHOR_EMAIL` | `automation@openhands.dev` | Author email address of sync commits. |
| `AUTOMATION_GIT_SYNC_GIT_TIMEOUT_SECONDS` | `300` | Seconds that each Git command can take. |

## Plugins

See [Plugin Marketplace](https://docs.openhands.dev/enterprise/plugin-marketplace.md).

| Variable | Default | Description |
| - | - | - |
| `INSTANCE_DEFAULT_MARKETPLACES` | None | Plugin marketplaces that every user inherits, as a JSON array of objects with `source`, `name`, `ref`, `repo_path`, and `auto_load` fields. |
| `ENABLE_MARKETPLACE_PLUGIN_LOADING` | `true` | Load plugins from marketplaces when a conversation starts. |

## Source Control

These variables apply to every Git provider.

| Variable | Default | Description |
| - | - | - |
| `OH_RESOLVER_LABEL` | `openhands` | Issue label or `@` mention that starts OpenHands. |
| `ENABLE_PROACTIVE_CONVERSATION_STARTERS` | `false` | Let OpenHands start a conversation when a GitHub Actions workflow run fails. The organization's setting must also be on. |

### GitHub

See [GitHub](https://docs.openhands.dev/enterprise/integrations/github.md).

| Variable | Default | Description |
| - | - | - |
| `GITHUB_APP_CLIENT_ID` | None | Client ID of the GitHub App. Setting it turns on the GitHub integration. |
| `GITHUB_APP_CLIENT_SECRET` | None | Client secret of the GitHub App. |
| `GITHUB_APP_PRIVATE_KEY` | None | Private key of the GitHub App, in PEM format. You can write its line breaks as `\n`. |
| `GITHUB_APP_WEBHOOK_SECRET` | None | Webhook secret of the GitHub App. Required for webhooks. |
| `GITHUB_APP_SLUG` | None | Slug of the GitHub App, from the app's URL. |
| `GITHUB_WEBHOOKS_ENABLED` | `true` | Process GitHub webhook events. |

### GitLab

See [GitLab](https://docs.openhands.dev/enterprise/integrations/gitlab.md).

| Variable | Default | Description |
| - | - | - |
| `GITLAB_HOST` | `gitlab.com` | Hostname of your GitLab instance, without `https://`. |
| `GITLAB_APP_CLIENT_ID` | None | Application ID of the GitLab application. |
| `GITLAB_APP_CLIENT_SECRET` | None | Secret of the GitLab application. |

### Bitbucket Cloud

| Variable | Default | Description |
| - | - | - |
| `BITBUCKET_APP_CLIENT_ID` | None | Key of the Bitbucket OAuth consumer. |
| `BITBUCKET_APP_CLIENT_SECRET` | None | Secret of the Bitbucket OAuth consumer. |

### Bitbucket Data Center

See [Bitbucket Data Center](https://docs.openhands.dev/enterprise/integrations/bitbucket-data-center.md).

| Variable | Default | Description |
| - | - | - |
| `BITBUCKET_DATA_CENTER_HOST` | None | Hostname of your Bitbucket Data Center instance, without `https://`. |
| `BITBUCKET_DATA_CENTER_CLIENT_ID` | None | Client ID of the application link. |
| `BITBUCKET_DATA_CENTER_CLIENT_SECRET` | None | Client secret of the application link. |
| `BITBUCKET_DATA_CENTER_BOT_USERNAME` | None | Username of the bot account that OpenHands posts as. |
| `BITBUCKET_DATA_CENTER_BOT_TOKEN` | None | HTTP access token of the bot account. |

### Azure DevOps

See [Azure DevOps](https://docs.openhands.dev/enterprise/integrations/azure-devops.md).

| Variable | Default | Description |
| - | - | - |
| `AZURE_DEVOPS_TENANT_ID` | None | Microsoft Entra tenant ID. |
| `AZURE_DEVOPS_CLIENT_ID` | None | Application (client) ID of the Microsoft Entra app registration. |
| `AZURE_DEVOPS_CLIENT_SECRET` | None | Client secret of the Microsoft Entra app registration. |
| `AZURE_DEVOPS_WEBHOOK_SECRET` | None | Secret that verifies Azure DevOps service hook requests. Required for webhooks. |

## Jira

### Jira Cloud

See [Jira Cloud](https://docs.openhands.dev/enterprise/integrations/jira-cloud.md).

| Variable | Default | Description |
| - | - | - |
| `ENABLE_JIRA` | `false` | Turn on the Jira Cloud integration. |
| `JIRA_WEBHOOKS_ENABLED` | `false` | Process Jira Cloud webhook events. |
| `JIRA_ENABLE_OAUTH` | `true` | Link Jira accounts through an Atlassian OAuth app. Set it to `false` to match Jira users to OpenHands users by email address. |
| `JIRA_CLIENT_ID` | None | Client ID of the Atlassian OAuth app. OAuth only. |
| `JIRA_CLIENT_SECRET` | None | Client secret of the Atlassian OAuth app. OAuth only. |

### Jira Data Center

See [Jira Data Center](https://docs.openhands.dev/enterprise/integrations/jira-data-center.md).

| Variable | Default | Description |
| - | - | - |
| `ENABLE_JIRA_DC` | `false` | Turn on the Jira Data Center integration. |
| `JIRA_DC_WEBHOOKS_ENABLED` | `false` | Process Jira Data Center webhook events. |
| `JIRA_DC_ENABLE_OAUTH` | `true` | Link Jira accounts through a Jira OAuth app. Set it to `false` to match Jira users to OpenHands users by email address. |
| `JIRA_DC_BASE_URL` | None | URL of your Jira Data Center instance, such as `https://jira.example.com`. OAuth only. |
| `JIRA_DC_CLIENT_ID` | None | Client ID of the Jira OAuth app. OAuth only. |
| `JIRA_DC_CLIENT_SECRET` | None | Client secret of the Jira OAuth app. OAuth only. |
| `JIRA_DC_SERVICE_ACCOUNT_EMAIL` | None | Email address of the Jira service account. |
| `JIRA_DC_SERVICE_ACCOUNT_PAT` | None | Personal access token of the Jira service account. |

## Slack

See [Slack](https://docs.openhands.dev/enterprise/integrations/slack.md).

| Variable | Default | Description |
| - | - | - |
| `SLACK_CLIENT_ID` | None | Client ID of the Slack app. |
| `SLACK_CLIENT_SECRET` | None | Client secret of the Slack app. |
| `SLACK_SIGNING_SECRET` | None | Signing secret that verifies requests from Slack. |
| `SLACK_WEBHOOKS_ENABLED` | `false` | Process Slack events. |

## Email

OpenHands sends email, such as organization invitations, through your SMTP server.

| Variable | Default | Description |
| - | - | - |
| `SMTP_HOST` | None | Hostname of your SMTP server. Setting it turns on email. |
| `SMTP_PORT` | `587` | Port of your SMTP server. |
| `SMTP_FROM_EMAIL` | `OpenHands <no-reply@openhands.dev>` | Address that OpenHands sends email from. |
| `SMTP_USE_TLS` | `true` | Upgrade the connection with STARTTLS. |
| `SMTP_USE_SSL` | `false` | Connect over implicit TLS, usually on port 465. |
| `SMTP_USERNAME` | None | SMTP username. |
| `SMTP_PASSWORD` | None | SMTP password. |

## Web Search

| Variable | Default | Description |
| - | - | - |
| `TAVILY_API_KEY` | None | Tavily API key for agent web search. |

## Limits

| Variable | Default | Description |
| - | - | - |
| `RATE_LIMITING_ENABLED` | `true` | Rate-limit verification emails, invitations, and password changes. |
| `RATE_LIMIT_AUTH_WINDOWS` | None | Limit on API requests for each user, such as `10/second; 100/minute`. |
| `MAX_LLM_PROFILES_PER_USER` | `50` | Maximum number of LLM profiles that each user can save. |
| `MAX_PROVIDER_CONNECTIONS_PER_ORG` | `64` | Maximum number of LLM provider connections in each organization. |

## Feature Flags

These variables show or hide parts of the app.

| Variable | Default | Description |
| - | - | - |
| `OH_ALLOW_USER_LLM_CONFIGURATION` | `true` | Let users enter their own LLM key, model, and base URL. |
| `ENABLE_AUTOMATIONS` | `true` | Show the Automations page. |
| `ENABLE_ACP` | `true` | Show the ACP agent options. |
| `ENABLE_OAUTH_V2_LOGIN` | `false` | Sign users in through the auth providers that a Super Admin manages, instead of through Keycloak. |
| `ENABLE_SUPER_ADMIN` | `false` | Turn on [Super Admin](https://docs.openhands.dev/enterprise/super-admin.md). |
| `HIDE_PERSONAL_WORKSPACES` | `false` | Hide the personal workspace from users who belong to an organization. |
| `HIDE_BILLING_PAGE` | `false` | Hide the Billing page. |
| `HIDE_LLM_SETTINGS` | `false` | Hide the LLM settings pages. |
| `HIDE_INTEGRATIONS_PAGE` | `false` | Hide the Integrations settings page. |
| `HIDE_USERS_PAGE` | `false` | Hide the User settings page. |
| `ENABLE_MODEL_ROUTER` | `false` | Show the organization's Model Router page. |
| `ENABLE_AGENT_PROFILES_PAGE` | `false` | Show the Agent Profiles page. |
| `ENABLE_AGENT_CONTEXT_PAGE` | `false` | Show the Agent Context page. |
| `ENABLE_ORG_AGENT_PROFILES` | `false` | Let organizations share agent profiles. |
| `ENABLE_ORG_MCP_SERVERS` | `false` | Let organizations share MCP servers. |

## Telemetry and Observability

See [Analytics](https://docs.openhands.dev/enterprise/analytics.md).

| Variable | Default | Description |
| - | - | - |
| `ENABLE_POSTHOG_ANALYTICS` | `false` | Send product analytics events to OpenHands. Requires `POSTHOG_CLIENT_KEY`. |
| `POSTHOG_CLIENT_KEY` | None | PostHog project key. |
| `POSTHOG_HOST` | `https://us.i.posthog.com` | PostHog host. |
| `LMNR_PROJECT_API_KEY` | None | Laminar project API key. Setting it turns on conversation tracing. |
| `LMNR_BASE_URL` | `https://api.lmnr.ai` | URL of the Laminar server, without a port. |
| `LMNR_HTTP_PORT` | `443` | HTTP port of the Laminar server. |
| `LMNR_GRPC_PORT` | `8443` | gRPC port of the Laminar server. |
| `LMNR_FORCE_HTTP` | `false` | Send traces over HTTP instead of gRPC. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.