Reference for all environment variables used by Dify self-hosted deployments
Dify works out of the box with default settings. To customize your deployment, edit environment variables in the relevant file:
Essential startup values live in docker/.env, which you created from docker/.env.example during deployment. Edit them directly.
Optional or provider-specific settings have templates under docker/envs/. To override a default value, copy the matching template (drop the .example suffix), then edit your copy.For example:
cd dify/dockercp envs/vectorstores/milvus.env.example envs/vectorstores/milvus.env
Values in docker/.env take precedence over values in any docker/envs/*.env files.
After upgrading Dify, compare each .env.example with its matching .env for new or changed variables.
These URL variables configure the addresses of Dify’s various services.For single-domain deployments behind Nginx (the default Docker Compose setup), these can be left empty—the system auto-detects from the incoming request. Configure them when using custom domains, split-domain deployments, or a reverse proxy.
Default: (empty)The public URL of Dify’s backend API. Set this if you use OAuth login (GitHub, Google), Notion integration, or any plugin that requires OAuth—these features need an absolute callback URL to redirect users back after authorization. Also determines whether secure (HTTPS-only) cookies are used.Example: https://api.console.dify.ai
Default: http://api:5001The console API address the web frontend container uses for server-side requests, reaching the API directly over the internal Docker network rather than your public domain. Only the web frontend container uses this variable, not the Python backend; browser requests still go to CONSOLE_API_URL.If left empty, it falls back to CONSOLE_API_URL. Change it only if the API service is reachable at a different internal address.
Default: (empty)The public URL of Dify’s console frontend. Used to build links in all system emails (invitations, password resets, notifications) and to redirect users back to the console after OAuth login. Also serves as the default CORS allowed origin if CONSOLE_CORS_ALLOW_ORIGINS is not set.If empty, email links will be broken—even in single-domain setups, set this if you use email features.Example: https://console.dify.ai
Default: (empty)The API Base URL shown to developers in the Dify console—the URL they copy into their code to call the Dify API. If empty, auto-detects from the current request (e.g., http://localhost/v1). Set this to ensure a consistent URL when your server is accessible via multiple addresses.Example: https://api.dify.ai
Default: (empty)The backend API URL for the WebApp frontend (published apps). This variable is only used by the web frontend container, not the Python backend. If empty, the Docker image defaults to http://127.0.0.1:5001.Example: https://api.app.dify.ai
Default: (empty)The public URL where published WebApps are accessible. Required for the Human Input node in workflows—form links in email notifications are built as {APP_WEB_URL}/form/{token}. If empty, Human Input email delivery will not include valid form links.Example: https://app.dify.ai
Default: http://localhostThe publicly accessible URL for webhook and integration trigger endpoints. External systems use this address to invoke your workflows. Dify builds trigger callback URLs like {TRIGGER_URL}/triggers/webhook/{id} and displays them in the console.For triggers to work from external systems, this must point to a public domain or IP address they can reach.
Default: (empty; falls back to CONSOLE_API_URL)The base URL for file preview and download links. Dify generates signed, time-limited URLs for all files (uploaded documents, tool outputs, workspace logos) and serves them to the frontend and multi-modal models.Set this if you use file processing plugins, or if you want file URLs on a dedicated domain. If both FILES_URL and CONSOLE_API_URL are empty, file previews will not work.Example: https://upload.example.com or http://<your-ip>:5001
Default: (empty; falls back to FILES_URL)The file access URL used for communication between services inside the Docker network (e.g., plugin daemon, PDF/Word extractors). These internal services may not be able to reach the external FILES_URL if it routes through Nginx or a public domain.If empty, internal services use FILES_URL. Set this when internal services can’t reach the external URL.Example: http://api:5001
Default: 300 (5 minutes)How long signed file URLs remain valid, in seconds. After this time, the URL is rejected and the file must be re-requested. Increase for long-running processes; decrease for tighter security.
Default: trueEnables real-time collaboration on the Workflow canvas: simultaneous editing, in-canvas comments, and @mentions.If you access Dify on a host other than localhost, set NEXT_PUBLIC_SOCKET_URL to a WebSocket URL your browser can reach (see CORS Configuration). The default ws://localhost only works for local-only setups.To disable collaboration, set this to false. On Docker Compose, also remove collaboration from COMPOSE_PROFILES. Otherwise the dedicated api_websocket container keeps running but receives no traffic.If you use your own reverse proxy, forward Upgrade and Connection headers on /socket.io/ (the bundled nginx template already does this). Running multiple API replicas requires sticky sessions.
Minimum log severity. Controls what gets logged across all handlers (file + console). Levels from least to most severe: DEBUG, INFO, WARNING, ERROR, CRITICAL.
LOG_OUTPUT_FORMAT
text
text produces human-readable lines with timestamp, level, thread, and trace ID. json produces structured JSON for log aggregation tools (ELK, Datadog, etc.).
LOG_FILE
/app/logs/server.log
Log file path. When set, enables file-based logging with automatic rotation. The directory is created automatically. When empty, logs only go to console.
LOG_FILE_MAX_SIZE
20
Maximum log file size in MB before rotation. When exceeded, the active file is renamed to .1 and a new file is started.
LOG_FILE_BACKUP_COUNT
5
Number of rotated log files to keep. With defaults, at most 6 files exist: the active file plus 5 backups.
LOG_DATEFORMAT
%Y-%m-%d %H:%M:%S
Timestamp format for text-format logs (strftime codes). Ignored by JSON format.
LOG_TZ
UTC
Timezone for log timestamps (pytz format, e.g., Asia/Shanghai). Only applies to text format—JSON always uses UTC. Also sets Celery’s task scheduling timezone.
Enables verbose logging: workflow node inputs/outputs, tool execution details, full LLM prompts and responses, and app startup timing. Useful for local development; not recommended for production as it may expose sensitive data in logs.
FLASK_DEBUG
false
Standard Flask debug mode flag. Not actively used by Dify; DEBUG is the primary control.
ENABLE_REQUEST_LOGGING
false
Logs a compact access line (METHOD PATH STATUS DURATION TRACE_ID) for every HTTP request. When LOG_LEVEL is also set to DEBUG, additionally logs full request and response bodies as JSON.
DEPLOY_ENV
PRODUCTION
Tags monitoring data in Sentry and OpenTelemetry so you can filter errors and traces by environment. Also sent as the X-Env response header. Does not change application behavior.
MIGRATION_ENABLED
true
When true, runs database schema migrations (flask upgrade-db) automatically on container startup. Docker only. Set to false if you run migrations separately. For source code launches, run flask db upgrade manually.
CHECK_UPDATE_URL
https://updates.dify.ai
The console checks this URL for newer Dify versions. Set to empty to disable—useful for air-gapped environments or to prevent external HTTP calls.
OPENAI_API_BASE
https://api.openai.com/v1
Legacy variable. Not actively used by Dify’s own code. May be picked up by the OpenAI Python SDK if present in the environment.
Default: (pre-filled in .env.example; must be replaced for production)Used for session cookie signing, JWT authentication tokens, file URL signatures (HMAC-SHA256), and encrypting third-party OAuth credentials (AES-256). Generate a strong key before first launch:
openssl rand -base64 42
Changing this key after deployment will immediately log out all users, invalidate all file URLs, and break any plugin integrations that use OAuth—their encrypted credentials become unrecoverable.
Default: (empty)Optional security gate for first-time setup. When set, the /install page requires this password before the admin account can be created—preventing unauthorized setup if your server is exposed. Once setup is complete, this variable has no further effect. Maximum length: 30 characters.
How long a login session’s access token stays valid (in minutes). When it expires, the browser silently refreshes it using the refresh token—users are not logged out.
REFRESH_TOKEN_EXPIRE_DAYS
30
How long a user can stay logged in without re-entering credentials (in days). If the user doesn’t visit within this period, they must log in again.
APP_MAX_EXECUTION_TIME
1200
Maximum time (in seconds) an app execution can run before being terminated. Works alongside WORKFLOW_MAX_EXECUTION_TIME: both enforce the same default of 20 minutes, but this one applies at the app queue level while the other applies at the workflow engine level. Increase both if your workflows need more time.
APP_DEFAULT_ACTIVE_REQUESTS
0
Default concurrent request limit per app, used when an app doesn’t have a custom limit set in the UI. 0 means unlimited. The effective limit is the smaller of this and APP_MAX_ACTIVE_REQUESTS.
APP_MAX_ACTIVE_REQUESTS
0
Global ceiling for concurrent requests per app. Overrides per-app settings if they exceed this value. 0 means unlimited.
Only effective when starting with Docker image or Docker Compose.
Variable
Default
Description
DIFY_BIND_ADDRESS
0.0.0.0
Network interface the API server binds to. 0.0.0.0 listens on all interfaces; set to 127.0.0.1 to restrict to localhost only.
DIFY_PORT
5001
Port the API server listens on.
SERVER_WORKER_AMOUNT
1
Number of Gunicorn worker processes. With gevent (default), each worker handles multiple concurrent connections via greenlets, so 1 is usually sufficient. For sync workers, use (2 x CPU cores) + 1. Reference.
SERVER_WORKER_CLASS
gevent
Gunicorn worker type. Keep the default; other values break psycopg2 and gRPC patching.
SERVER_WORKER_CONNECTIONS
10
Maximum concurrent connections per worker. Only applies to async workers (gevent). If you experience connection rejections or slow responses under load, try increasing this value.
GUNICORN_TIMEOUT
360
If a worker doesn’t respond within this many seconds, Gunicorn kills and restarts it. Set to 360 (6 minutes) to support long-lived SSE connections used for streaming LLM responses.
Docker Compose only. Worker class for the dedicated api_websocket container. Keep the default; other values break WebSocket support.
API_WEBSOCKET_WORKER_CONNECTIONS
1000
Docker Compose only. Maximum simultaneous WebSocket connections the api_websocket container accepts. Each open Workflow editor in a browser tab uses one, so the default supports up to 1000 simultaneous editor sessions; raise it if you expect more.
API_WEBSOCKET_GUNICORN_TIMEOUT
360
Docker Compose only. If an api_websocket worker doesn’t respond within this many seconds, Gunicorn restarts it. The default 360 seconds (6 minutes) supports long-lived WebSocket connections.
CELERY_WORKER_CLASS
(empty; defaults to gevent)
Celery worker type with the same gevent patching requirements as SERVER_WORKER_CLASS. Strongly discouraged to change.
CELERY_WORKER_AMOUNT
4
Number of Celery worker processes. Only used when autoscaling is disabled. Lower it on constrained VMs; for elastic throughput, enable CELERY_AUTO_SCALE instead of raising this.
CELERY_AUTO_SCALE
false
Enable dynamic autoscaling. When enabled, Celery monitors queue depth and spawns/kills workers between CELERY_MIN_WORKERS and CELERY_MAX_WORKERS.
CELERY_MAX_WORKERS
(empty; defaults to CPU count)
Maximum workers when autoscaling is enabled.
CELERY_MIN_WORKERS
(empty; defaults to 1)
Minimum workers when autoscaling is enabled.
COMPOSE_WORKER_HEALTHCHECK_DISABLED
true
Disable the Docker Compose health check for the Celery worker container. Disabled by default because celery inspect ping can be expensive on busy workers. Set to false to enable. Only applies to Docker Compose deployments.
COMPOSE_WORKER_HEALTHCHECK_INTERVAL
30s
Interval between Celery worker health checks. Only used when COMPOSE_WORKER_HEALTHCHECK_DISABLED=false. Accepts Docker Compose duration values (e.g., 30s, 1m).
COMPOSE_WORKER_HEALTHCHECK_TIMEOUT
30s
Timeout for each Celery worker health check. Only used when COMPOSE_WORKER_HEALTHCHECK_DISABLED=false.
These control how Dify manages its pool of database connections. The defaults work well for most deployments.
Variable
Default
Description
SQLALCHEMY_POOL_SIZE
30
Number of persistent connections kept in the pool.
SQLALCHEMY_MAX_OVERFLOW
10
Additional temporary connections allowed when the pool is full. With default settings, up to 40 connections (30 + 10) can exist simultaneously.
SQLALCHEMY_POOL_RECYCLE
3600
Recycle connections after this many seconds to prevent stale connections.
SQLALCHEMY_POOL_TIMEOUT
30
How long to wait for a connection when the pool is exhausted. Requests fail with a timeout error if no connection frees up in time.
SQLALCHEMY_POOL_RESET_ON_RETURN
rollback
Action SQLAlchemy takes when a connection returns to the pool. rollback clears any uncommitted transaction state before reuse; commit commits it instead.
SQLALCHEMY_POOL_PRE_PING
false
Test each connection with a lightweight query before using it. Prevents “connection lost” errors but adds slight latency. Recommended for production with unreliable networks.
SQLALCHEMY_POOL_USE_LIFO
false
Reuse the most recently returned connection (LIFO) instead of rotating evenly (FIFO). LIFO keeps fewer connections “warm” and can reduce overhead.
SQLALCHEMY_ECHO
false
Print all SQL statements to logs. Useful for debugging query issues.
These are passed as startup arguments to the PostgreSQL container—they configure the database server, not the Dify application.
Variable
Default
Description
POSTGRES_MAX_CONNECTIONS
200
Maximum number of database connections. Keep at least SERVER_WORKER_AMOUNT × SERVER_WORKER_CONNECTIONS + CELERY_WORKER_AMOUNT + headroom to avoid too many connections errors when API and Celery workers both open pools. Reference
POSTGRES_SHARED_BUFFERS
128MB
Shared memory for buffers. Recommended: 25% of available memory. Reference
POSTGRES_WORK_MEM
4MB
Memory per database worker for working space. Reference
POSTGRES_MAINTENANCE_WORK_MEM
64MB
Memory reserved for maintenance activities. Reference
POSTGRES_EFFECTIVE_CACHE_SIZE
4096MB
Planner’s assumption about effective cache size. Reference
POSTGRES_STATEMENT_TIMEOUT
0
Max statement duration before termination (ms). 0 means no timeout. Reference
POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT
0
Max idle-in-transaction session duration (ms). 0 means no timeout. Reference
Configure these to connect Dify to your Redis instance. Dify supports three deployment modes: standalone (default), Sentinel, and Cluster.
Variable
Default
Description
REDIS_HOST
redis
Redis server hostname. Only used in standalone mode; ignored when Sentinel or Cluster mode is enabled.
REDIS_PORT
6379
Redis server port. Only used in standalone mode.
REDIS_USERNAME
(empty)
Redis 6.0+ ACL username. Applies to all modes (standalone, Sentinel, Cluster).
REDIS_PASSWORD
difyai123456
Redis authentication password. For Cluster mode, use REDIS_CLUSTERS_PASSWORD instead.
REDIS_DB
0
Redis database number (0–15). Only applies to standalone and Sentinel modes. Make sure this doesn’t collide with Celery’s database (configured in CELERY_BROKER_URL; default is DB 1).
REDIS_KEY_PREFIX
(empty)
Optional global prefix applied to all Redis keys, pub/sub channels, Redis Streams names, and Celery broker queues and result-backend keys. Dify automatically inserts a colon between the prefix and the key, so setting staging produces keys like staging:session:abc. Useful when multiple Dify instances share one Redis deployment (for example, staging and production) to prevent key collisions. Leave empty to preserve unprefixed behavior. Turning the prefix on for an existing deployment strands any keys written under the previous (empty or different) prefix.
REDIS_USE_SSL
false
Enable SSL/TLS for the Redis connection. Does not automatically apply to Sentinel protocol.
REDIS_MAX_CONNECTIONS
(empty)
Maximum connections in the Redis pool. Leave unset for the library default. Set this to match your Redis server’s maxclients if needed.
Sentinel provides automatic master discovery and failover for high availability. Mutually exclusive with Cluster mode.
Variable
Default
Description
REDIS_USE_SENTINEL
false
Enable Redis Sentinel mode. When enabled, REDIS_HOST/REDIS_PORT are ignored; Dify connects to Sentinel nodes instead and asks for the current master.
REDIS_SENTINELS
(empty)
Sentinel node addresses. Format: <ip1>:<port1>,<ip2>:<port2>,<ip3>:<port3>. These are the Sentinel instances, not the Redis servers.
REDIS_SENTINEL_SERVICE_NAME
(empty)
The logical service name Sentinel monitors (configured in sentinel.conf). Dify calls master_for(service_name) to discover the current master.
REDIS_SENTINEL_USERNAME
(empty)
Username for authenticating with Sentinel nodes. Separate from REDIS_USERNAME, which authenticates with the Redis master/replicas.
REDIS_SENTINEL_PASSWORD
(empty)
Password for authenticating with Sentinel nodes. Separate from REDIS_PASSWORD.
REDIS_SENTINEL_SOCKET_TIMEOUT
0.1
Socket timeout (in seconds) for communicating with Sentinel nodes. Default 0.1s assumes fast local network. For cloud/WAN deployments, increase to 1.0–5.0s to prevent intermittent timeouts.
These tune client-side retry, timeout, and health-check behavior for Redis connections. Defaults are conservative; increase timeouts for cloud or WAN deployments where network latency is higher.
Variable
Default
Description
REDIS_RETRY_RETRIES
3
Maximum retries per Redis command on transient failures (ConnectionError, TimeoutError, socket.timeout). Set to 0 to disable retries. Uses exponential backoff with jitter.
REDIS_RETRY_BACKOFF_BASE
1.0
Base delay in seconds for exponential backoff between retries.
REDIS_RETRY_BACKOFF_CAP
10.0
Maximum backoff delay in seconds between retries.
REDIS_SOCKET_TIMEOUT
5.0
Socket timeout in seconds for Redis read/write operations. Increase if you see intermittent command timeouts under load.
REDIS_SOCKET_CONNECT_TIMEOUT
5.0
Socket timeout in seconds for establishing a Redis connection.
REDIS_HEALTH_CHECK_INTERVAL
30
Interval in seconds between client-side health checks on idle connections. Set to 0 to disable. Not applied in Cluster mode (silently stripped by redis-py).
Where Celery stores task results. Options: redis (fast, in-memory) or database (stores in your main database).
BROKER_USE_SSL
false
Auto-enabled when CELERY_BROKER_URL uses rediss:// scheme. Applies the Redis SSL certificate settings to the broker connection.
CELERY_USE_SENTINEL
false
Enable Redis Sentinel mode for the Celery broker.
CELERY_SENTINEL_MASTER_NAME
(empty)
Sentinel service name (Master Name).
CELERY_SENTINEL_PASSWORD
(empty)
Password for Sentinel authentication. Separate from REDIS_SENTINEL_PASSWORD; the two can differ if caching and task queuing use different Sentinel clusters.
CELERY_SENTINEL_SOCKET_TIMEOUT
0.1
Timeout for connecting to Sentinel in seconds.
CELERY_TASK_ANNOTATIONS
null
Apply runtime settings to specific tasks (e.g., rate limits). Format: JSON dictionary. Example: {"tasks.add": {"rate_limit": "10/s"}}. Most users don’t need this.
Controls cross-domain access policies for the frontend.
Variable
Default
Description
WEB_API_CORS_ALLOW_ORIGINS
*
Allowed origins for cross-origin requests to the Web API. Example: https://dify.app
CONSOLE_CORS_ALLOW_ORIGINS
*
Allowed origins for cross-origin requests to the console API. If not set, falls back to CONSOLE_WEB_URL.
COOKIE_DOMAIN
(empty)
Set to the shared top-level domain (e.g., example.com) when frontend and backend run on different subdomains. This allows authentication cookies to be shared across subdomains. When empty, cookies use the most secure __Host- prefix and are locked to a single domain.
NEXT_PUBLIC_COOKIE_DOMAIN
(empty)
Frontend flag for cross-subdomain cookies. Set to 1 (or any non-empty value) to enable—the actual domain is read from COOKIE_DOMAIN on the backend.
NEXT_PUBLIC_SOCKET_URL
ws://localhost
Browser-side WebSocket endpoint for real-time collaboration. Scheme + host + port only (path /socket.io/ is fixed). Swap http(s):// for ws(s)://. Example: wss://dify.example.com. The default targets the bundled nginx on port 80. Applied at runtime; container restart picks up changes.
NEXT_PUBLIC_BATCH_CONCURRENCY
5
Frontend-only. Controls how many concurrent API calls the UI makes during batch operations.
Configure where Dify stores uploaded files, dataset documents, and encryption keys. Each storage type has its own credential variables—configure only the one you’re using.
Default: opendalSelects the file storage backend. Supported values: opendal, s3, azure-blob, aliyun-oss, google-storage, huawei-obs, volcengine-tos, tencent-cos, baidu-obs, oci-storage, supabase, clickzetta-volume, local (deprecated; internally uses OpenDAL with filesystem scheme).
OpenDAL (Default)
Default storage backend using Apache OpenDAL, a unified interface supporting many storage services. Dify automatically scans environment variables matching OPENDAL_<SCHEME>_* and passes them to OpenDAL. For example, with OPENDAL_SCHEME=s3, set OPENDAL_S3_ACCESS_KEY_ID, OPENDAL_S3_SECRET_ACCESS_KEY, etc.
Variable
Default
Description
OPENDAL_SCHEME
fs
Storage service to use. Examples: fs (local filesystem), s3, gcs, azblob.
For the default fs scheme:
Variable
Default
Description
OPENDAL_FS_ROOT
storage
Root directory for local filesystem storage. Created automatically if it doesn’t exist.
S3 endpoint address. Required for non-AWS S3-compatible services (MinIO, etc.).
S3_REGION
us-east-1
S3 region.
S3_BUCKET_NAME
difyai
S3 bucket name.
S3_ACCESS_KEY
(empty)
S3 Access Key. Not needed when using IAM roles.
S3_SECRET_KEY
(empty)
S3 Secret Key. Not needed when using IAM roles.
S3_ADDRESS_STYLE
auto
S3 addressing style: auto, path, or virtual. Controls whether bucket names appear in the URL path (path) or as a subdomain (virtual). Only applies when S3_USE_AWS_MANAGED_IAM is false.
S3_USE_AWS_MANAGED_IAM
false
Use AWS IAM roles (EC2 instance profile, ECS task role) instead of explicit access key/secret key. When enabled, credentials are auto-discovered from the instance metadata.
Separate S3-compatible storage for archiving workflow run logs. Used by the paid plan retention system to archive workflow runs older than the retention period to JSONL format. Requires BILLING_ENABLED=true.
Configure the vector database used for knowledge base embedding storage and similarity search. Each provider has its own set of credential variables—configure only the one you’re using.
Default: weaviateSelects the vector database backend. If a dataset already has an index, the dataset’s stored type takes precedence over this setting. When switching providers in Docker Compose, COMPOSE_PROFILES automatically starts the matching container based on this value.Supported values: weaviate, oceanbase, seekdb, qdrant, milvus, myscale, relyt, pgvector, pgvecto-rs, chroma, opensearch, oracle, tencent, elasticsearch, elasticsearch-ja, analyticdb, couchbase, vikingdb, opengauss, tablestore, vastbase, tidb, tidb_on_qdrant, baidu, lindorm, huawei_cloud, upstash, matrixone, clickzetta, alibabacloud_mysql, iris, hologres.
Variable
Default
Description
VECTOR_INDEX_NAME_PREFIX
Vector_index
Prefix added to collection names in the vector database. Change this if you share a vector database instance across multiple Dify deployments.
Weaviate
Variable
Default
Description
WEAVIATE_ENDPOINT
http://weaviate:8080
Weaviate REST API endpoint.
WEAVIATE_API_KEY
(empty)
API key for Weaviate authentication.
WEAVIATE_GRPC_ENDPOINT
grpc://weaviate:50051
Separate gRPC endpoint for high-performance binary protocol. Significantly faster for batch operations. Falls back to inferring from HTTP endpoint if not set.
WEAVIATE_TOKENIZATION
word
Tokenization method for text fields. Options: word (splits on whitespace and punctuation), whitespace (splits on whitespace only), character (character-level, better for CJK languages).
OceanBase / seekdb
seekdb is the lite version of OceanBase and shares the same connection configuration.
Variable
Default
Description
OCEANBASE_VECTOR_HOST
oceanbase
Hostname or IP address.
OCEANBASE_VECTOR_PORT
2881
Port number.
OCEANBASE_VECTOR_USER
root@test
Database username.
OCEANBASE_VECTOR_PASSWORD
difyai123456
Database password.
OCEANBASE_VECTOR_DATABASE
test
Database name.
OCEANBASE_CLUSTER_NAME
difyai
Cluster name (Docker deployment only).
OCEANBASE_MEMORY_LIMIT
6G
Memory limit for OceanBase (Docker deployment only).
SEEKDB_MEMORY_LIMIT
2G
Memory limit for seekdb (Docker deployment only).
OCEANBASE_ENABLE_HYBRID_SEARCH
false
Enable fulltext index for BM25 queries alongside vector search. Requires OceanBase >= 4.3.5.1. Collections must be recreated after enabling.
Milvus URI. For Zilliz Cloud, use the Public Endpoint.
MILVUS_DATABASE
(empty)
Database name.
MILVUS_TOKEN
(empty)
Authentication token. For Zilliz Cloud, use the API Key.
MILVUS_USER
(empty)
Username.
MILVUS_PASSWORD
(empty)
Password.
MILVUS_ENABLE_HYBRID_SEARCH
false
Enable BM25 sparse index for full-text search alongside vector similarity. Requires Milvus >= 2.5.0. If the collection was created without this enabled, it must be recreated.
MILVUS_ANALYZER_PARAMS
(empty)
Analyzer parameters for text fields.
MILVUS_SECURE
false
Enable one-way TLS for the Milvus connection. When enabled, the client connects over gRPC with TLS and verifies the server certificate.
MILVUS_SERVER_PEM_PATH
(empty)
Path inside the container to the Milvus server certificate (PEM), used to verify the server when MILVUS_SECURE is enabled.
MILVUS_SERVER_NAME
(empty)
Server name (TLS SNI, matching the certificate’s CN or SAN) to verify against. Required when MILVUS_SERVER_PEM_PATH is set.
Switch to Elastic Cloud mode. When true, uses ELASTICSEARCH_CLOUD_URL and ELASTICSEARCH_API_KEY instead of host/port/username/password.
ELASTICSEARCH_CLOUD_URL
(empty)
Elastic Cloud endpoint URL. Required when ELASTICSEARCH_USE_CLOUD=true.
ELASTICSEARCH_API_KEY
(empty)
Elastic Cloud API key. Required when ELASTICSEARCH_USE_CLOUD=true.
ELASTICSEARCH_VERIFY_CERTS
false
Verify SSL certificates.
ELASTICSEARCH_CA_CERTS
(empty)
Path to CA certificates.
ELASTICSEARCH_REQUEST_TIMEOUT
100000
Request timeout in milliseconds.
ELASTICSEARCH_RETRY_ON_TIMEOUT
true
Retry on timeout.
ELASTICSEARCH_MAX_RETRIES
10
Maximum retry attempts.
Baidu Vector DB
Variable
Default
Description
BAIDU_VECTOR_DB_ENDPOINT
http://127.0.0.1:5287
Endpoint URL.
BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS
30000
Connection timeout in milliseconds.
BAIDU_VECTOR_DB_ACCOUNT
root
Account name.
BAIDU_VECTOR_DB_API_KEY
dify
API key.
BAIDU_VECTOR_DB_DATABASE
dify
Database name.
BAIDU_VECTOR_DB_SHARD
1
Number of shards.
BAIDU_VECTOR_DB_REPLICAS
3
Number of replicas.
BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER
DEFAULT_ANALYZER
Inverted index analyzer.
BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE
COARSE_MODE
Inverted index parser mode.
BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT
500
Absolute row-count increment that triggers an automatic index rebuild on the Baidu Vector DB side. Works alongside _RATIO; whichever threshold is crossed first wins.
Relative growth (new rows / existing rows) that triggers an automatic index rebuild. Whichever threshold is crossed first wins.
BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS
300
Maximum time the client waits for an index rebuild to complete. On timeout, the client call fails but the server-side rebuild may still finish; retrying the query after a delay typically succeeds.
VikingDB
Variable
Default
Description
VIKINGDB_ACCESS_KEY
(empty)
Access key.
VIKINGDB_SECRET_KEY
(empty)
Secret key.
VIKINGDB_REGION
cn-shanghai
Region.
VIKINGDB_HOST
api-vikingdb.xxx.volces.com
API host. Replace with your region-specific endpoint.
Maximum file size in MB for document uploads (PDFs, Word docs, etc.). Users see a “file too large” error when exceeded. Does not apply to images, videos, or audio—they have separate limits below.
UPLOAD_FILE_BATCH_LIMIT
5
Maximum number of files the frontend allows per upload batch.
UPLOAD_FILE_EXTENSION_BLACKLIST
(empty)
Security blocklist of file extensions that cannot be uploaded. Comma-separated, lowercase, no dots. Example: exe,bat,cmd,com,scr,vbs,ps1,msi,dll. Empty allows all types.
SINGLE_CHUNK_ATTACHMENT_LIMIT
10
Maximum number of images that can be embedded in a single knowledge base segment (chunk).
IMAGE_FILE_BATCH_LIMIT
10
Maximum number of image files per upload batch.
ATTACHMENT_IMAGE_FILE_SIZE_LIMIT
2
Maximum size in MB for images fetched from external URLs during knowledge base indexing. Images larger than this are skipped. Different from UPLOAD_IMAGE_FILE_SIZE_LIMIT which applies to direct uploads.
ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT
60
Timeout in seconds when downloading images from external URLs during knowledge base indexing. Slow or unresponsive image servers are abandoned after this timeout.
Unstructured.io API endpoint. Required when ETL_TYPE is Unstructured. Also needed for .ppt file support. Example: http://unstructured:8000/general/v0/general.
How files are sent to multi-modal LLMs. base64 embeds file data in the request (more compatible, works offline, larger payloads). url sends a signed URL for the model to fetch (faster, smaller requests, but the model must be able to reach FILES_URL).
UPLOAD_IMAGE_FILE_SIZE_LIMIT
10
Maximum image file size in MB for direct uploads (jpg, png, webp, gif, svg).
UPLOAD_VIDEO_FILE_SIZE_LIMIT
100
Maximum video file size in MB for direct uploads (mp4, mov, mpeg, webm).
UPLOAD_AUDIO_FILE_SIZE_LIMIT
50
Maximum audio file size in MB for direct uploads (mp3, m4a, wav, amr, mpga).
All upload size limits are also gated by NGINX_CLIENT_MAX_BODY_SIZE (default 100M). If you increase any upload limit above 100 MB, also increase NGINX_CLIENT_MAX_BODY_SIZE to match—otherwise Nginx rejects the upload with a 413 error.
public uses standard OAuth 2.0 (requires HTTPS redirect URL, needs CLIENT_ID + CLIENT_SECRET). internal uses a direct integration token (works with HTTP). Use internal for local deployments.
NOTION_CLIENT_SECRET
(empty)
OAuth client secret. Required for public integration.
NOTION_CLIENT_ID
(empty)
OAuth client ID. Required for public integration.
NOTION_INTERNAL_SECRET
(empty)
Direct integration token from Notion. Required for internal integration.
Dify sends emails for account invitations, password resets, login codes, and Human Input node notifications. Configure one of the three supported providers. Email links require CONSOLE_WEB_URL to be set—see Common Variables.
Variable
Default
Description
MAIL_TYPE
resend
Mail provider: resend, smtp, or sendgrid.
MAIL_DEFAULT_SEND_FROM
(empty)
Default “From” address for all outgoing emails. Required.
Resend
Variable
Default
Description
RESEND_API_URL
https://api.resend.com
Resend API endpoint. Override for self-hosted Resend or proxy.
RESEND_API_KEY
(empty)
Resend API key. Required when MAIL_TYPE=resend.
SMTP
Three TLS modes: implicit TLS (SMTP_USE_TLS=true, SMTP_OPPORTUNISTIC_TLS=false, port 465), STARTTLS (SMTP_USE_TLS=true, SMTP_OPPORTUNISTIC_TLS=true, port 587), or plain (SMTP_USE_TLS=false, port 25).
Variable
Default
Description
SMTP_SERVER
(empty)
SMTP server address.
SMTP_PORT
465
SMTP server port. Use 587 for STARTTLS mode.
SMTP_USERNAME
(empty)
SMTP username. Can be empty for IP-whitelisted servers.
SMTP_PASSWORD
(empty)
SMTP password. Can be empty for IP-whitelisted servers.
SMTP_USE_TLS
true
Enable TLS. When true with SMTP_OPPORTUNISTIC_TLS=false, uses implicit TLS (SMTP_SSL).
SMTP_OPPORTUNISTIC_TLS
false
Use STARTTLS (explicit TLS) instead of implicit TLS. Must be used with SMTP_USE_TLS=true.
SMTP_LOCAL_HOSTNAME
(empty)
Override the hostname sent in SMTP HELO/EHLO. Required in Docker when your SMTP server rejects container hostnames (common with Google Workspace, Microsoft 365). Set to your domain, e.g., mail.yourdomain.com.
SendGrid
Variable
Default
Description
SENDGRID_API_KEY
(empty)
SendGrid API key. Required when MAIL_TYPE=sendgrid.
Maximum token length per text segment when chunking documents for the knowledge base. Larger values retain more context per chunk; smaller values provide finer granularity.
These settings tell the API and Worker how to connect to the sandbox, a separate service that executes Code node (Python, JavaScript) and Template Transform (Jinja2) code in isolation.
Variable
Default
Description
CODE_EXECUTION_ENDPOINT
http://sandbox:8194
Sandbox service endpoint.
CODE_EXECUTION_API_KEY
dify-sandbox
API key for sandbox authentication. Must match SANDBOX_API_KEY in the sandbox service.
CODE_EXECUTION_SSL_VERIFY
true
Verify SSL for sandbox connections. Disable for development with self-signed certificates.
CODE_EXECUTION_CONNECT_TIMEOUT
10
Connection timeout in seconds.
CODE_EXECUTION_READ_TIMEOUT
60
Read timeout in seconds.
CODE_EXECUTION_WRITE_TIMEOUT
10
Write timeout in seconds.
CODE_EXECUTION_POOL_MAX_CONNECTIONS
100
Maximum concurrent HTTP connections to the sandbox service.
CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS
20
Maximum idle connections kept alive in the sandbox connection pool.
CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY
5.0
Seconds before idle sandbox connections are closed.
The API and Worker apply these limits to the output returned by Code and Template Transform nodes; the sandbox service does not read them. Changes take effect after you restart the API and Worker, not the sandbox.
Variable
Default
Description
CODE_MAX_NUMBER
9223372036854775807
Maximum numeric value allowed in Code node output (max 64-bit signed integer).
CODE_MIN_NUMBER
-9223372036854775808
Minimum numeric value allowed in Code node output (min 64-bit signed integer).
CODE_MAX_STRING_LENGTH
400000
Maximum string length in Code node output. Prevents memory exhaustion from unbounded string generation.
CODE_MAX_DEPTH
5
Maximum nesting depth for output data structures.
CODE_MAX_PRECISION
20
Maximum decimal places for floating-point numbers in output.
CODE_MAX_STRING_ARRAY_LENGTH
30
Maximum number of elements in a string array output.
CODE_MAX_OBJECT_ARRAY_LENGTH
30
Maximum number of elements in an object array output.
CODE_MAX_NUMBER_ARRAY_LENGTH
1000
Maximum number of elements in a number array output.
TEMPLATE_TRANSFORM_MAX_LENGTH
400000
Maximum character length for Template Transform node output.
Maximum number of node executions per workflow run. Exceeding this terminates the workflow.
WORKFLOW_MAX_EXECUTION_TIME
1200
Maximum wall-clock time in seconds per workflow run. Exceeding this terminates the workflow.
WORKFLOW_CALL_MAX_DEPTH
5
Maximum depth for nested workflow-calls-workflow. Prevents infinite recursion.
MAX_VARIABLE_SIZE
204800
Maximum size in bytes (200 KB) for a single workflow variable.
WORKFLOW_FILE_UPLOAD_LIMIT
10
Maximum number of files that can be uploaded in a single workflow execution.
WORKFLOW_NODE_EXECUTION_STORAGE
rdbms
Where workflow node execution records are stored. rdbms stores everything in the database. hybrid stores new data in object storage and reads from both.
DSL_EXPORT_ENCRYPT_DATASET_ID
true
Encrypt dataset IDs when exporting DSL files. Set to false to export plain IDs for easier cross-environment import.
These select which backend implementation handles workflow execution data. The default SQLAlchemy repositories store everything in the database. Alternative implementations (e.g., Celery, Logstore) can be used for different storage strategies.
All outbound HTTP requests from Dify (HTTP nodes, image downloads, etc.) are routed through a proxy that blocks requests to internal/private IP ranges, preventing Server-Side Request Forgery (SSRF) attacks.
Variable
Default
Description
SSRF_PROXY_HTTP_URL
http://ssrf_proxy:3128
SSRF proxy URL for HTTP requests.
SSRF_PROXY_HTTPS_URL
http://ssrf_proxy:3128
SSRF proxy URL for HTTPS requests.
SSRF_POOL_MAX_CONNECTIONS
100
Maximum concurrent connections in the SSRF HTTP client pool.
SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS
20
Maximum idle connections kept alive in the SSRF pool.
SSRF_POOL_KEEPALIVE_EXPIRY
5.0
Seconds before idle SSRF connections are closed.
RESPECT_XFORWARD_HEADERS_ENABLED
false
Trust X-Forwarded-For/Proto/Port headers from reverse proxies. Only enable behind a single trusted reverse proxy—otherwise allows IP spoofing.
These variables are used by the Next.js web frontend container only, and do not affect the Python backend.
Variable
Default
Description
TEXT_GENERATION_TIMEOUT_MS
60000
Frontend timeout for streaming text generation UI. If a stream stalls for longer than this, the UI pauses rendering.
ALLOW_INLINE_STYLES
false
Allow inline style attributes and <style> blocks in user-generated Markdown content. Disabled by default for security (inline styles can be used for phishing). Enable only if you need rich styling from trusted content sources.
ALLOW_UNSAFE_DATA_SCHEME
false
Allow rendering URLs with the data: scheme. Disabled by default for security.
MAX_TREE_DEPTH
50
Maximum number of nodes along a single execution path. Longer paths cannot be published. Changes apply only to newly published workflows.
Enable HTTPS. When true, place your SSL certificate and key in ./nginx/ssl/.
NGINX_PORT
80
HTTP port.
NGINX_SSL_PORT
443
HTTPS port (only used when NGINX_HTTPS_ENABLED=true).
NGINX_SSL_CERT_FILENAME
dify.crt
SSL certificate filename in ./nginx/ssl/.
NGINX_SSL_CERT_KEY_FILENAME
dify.key
SSL private key filename in ./nginx/ssl/.
NGINX_SSL_PROTOCOLS
TLSv1.2 TLSv1.3
Allowed TLS protocol versions.
NGINX_WORKER_PROCESSES
auto
Number of Nginx worker processes. auto matches CPU core count.
NGINX_CLIENT_MAX_BODY_SIZE
100M
Maximum request body size. Affects file upload limits at the proxy level.
NGINX_KEEPALIVE_TIMEOUT
65
Keepalive timeout in seconds.
NGINX_PROXY_READ_TIMEOUT
3600s
Proxy read timeout. Set high (1 hour) to support long-running SSE streams.
NGINX_PROXY_SEND_TIMEOUT
3600s
Proxy send timeout.
NGINX_ENABLE_CERTBOT_CHALLENGE
false
Accept Let’s Encrypt ACME challenge requests at /.well-known/acme-challenge/. Enable for automated certificate renewal.
NGINX_SOCKET_IO_UPSTREAM
api_websocket:5001
Upstream that Nginx forwards /socket.io/ traffic to. Defaults to the dedicated api_websocket container started by the collaboration profile. Change only if you run the WebSocket service outside Docker Compose.
After enabling HTTPS, also update the URL variables in Common Variables (e.g., CONSOLE_API_URL, CONSOLE_WEB_URL) to use https://.
These configure the Squid-based SSRF proxy container that blocks requests to internal/private networks.
Variable
Default
Description
SSRF_HTTP_PORT
3128
Proxy listening port.
SSRF_COREDUMP_DIR
/var/spool/squid
Core dump directory.
SSRF_SANDBOX_PROXY_PORT
8194
Port the SSRF proxy listens on to reverse-proxy egress to the sandbox service.
SSRF_SANDBOX_PROXY_HOST
sandbox
Hostname of the sandbox service the SSRF proxy forwards to.
SSRF_PROXY_ALLOW_PRIVATE_IPS
(empty)
Comma- or space-separated private IPs or CIDR ranges to allow through the proxy, overriding the default block on private networks. Use when HTTP or tool requests must reach specific internal hosts.
SSRF_PROXY_ALLOW_PRIVATE_DOMAINS
(empty)
Comma- or space-separated internal domains to allow through the proxy, overriding the default block on private networks.
SSRF_DEFAULT_TIME_OUT
5
Default overall timeout in seconds for proxied requests.
Selects which service containers to start. The default includes the matching vector store and database (so DB_TYPE=mysql starts MySQL instead of PostgreSQL), plus the collaboration profile that starts the dedicated api_websocket container. Remove collaboration to skip the separate WebSocket service.
Customize which tools and model providers are available in the app interface and their display order. Use comma-separated values with no spaces between items.
Variable
Default
Description
POSITION_TOOL_PINS
(empty)
Pin specific tools to the top of the list. Example: bing,google.
POSITION_TOOL_INCLUDES
(empty)
Only show listed tools. If unset, all tools are available.
POSITION_TOOL_EXCLUDES
(empty)
Hide specific tools (pinned tools are not affected).
POSITION_PROVIDER_PINS
(empty)
Pin specific model providers to the top. Example: openai,anthropic.
POSITION_PROVIDER_INCLUDES
(empty)
Only show listed providers. If unset, all providers are available.
POSITION_PROVIDER_EXCLUDES
(empty)
Hide specific providers (pinned providers are not affected).
The plugin daemon is a separate service that manages plugin lifecycle (installation, execution, upgrades). The API communicates with it via HTTP.
Variable
Default
Description
PLUGIN_DAEMON_URL
http://plugin_daemon:5002
Plugin daemon service URL.
PLUGIN_DAEMON_KEY
(auto-generated)
Authentication key for the plugin daemon.
PLUGIN_DAEMON_PORT
5002
Plugin daemon listening port.
PLUGIN_DAEMON_TIMEOUT
600.0
Timeout in seconds for all plugin daemon requests (installation, execution, listing).
PLUGIN_MAX_PACKAGE_SIZE
52428800
Maximum plugin package size in bytes (50 MB). Validated during marketplace downloads.
PLUGIN_MODEL_SCHEMA_CACHE_TTL
3600
How long to cache plugin model schemas in seconds. Reduces repeated lookups.
PLUGIN_MODEL_PROVIDERS_CACHE_TTL
86400
How long to cache each tenant’s plugin model provider list in Redis, in seconds (24 hours). Dify invalidates this cache when a tenant installs, uninstalls, or upgrades a plugin.
PLUGIN_DIFY_INNER_API_KEY
(auto-generated)
API key the plugin daemon uses to call back to the Dify API. Must match DIFY_INNER_API_KEY in the plugin daemon service config.
PLUGIN_DIFY_INNER_API_URL
http://api:5001
Internal API URL the plugin daemon calls back to.
PLUGIN_DEBUGGING_HOST
0.0.0.0
Host for plugin remote debugging connections.
PLUGIN_DEBUGGING_PORT
5003
Port for plugin remote debugging connections.
MARKETPLACE_ENABLED
true
Enable the plugin marketplace. When disabled, only locally installed plugins are available—browsing and auto-upgrades are unavailable.
MARKETPLACE_API_URL
https://marketplace.dify.ai
Marketplace API endpoint for plugin browsing, downloading, and upgrade checking.
FORCE_VERIFYING_SIGNATURE
true
Require valid signatures before installing plugins. Prevents installing tampered or unsigned packages.
PLUGIN_MAX_EXECUTION_TIMEOUT
600
Plugin execution timeout in seconds (plugin daemon side). Should match PLUGIN_DAEMON_TIMEOUT on the API side.
PIP_MIRROR_URL
(empty)
Custom PyPI mirror URL used by the plugin daemon when installing plugin dependencies. Useful for faster installs or air-gapped environments.
Creator Center (creators.dify.ai) is the submission portal where users upload Dify apps as templates. Submitted templates are reviewed and, once approved, listed on Dify Marketplace. The console’s Publish to Marketplace action exports the app’s DSL and uploads it to Creator Center on the user’s behalf. See Publish Apps to Marketplace for the user-facing flow.
Variable
Default
Description
CREATORS_PLATFORM_FEATURES_ENABLED
true
Controls whether the Publish to Marketplace action appears in the app builder. Set to false to hide the action; the underlying console API also returns 403. Useful on deployments where users shouldn’t have a one-click path to submit templates externally.
CREATORS_PLATFORM_API_URL
https://creators.dify.ai
Endpoint that receives DSL uploads from the Publish to Marketplace action. Change only if running a self-hosted Creator Center instance.
CREATORS_PLATFORM_OAUTH_CLIENT_ID
(empty)
OAuth client ID issued by Creator Center. When set, the post-upload redirect carries an OAuth authorization code so Creator Center can attribute the submission to the publishing user. Empty means anonymous upload.
OpenTelemetry provides distributed tracing and metrics collection. When enabled, Dify instruments Flask and exports telemetry data to an OTLP collector.
Variable
Default
Description
ENABLE_OTEL
false
Master switch for OpenTelemetry instrumentation.
OTLP_TRACE_ENDPOINT
(empty)
Dedicated trace endpoint URL. If unset, falls back to {OTLP_BASE_ENDPOINT}/v1/traces.
OTLP_METRIC_ENDPOINT
(empty)
Dedicated metric endpoint URL. If unset, falls back to {OTLP_BASE_ENDPOINT}/v1/metrics.
OTLP_BASE_ENDPOINT
http://localhost:4318
Base OTLP collector URL. Used as fallback when specific trace/metric endpoints are not set.
OTLP_API_KEY
(empty)
API key for OTLP authentication. Sent as Authorization: Bearer header.
OTEL_EXPORTER_TYPE
otlp
Exporter type. otlp exports to a collector; other values use a console exporter (for debugging).
These control how old records are cleaned up. When BILLING_ENABLED is active, cleanup targets sandbox-tier tenants with a grace period. When billing is disabled (self-hosted), cleanup applies to all records within the retention window.
Variable
Default
Description
SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS
30
Records older than this many days are eligible for deletion.
SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD
21
Grace period in days after subscription expiration before records are deleted (billing-enabled only).
SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE
1000
Number of records processed per cleanup batch.
SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL
200
Maximum random delay in milliseconds between cleanup batches to reduce database load.
SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL
90000
Redis lock TTL in seconds (~25 hours) to prevent concurrent cleanup task execution.
Optional integration with Aliyun Simple Log Service for storing workflow execution logs externally instead of in the database. Enable by setting the repository configuration variables to use logstore implementations.
Variable
Default
Description
ALIYUN_SLS_ACCESS_KEY_ID
(empty)
Aliyun access key ID for SLS authentication.
ALIYUN_SLS_ACCESS_KEY_SECRET
(empty)
Aliyun access key secret for SLS authentication.
ALIYUN_SLS_ENDPOINT
(empty)
SLS service endpoint URL (e.g., cn-hangzhou.log.aliyuncs.com).
ALIYUN_SLS_REGION
(empty)
Aliyun region (e.g., cn-hangzhou).
ALIYUN_SLS_PROJECT_NAME
(empty)
SLS project name for storing workflow logs.
ALIYUN_SLS_LOGSTORE_TTL
365
Data retention in days for SLS logstores. Use 3650 for permanent storage.
LOGSTORE_DUAL_WRITE_ENABLED
false
Write workflow data to both SLS and PostgreSQL simultaneously. Useful during migration to SLS.
LOGSTORE_DUAL_READ_ENABLED
true
Fall back to PostgreSQL when SLS returns no results. Useful during migration when historical data exists only in the database.
LOGSTORE_ENABLE_PUT_GRAPH_FIELD
true
Include the full workflow graph definition in SLS logs. Set to false to reduce storage by omitting large graph data.
These configure the vector database containers themselves (not the Dify client connection). Only the variables for your chosen VECTOR_STORE are relevant.
Weaviate Service
Variable
Default
Description
WEAVIATE_PERSISTENCE_DATA_PATH
/var/lib/weaviate
Data persistence directory inside the container.
WEAVIATE_QUERY_DEFAULTS_LIMIT
25
Default query result limit.
WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED
true
Allow anonymous access.
WEAVIATE_DEFAULT_VECTORIZER_MODULE
none
Default vectorizer module.
WEAVIATE_CLUSTER_HOSTNAME
node1
Cluster node hostname.
WEAVIATE_AUTHENTICATION_APIKEY_ENABLED
true
Enable API key authentication.
WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS
(auto-generated)
Allowed API keys. Must match WEAVIATE_API_KEY in the client config.
WEAVIATE_AUTHENTICATION_APIKEY_USERS
hello@dify.ai
Users associated with API keys.
WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED
true
Enable admin list authorization.
WEAVIATE_AUTHORIZATION_ADMINLIST_USERS
hello@dify.ai
Admin users.
WEAVIATE_DISABLE_TELEMETRY
false
Disable Weaviate telemetry.
WEAVIATE_ENABLE_TOKENIZER_GSE
false
Enable GSE tokenizer (Chinese).
WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA
false
Enable Kagome tokenizer (Japanese).
WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR
false
Enable Kagome tokenizer (Korean).
Milvus Service (ETCD + MinIO)
Variable
Default
Description
ETCD_AUTO_COMPACTION_MODE
revision
ETCD auto compaction mode.
ETCD_AUTO_COMPACTION_RETENTION
1000
Auto compaction retention in number of revisions.
ETCD_QUOTA_BACKEND_BYTES
4294967296
Backend quota in bytes (4 GB).
ETCD_SNAPSHOT_COUNT
50000
Number of changes before triggering a snapshot.
ETCD_ENDPOINTS
etcd:2379
ETCD service endpoints.
MINIO_ACCESS_KEY
minioadmin
MinIO access key.
MINIO_SECRET_KEY
minioadmin
MinIO secret key.
MINIO_ADDRESS
minio:9000
MinIO service address.
MILVUS_AUTHORIZATION_ENABLED
true
Enable Milvus security authorization.
OpenSearch Service
Variable
Default
Description
OPENSEARCH_DISCOVERY_TYPE
single-node
Discovery type for cluster formation.
OPENSEARCH_BOOTSTRAP_MEMORY_LOCK
true
Lock memory on startup to prevent swapping.
OPENSEARCH_JAVA_OPTS_MIN
512m
Minimum JVM heap size.
OPENSEARCH_JAVA_OPTS_MAX
1024m
Maximum JVM heap size.
OPENSEARCH_INITIAL_ADMIN_PASSWORD
Qazwsxedc!@#123
Initial admin password for the OpenSearch service.
OPENSEARCH_MEMLOCK_SOFT
-1
Soft memory lock limit (-1 = unlimited).
OPENSEARCH_MEMLOCK_HARD
-1
Hard memory lock limit (-1 = unlimited).
OPENSEARCH_NOFILE_SOFT
65536
Soft file descriptor limit.
OPENSEARCH_NOFILE_HARD
65536
Hard file descriptor limit.
PGVector / PGVecto.RS Service
Variable
Default
Description
PGVECTOR_PGUSER
postgres
PostgreSQL user for the PGVector container.
PGVECTOR_POSTGRES_PASSWORD
(auto-generated)
PostgreSQL password for the PGVector container.
PGVECTOR_POSTGRES_DB
dify
Database name in the PGVector container.
PGVECTOR_PGDATA
/var/lib/postgresql/data/pgdata
Data directory inside the container.
PGVECTOR_PG_BIGM_VERSION
1.2-20240606
Version of the pg_bigm extension.
Oracle / Chroma / Elasticsearch Services
Variable
Default
Description
ORACLE_PWD
Dify123456
Oracle database password for the container.
ORACLE_CHARACTERSET
AL32UTF8
Oracle character set.
CHROMA_SERVER_AUTHN_CREDENTIALS
(auto-generated)
Authentication credentials for the Chroma server container.