Skip to main content
All environment variables are set in the .env file located in your deployment directory (next to the docker-compose.yml files). A template with all available variables is provided at deployment/docker_compose/env.template.
After changing any variable, restart the affected containers for the changes to take effect. Most variables require restarting api_server; changes to database or storage variables require restarting all services.

Core settings

VariableDefaultDescription
IMAGE_TAGlatestDocker image tag to deploy. Use a pinned version (e.g. v1.2.3) in production for reproducible deployments.
WEB_DOMAINhttp://localhost:3000Public URL of your Onyx instance. Used for OAuth redirect URIs, email links, and CORS.
API_PREFIX(empty)Path prefix for all API routes. Set to /api if your reverse proxy cannot strip the prefix itself.
ENABLE_PAID_ENTERPRISE_EDITION_FEATURESfalseSet to true only if you have purchased an Enterprise license.
DISABLE_TELEMETRYfalseSet to true to opt out of anonymous usage telemetry.
MAX_ALLOWED_UPLOAD_SIZE_MB250Hard ceiling on file upload size. Individual user limits are capped at this value.
DEFAULT_USER_FILE_MAX_UPLOAD_SIZE_MB100Default per-user upload limit when no admin-configured value exists.
DISABLE_USER_KNOWLEDGEfalseSet to true to prevent users from uploading personal documents to assistants.
ENABLED_CONNECTOR_TYPES(empty, all enabled)Comma-separated list of connector type IDs to allow. Leave empty to enable all connectors.
ONYX_QUERY_HISTORY_TYPEnormalQuery history mode: normal (includes user emails), anonymized, or disabled.
LOG_LEVELinfoLog verbosity for all services: debug, info, warning, error.

Authentication

VariableDefaultDescription
AUTH_TYPEbasicAuthentication mode: basic, google_oauth, oidc, or saml.
USER_AUTH_SECRET(empty)Required in production. Secret for signing password-reset and email verification tokens. Generate with openssl rand -hex 32.
ENCRYPTION_KEY_SECRET(empty)Encrypts connector credentials and API keys at rest. Strongly recommended.
VALID_EMAIL_DOMAINS(empty, all allowed)Comma-separated list of allowed email domains (e.g. yourcompany.com).
REQUIRE_EMAIL_VERIFICATIONfalseRequire new users to verify their email before logging in. Requires SMTP.
ENABLE_EMAIL_INVITESfalseEnable invite-only registration. Admins send invite links from the Users page.
SESSION_EXPIRE_TIME_SECONDS604800Session lifetime in seconds. Default is 7 days.
PASSWORD_MIN_LENGTH8Minimum password length.
PASSWORD_MAX_LENGTH64Maximum password length.
PASSWORD_REQUIRE_UPPERCASEfalseRequire at least one uppercase letter.
PASSWORD_REQUIRE_LOWERCASEfalseRequire at least one lowercase letter.
PASSWORD_REQUIRE_DIGITfalseRequire at least one numeric digit.
PASSWORD_REQUIRE_SPECIAL_CHARfalseRequire at least one special character (!@#$%^&* etc.).
RATE_LIMIT_WINDOW_SECONDS(disabled)Time window for auth rate limiting. Must be set together with RATE_LIMIT_MAX_REQUESTS.
RATE_LIMIT_MAX_REQUESTS(disabled)Maximum auth requests per IP per window.

Google OAuth

VariableDefaultDescription
OAUTH_CLIENT_ID(empty)Google OAuth client ID (also accepted as GOOGLE_OAUTH_CLIENT_ID).
OAUTH_CLIENT_SECRET(empty)Google OAuth client secret (also accepted as GOOGLE_OAUTH_CLIENT_SECRET).

OIDC

VariableDefaultDescription
OPENID_CONFIG_URL(empty)OIDC discovery endpoint (the .well-known/openid-configuration URL from your IdP).
OIDC_PKCE_ENABLEDfalseEnable PKCE for the OIDC authorization flow.
OIDC_SCOPE_OVERRIDE(empty)Comma-separated list of scopes to request, overriding the defaults.

SAML

VariableDefaultDescription
SAML_CONF_DIR/app/onyx/configs/saml_configPath inside the container to the directory holding your IdP metadata and SAML configuration files.

LLM settings

VariableDefaultDescription
GEN_AI_API_KEY(empty)Fallback API key used when no provider-specific key is configured in the admin UI.
GEN_AI_MAX_TOKENS(model default)Override the maximum output token limit for LLM responses.
DISABLE_LITELLM_STREAMINGfalseSet to true to disable streaming responses from LiteLLM.
LITELLM_EXTRA_HEADERS(empty)JSON object of extra HTTP headers to send with every LiteLLM request (e.g. for proxy authentication).
LITELLM_CUSTOM_ERROR_MESSAGE_MAPPINGS(empty)JSON object mapping provider error substrings to user-friendly messages.
GENERATIVE_MODEL_ACCESS_CHECK_FREQ86400How often (in seconds) Onyx verifies that the configured LLM is still accessible.
ENABLE_CONTEXTUAL_RAGfalseEnable contextual RAG, which adds per-chunk LLM-generated context during indexing. Increases indexing cost.
LOG_ONYX_MODEL_INTERACTIONSfalseLog all prompts and LLM responses for debugging. Do not enable in production with sensitive data.
SEND_USER_METADATA_TO_LLM_PROVIDERfalseSend user ID and session ID to the LLM provider in API calls. Disabled by default for privacy.

Search and indexing

VariableDefaultDescription
INDEX_BATCH_SIZE16Number of documents processed per indexing batch.
ENABLE_MULTIPASS_INDEXINGfalseStore additional fine-grained chunk vectors for improved recall. Increases index size and indexing time.
MAX_DOCUMENT_CHARS5000000Maximum characters per document. Documents exceeding this limit are truncated at indexing time.
MAX_FILE_SIZE_BYTES2147483648Maximum file size (in bytes) that a connector will attempt to index. Default is 2 GB.
SKIP_METADATA_IN_CHUNKfalseOmit document-level metadata from each chunk. Reduces chunk size but may reduce answer quality for metadata-heavy documents.
CONTINUE_ON_CONNECTOR_FAILUREfalseAllow indexing to continue when individual documents fail to process.
DISABLE_INDEX_UPDATE_ON_SWAPfalsePause primary index updates while a new embedding model index is being built in the background.
CELERY_WORKER_DOCPROCESSING_CONCURRENCY6Number of parallel document processing workers. Increase for faster indexing on machines with more CPU/RAM.
CELERY_WORKER_DOCFETCHING_CONCURRENCY1Number of parallel document fetching workers.
INDEXING_EMBEDDING_MODEL_NUM_THREADS8Threads used for parallel embedding API calls during indexing.
RECENCY_BIAS_MULTIPLIER1.0Weight applied to document recency in search ranking. Values above 1.0 favor newer documents.
VariableDefaultDescription
VESPA_HOSTlocalhostHostname of the Vespa application node. In Docker Compose, this is index.
VESPA_PORT8081Vespa application HTTP port.
VESPA_LANGUAGE_OVERRIDE(empty)Force Vespa to use a specific language for text analysis (e.g. de for German).
VariableDefaultDescription
OPENSEARCH_HOSTlocalhostOpenSearch hostname.
OPENSEARCH_ADMIN_USERNAMEadminOpenSearch admin username.
OPENSEARCH_ADMIN_PASSWORDStrongPassword123!OpenSearch admin password. Change this in production.
OPENSEARCH_TEXT_ANALYZERenglishText analyzer for full-text fields. Use a language-specific analyzer (e.g. german) for non-English corpora. Changing this requires a full reindex.

Storage

PostgreSQL

VariableDefaultDescription
POSTGRES_USERpostgresPostgreSQL username.
POSTGRES_PASSWORDpasswordPostgreSQL password. Change this before going to production.
POSTGRES_DBpostgresPostgreSQL database name.
POSTGRES_HOST127.0.0.1PostgreSQL hostname. In Docker Compose, this is relational_db.
POSTGRES_PORT5432PostgreSQL port.
POSTGRES_API_SERVER_POOL_SIZE40Number of persistent connections in the API server connection pool.
POSTGRES_POOL_RECYCLE1200Recycle connections older than this many seconds (default 20 minutes).
USE_IAM_AUTHfalseUse AWS IAM authentication for PostgreSQL instead of a username/password.

Redis

VariableDefaultDescription
REDIS_HOSTlocalhostRedis hostname. In Docker Compose, this is cache.
REDIS_PORT6379Redis port.
REDIS_PASSWORD(empty)Redis password. Set this if your Redis instance requires authentication.
REDIS_SSLfalseEnable TLS for Redis connections.
USE_REDIS_IAM_AUTHfalseUse AWS IAM authentication for Redis ElastiCache.

File storage (MinIO / S3)

VariableDefaultDescription
FILE_STORE_BACKENDs3File storage backend: s3 (MinIO or AWS S3) or postgres.
S3_ENDPOINT_URL(empty)S3-compatible endpoint URL. Set to http://minio:9000 when using the bundled MinIO. Leave empty for AWS S3.
S3_AWS_ACCESS_KEY_ID(empty)S3/MinIO access key ID.
S3_AWS_SECRET_ACCESS_KEY(empty)S3/MinIO secret access key.
S3_FILE_STORE_BUCKET_NAMEonyx-file-store-bucketS3 bucket name for stored files.
MINIO_ROOT_USERminioadminMinIO root username (only used by the MinIO container itself).
MINIO_ROOT_PASSWORDminioadminMinIO root password. Change this in production.

Email / SMTP

VariableDefaultDescription
SMTP_SERVER(empty)SMTP server hostname (e.g. smtp.sendgrid.net).
SMTP_PORT587SMTP port.
SMTP_USER(empty)SMTP username.
SMTP_PASS(empty)SMTP password.
EMAIL_FROM(same as SMTP_USER)From address for Onyx-sent emails.
SENDGRID_API_KEY(empty)SendGrid API key. When set, Onyx uses SendGrid instead of direct SMTP.

MCP server

The Model Context Protocol (MCP) server lets external MCP clients interact with Onyx as a tool.
VariableDefaultDescription
MCP_SERVER_ENABLEDfalseSet to true to enable the MCP server.
MCP_SERVER_PORT8090Port the MCP server listens on.
MCP_SERVER_CORS_ORIGINS(empty)Comma-separated list of allowed CORS origins for MCP clients.

Where to find all variables

The full list of recognized variables is maintained in two places:
  • deployment/docker_compose/env.template — the template you copy to .env, organized by category with inline comments.
  • backend/onyx/configs/app_configs.py — the authoritative Python source that reads every variable with its default value.
Start with the template file. It is organized into sections (commonly modified, services, advanced), and variables that are safe to ignore for most deployments are commented out. Only uncomment and set what you actually need.

Build docs developers (and LLMs) love