Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. # Your App secret key will be used for securely signing the session cookie
  2. # Make sure you are changing this key for your deployment with a strong key.
  3. # You can generate a strong key using `openssl rand -base64 42`.
  4. # Alternatively you can set it with `SECRET_KEY` environment variable.
  5. SECRET_KEY=
  6. # Ensure UTF-8 encoding
  7. LANG=en_US.UTF-8
  8. LC_ALL=en_US.UTF-8
  9. PYTHONIOENCODING=utf-8
  10. # Console API base URL
  11. CONSOLE_API_URL=http://localhost:5001
  12. CONSOLE_WEB_URL=http://localhost:3000
  13. # Service API base URL
  14. SERVICE_API_URL=http://localhost:5001
  15. # Web APP base URL
  16. APP_WEB_URL=http://localhost:3000
  17. # Files URL
  18. FILES_URL=http://localhost:5001
  19. # INTERNAL_FILES_URL is used for plugin daemon communication within Docker network.
  20. # Set this to the internal Docker service URL for proper plugin file access.
  21. # Example: INTERNAL_FILES_URL=http://api:5001
  22. INTERNAL_FILES_URL=http://127.0.0.1:5001
  23. # The time in seconds after the signature is rejected
  24. FILES_ACCESS_TIMEOUT=300
  25. # Access token expiration time in minutes
  26. ACCESS_TOKEN_EXPIRE_MINUTES=60
  27. # Refresh token expiration time in days
  28. REFRESH_TOKEN_EXPIRE_DAYS=30
  29. # redis configuration
  30. REDIS_HOST=localhost
  31. REDIS_PORT=6379
  32. REDIS_USERNAME=
  33. REDIS_PASSWORD=difyai123456
  34. REDIS_USE_SSL=false
  35. # SSL configuration for Redis (when REDIS_USE_SSL=true)
  36. REDIS_SSL_CERT_REQS=CERT_NONE
  37. # Options: CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
  38. REDIS_SSL_CA_CERTS=
  39. # Path to CA certificate file for SSL verification
  40. REDIS_SSL_CERTFILE=
  41. # Path to client certificate file for SSL authentication
  42. REDIS_SSL_KEYFILE=
  43. # Path to client private key file for SSL authentication
  44. REDIS_DB=0
  45. # redis Sentinel configuration.
  46. REDIS_USE_SENTINEL=false
  47. REDIS_SENTINELS=
  48. REDIS_SENTINEL_SERVICE_NAME=
  49. REDIS_SENTINEL_USERNAME=
  50. REDIS_SENTINEL_PASSWORD=
  51. REDIS_SENTINEL_SOCKET_TIMEOUT=0.1
  52. # redis Cluster configuration.
  53. REDIS_USE_CLUSTERS=false
  54. REDIS_CLUSTERS=
  55. REDIS_CLUSTERS_PASSWORD=
  56. # celery configuration
  57. CELERY_BROKER_URL=redis://:difyai123456@localhost:${REDIS_PORT}/1
  58. CELERY_BACKEND=redis
  59. # PostgreSQL database configuration
  60. DB_USERNAME=postgres
  61. DB_PASSWORD=difyai123456
  62. DB_HOST=localhost
  63. DB_PORT=5432
  64. DB_DATABASE=dify
  65. SQLALCHEMY_POOL_PRE_PING=true
  66. SQLALCHEMY_POOL_TIMEOUT=30
  67. # Storage configuration
  68. # use for store upload files, private keys...
  69. # storage type: opendal, s3, aliyun-oss, azure-blob, baidu-obs, google-storage, huawei-obs, oci-storage, tencent-cos, volcengine-tos, supabase
  70. STORAGE_TYPE=opendal
  71. # Apache OpenDAL storage configuration, refer to https://github.com/apache/opendal
  72. OPENDAL_SCHEME=fs
  73. OPENDAL_FS_ROOT=storage
  74. # S3 Storage configuration
  75. S3_USE_AWS_MANAGED_IAM=false
  76. S3_ENDPOINT=https://your-bucket-name.storage.s3.cloudflare.com
  77. S3_BUCKET_NAME=your-bucket-name
  78. S3_ACCESS_KEY=your-access-key
  79. S3_SECRET_KEY=your-secret-key
  80. S3_REGION=your-region
  81. # Azure Blob Storage configuration
  82. AZURE_BLOB_ACCOUNT_NAME=your-account-name
  83. AZURE_BLOB_ACCOUNT_KEY=your-account-key
  84. AZURE_BLOB_CONTAINER_NAME=your-container-name
  85. AZURE_BLOB_ACCOUNT_URL=https://<your_account_name>.blob.core.windows.net
  86. # Aliyun oss Storage configuration
  87. ALIYUN_OSS_BUCKET_NAME=your-bucket-name
  88. ALIYUN_OSS_ACCESS_KEY=your-access-key
  89. ALIYUN_OSS_SECRET_KEY=your-secret-key
  90. ALIYUN_OSS_ENDPOINT=your-endpoint
  91. ALIYUN_OSS_AUTH_VERSION=v1
  92. ALIYUN_OSS_REGION=your-region
  93. # Don't start with '/'. OSS doesn't support leading slash in object names.
  94. ALIYUN_OSS_PATH=your-path
  95. # Google Storage configuration
  96. GOOGLE_STORAGE_BUCKET_NAME=your-bucket-name
  97. GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64=your-google-service-account-json-base64-string
  98. # Tencent COS Storage configuration
  99. TENCENT_COS_BUCKET_NAME=your-bucket-name
  100. TENCENT_COS_SECRET_KEY=your-secret-key
  101. TENCENT_COS_SECRET_ID=your-secret-id
  102. TENCENT_COS_REGION=your-region
  103. TENCENT_COS_SCHEME=your-scheme
  104. # Huawei OBS Storage Configuration
  105. HUAWEI_OBS_BUCKET_NAME=your-bucket-name
  106. HUAWEI_OBS_SECRET_KEY=your-secret-key
  107. HUAWEI_OBS_ACCESS_KEY=your-access-key
  108. HUAWEI_OBS_SERVER=your-server-url
  109. # Baidu OBS Storage Configuration
  110. BAIDU_OBS_BUCKET_NAME=your-bucket-name
  111. BAIDU_OBS_SECRET_KEY=your-secret-key
  112. BAIDU_OBS_ACCESS_KEY=your-access-key
  113. BAIDU_OBS_ENDPOINT=your-server-url
  114. # OCI Storage configuration
  115. OCI_ENDPOINT=your-endpoint
  116. OCI_BUCKET_NAME=your-bucket-name
  117. OCI_ACCESS_KEY=your-access-key
  118. OCI_SECRET_KEY=your-secret-key
  119. OCI_REGION=your-region
  120. # Volcengine tos Storage configuration
  121. VOLCENGINE_TOS_ENDPOINT=your-endpoint
  122. VOLCENGINE_TOS_BUCKET_NAME=your-bucket-name
  123. VOLCENGINE_TOS_ACCESS_KEY=your-access-key
  124. VOLCENGINE_TOS_SECRET_KEY=your-secret-key
  125. VOLCENGINE_TOS_REGION=your-region
  126. # Supabase Storage Configuration
  127. SUPABASE_BUCKET_NAME=your-bucket-name
  128. SUPABASE_API_KEY=your-access-key
  129. SUPABASE_URL=your-server-url
  130. # CORS configuration
  131. WEB_API_CORS_ALLOW_ORIGINS=http://localhost:3000,*
  132. CONSOLE_CORS_ALLOW_ORIGINS=http://localhost:3000,*
  133. # Vector database configuration
  134. # Supported values are `weaviate`, `qdrant`, `milvus`, `myscale`, `relyt`, `pgvector`, `pgvecto-rs`, `chroma`, `opensearch`, `oracle`, `tencent`, `elasticsearch`, `elasticsearch-ja`, `analyticdb`, `couchbase`, `vikingdb`, `oceanbase`, `opengauss`, `tablestore`,`vastbase`,`tidb`,`tidb_on_qdrant`,`baidu`,`lindorm`,`huawei_cloud`,`upstash`, `matrixone`.
  135. VECTOR_STORE=weaviate
  136. # Prefix used to create collection name in vector database
  137. VECTOR_INDEX_NAME_PREFIX=Vector_index
  138. # Weaviate configuration
  139. WEAVIATE_ENDPOINT=http://localhost:8080
  140. WEAVIATE_API_KEY=WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
  141. WEAVIATE_GRPC_ENABLED=false
  142. WEAVIATE_BATCH_SIZE=100
  143. # Qdrant configuration, use `http://localhost:6333` for local mode or `https://your-qdrant-cluster-url.qdrant.io` for remote mode
  144. QDRANT_URL=http://localhost:6333
  145. QDRANT_API_KEY=difyai123456
  146. QDRANT_CLIENT_TIMEOUT=20
  147. QDRANT_GRPC_ENABLED=false
  148. QDRANT_GRPC_PORT=6334
  149. QDRANT_REPLICATION_FACTOR=1
  150. #Couchbase configuration
  151. COUCHBASE_CONNECTION_STRING=127.0.0.1
  152. COUCHBASE_USER=Administrator
  153. COUCHBASE_PASSWORD=password
  154. COUCHBASE_BUCKET_NAME=Embeddings
  155. COUCHBASE_SCOPE_NAME=_default
  156. # Milvus configuration
  157. MILVUS_URI=http://127.0.0.1:19530
  158. MILVUS_TOKEN=
  159. MILVUS_USER=root
  160. MILVUS_PASSWORD=Milvus
  161. MILVUS_ANALYZER_PARAMS=
  162. # MyScale configuration
  163. MYSCALE_HOST=127.0.0.1
  164. MYSCALE_PORT=8123
  165. MYSCALE_USER=default
  166. MYSCALE_PASSWORD=
  167. MYSCALE_DATABASE=default
  168. MYSCALE_FTS_PARAMS=
  169. # Relyt configuration
  170. RELYT_HOST=127.0.0.1
  171. RELYT_PORT=5432
  172. RELYT_USER=postgres
  173. RELYT_PASSWORD=postgres
  174. RELYT_DATABASE=postgres
  175. # Tencent configuration
  176. TENCENT_VECTOR_DB_URL=http://127.0.0.1
  177. TENCENT_VECTOR_DB_API_KEY=dify
  178. TENCENT_VECTOR_DB_TIMEOUT=30
  179. TENCENT_VECTOR_DB_USERNAME=dify
  180. TENCENT_VECTOR_DB_DATABASE=dify
  181. TENCENT_VECTOR_DB_SHARD=1
  182. TENCENT_VECTOR_DB_REPLICAS=2
  183. TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH=false
  184. # ElasticSearch configuration
  185. ELASTICSEARCH_HOST=127.0.0.1
  186. ELASTICSEARCH_PORT=9200
  187. ELASTICSEARCH_USERNAME=elastic
  188. ELASTICSEARCH_PASSWORD=elastic
  189. # PGVECTO_RS configuration
  190. PGVECTO_RS_HOST=localhost
  191. PGVECTO_RS_PORT=5431
  192. PGVECTO_RS_USER=postgres
  193. PGVECTO_RS_PASSWORD=difyai123456
  194. PGVECTO_RS_DATABASE=postgres
  195. # PGVector configuration
  196. PGVECTOR_HOST=127.0.0.1
  197. PGVECTOR_PORT=5433
  198. PGVECTOR_USER=postgres
  199. PGVECTOR_PASSWORD=postgres
  200. PGVECTOR_DATABASE=postgres
  201. PGVECTOR_MIN_CONNECTION=1
  202. PGVECTOR_MAX_CONNECTION=5
  203. # TableStore Vector configuration
  204. TABLESTORE_ENDPOINT=https://instance-name.cn-hangzhou.ots.aliyuncs.com
  205. TABLESTORE_INSTANCE_NAME=instance-name
  206. TABLESTORE_ACCESS_KEY_ID=xxx
  207. TABLESTORE_ACCESS_KEY_SECRET=xxx
  208. TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE=false
  209. # Tidb Vector configuration
  210. TIDB_VECTOR_HOST=xxx.eu-central-1.xxx.aws.tidbcloud.com
  211. TIDB_VECTOR_PORT=4000
  212. TIDB_VECTOR_USER=xxx.root
  213. TIDB_VECTOR_PASSWORD=xxxxxx
  214. TIDB_VECTOR_DATABASE=dify
  215. # Tidb on qdrant configuration
  216. TIDB_ON_QDRANT_URL=http://127.0.0.1
  217. TIDB_ON_QDRANT_API_KEY=dify
  218. TIDB_ON_QDRANT_CLIENT_TIMEOUT=20
  219. TIDB_ON_QDRANT_GRPC_ENABLED=false
  220. TIDB_ON_QDRANT_GRPC_PORT=6334
  221. TIDB_PUBLIC_KEY=dify
  222. TIDB_PRIVATE_KEY=dify
  223. TIDB_API_URL=http://127.0.0.1
  224. TIDB_IAM_API_URL=http://127.0.0.1
  225. TIDB_REGION=regions/aws-us-east-1
  226. TIDB_PROJECT_ID=dify
  227. TIDB_SPEND_LIMIT=100
  228. # Chroma configuration
  229. CHROMA_HOST=127.0.0.1
  230. CHROMA_PORT=8000
  231. CHROMA_TENANT=default_tenant
  232. CHROMA_DATABASE=default_database
  233. CHROMA_AUTH_PROVIDER=chromadb.auth.token_authn.TokenAuthenticationServerProvider
  234. CHROMA_AUTH_CREDENTIALS=difyai123456
  235. # AnalyticDB configuration
  236. ANALYTICDB_KEY_ID=your-ak
  237. ANALYTICDB_KEY_SECRET=your-sk
  238. ANALYTICDB_REGION_ID=cn-hangzhou
  239. ANALYTICDB_INSTANCE_ID=gp-ab123456
  240. ANALYTICDB_ACCOUNT=testaccount
  241. ANALYTICDB_PASSWORD=testpassword
  242. ANALYTICDB_NAMESPACE=dify
  243. ANALYTICDB_NAMESPACE_PASSWORD=difypassword
  244. ANALYTICDB_HOST=gp-test.aliyuncs.com
  245. ANALYTICDB_PORT=5432
  246. ANALYTICDB_MIN_CONNECTION=1
  247. ANALYTICDB_MAX_CONNECTION=5
  248. # OpenSearch configuration
  249. OPENSEARCH_HOST=127.0.0.1
  250. OPENSEARCH_PORT=9200
  251. OPENSEARCH_USER=admin
  252. OPENSEARCH_PASSWORD=admin
  253. OPENSEARCH_SECURE=true
  254. OPENSEARCH_VERIFY_CERTS=true
  255. # Baidu configuration
  256. BAIDU_VECTOR_DB_ENDPOINT=http://127.0.0.1:5287
  257. BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS=30000
  258. BAIDU_VECTOR_DB_ACCOUNT=root
  259. BAIDU_VECTOR_DB_API_KEY=dify
  260. BAIDU_VECTOR_DB_DATABASE=dify
  261. BAIDU_VECTOR_DB_SHARD=1
  262. BAIDU_VECTOR_DB_REPLICAS=3
  263. BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER=DEFAULT_ANALYZER
  264. BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE=COARSE_MODE
  265. # Upstash configuration
  266. UPSTASH_VECTOR_URL=your-server-url
  267. UPSTASH_VECTOR_TOKEN=your-access-token
  268. # ViKingDB configuration
  269. VIKINGDB_ACCESS_KEY=your-ak
  270. VIKINGDB_SECRET_KEY=your-sk
  271. VIKINGDB_REGION=cn-shanghai
  272. VIKINGDB_HOST=api-vikingdb.xxx.volces.com
  273. VIKINGDB_SCHEMA=http
  274. VIKINGDB_CONNECTION_TIMEOUT=30
  275. VIKINGDB_SOCKET_TIMEOUT=30
  276. # Matrixone configration
  277. MATRIXONE_HOST=127.0.0.1
  278. MATRIXONE_PORT=6001
  279. MATRIXONE_USER=dump
  280. MATRIXONE_PASSWORD=111
  281. MATRIXONE_DATABASE=dify
  282. # Lindorm configuration
  283. LINDORM_URL=http://ld-*******************-proxy-search-pub.lindorm.aliyuncs.com:30070
  284. LINDORM_USERNAME=admin
  285. LINDORM_PASSWORD=admin
  286. LINDORM_USING_UGC=True
  287. LINDORM_QUERY_TIMEOUT=1
  288. # OceanBase Vector configuration
  289. OCEANBASE_VECTOR_HOST=127.0.0.1
  290. OCEANBASE_VECTOR_PORT=2881
  291. OCEANBASE_VECTOR_USER=root@test
  292. OCEANBASE_VECTOR_PASSWORD=difyai123456
  293. OCEANBASE_VECTOR_DATABASE=test
  294. OCEANBASE_MEMORY_LIMIT=6G
  295. OCEANBASE_ENABLE_HYBRID_SEARCH=false
  296. # openGauss configuration
  297. OPENGAUSS_HOST=127.0.0.1
  298. OPENGAUSS_PORT=6600
  299. OPENGAUSS_USER=postgres
  300. OPENGAUSS_PASSWORD=Dify@123
  301. OPENGAUSS_DATABASE=dify
  302. OPENGAUSS_MIN_CONNECTION=1
  303. OPENGAUSS_MAX_CONNECTION=5
  304. # Upload configuration
  305. UPLOAD_FILE_SIZE_LIMIT=15
  306. UPLOAD_FILE_BATCH_LIMIT=5
  307. UPLOAD_IMAGE_FILE_SIZE_LIMIT=10
  308. UPLOAD_VIDEO_FILE_SIZE_LIMIT=100
  309. UPLOAD_AUDIO_FILE_SIZE_LIMIT=50
  310. # Model configuration
  311. MULTIMODAL_SEND_FORMAT=base64
  312. PROMPT_GENERATION_MAX_TOKENS=512
  313. CODE_GENERATION_MAX_TOKENS=1024
  314. PLUGIN_BASED_TOKEN_COUNTING_ENABLED=false
  315. # Mail configuration, support: resend, smtp, sendgrid
  316. MAIL_TYPE=
  317. # If using SendGrid, use the 'from' field for authentication if necessary.
  318. MAIL_DEFAULT_SEND_FROM=no-reply <no-reply@dify.ai>
  319. # resend configuration
  320. RESEND_API_KEY=
  321. RESEND_API_URL=https://api.resend.com
  322. # smtp configuration
  323. SMTP_SERVER=smtp.gmail.com
  324. SMTP_PORT=465
  325. SMTP_USERNAME=123
  326. SMTP_PASSWORD=abc
  327. SMTP_USE_TLS=true
  328. SMTP_OPPORTUNISTIC_TLS=false
  329. # Sendgid configuration
  330. SENDGRID_API_KEY=
  331. # Sentry configuration
  332. SENTRY_DSN=
  333. # DEBUG
  334. DEBUG=false
  335. ENABLE_REQUEST_LOGGING=False
  336. SQLALCHEMY_ECHO=false
  337. # Notion import configuration, support public and internal
  338. NOTION_INTEGRATION_TYPE=public
  339. NOTION_CLIENT_SECRET=you-client-secret
  340. NOTION_CLIENT_ID=you-client-id
  341. NOTION_INTERNAL_SECRET=you-internal-secret
  342. ETL_TYPE=dify
  343. UNSTRUCTURED_API_URL=
  344. UNSTRUCTURED_API_KEY=
  345. SCARF_NO_ANALYTICS=true
  346. #ssrf
  347. SSRF_PROXY_HTTP_URL=
  348. SSRF_PROXY_HTTPS_URL=
  349. SSRF_DEFAULT_MAX_RETRIES=3
  350. SSRF_DEFAULT_TIME_OUT=5
  351. SSRF_DEFAULT_CONNECT_TIME_OUT=5
  352. SSRF_DEFAULT_READ_TIME_OUT=5
  353. SSRF_DEFAULT_WRITE_TIME_OUT=5
  354. SSRF_POOL_MAX_CONNECTIONS=100
  355. SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS=20
  356. SSRF_POOL_KEEPALIVE_EXPIRY=5.0
  357. BATCH_UPLOAD_LIMIT=10
  358. KEYWORD_DATA_SOURCE_TYPE=database
  359. # Workflow file upload limit
  360. WORKFLOW_FILE_UPLOAD_LIMIT=10
  361. # CODE EXECUTION CONFIGURATION
  362. CODE_EXECUTION_ENDPOINT=http://127.0.0.1:8194
  363. CODE_EXECUTION_API_KEY=dify-sandbox
  364. CODE_EXECUTION_SSL_VERIFY=True
  365. CODE_EXECUTION_POOL_MAX_CONNECTIONS=100
  366. CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS=20
  367. CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY=5.0
  368. CODE_MAX_NUMBER=9223372036854775807
  369. CODE_MIN_NUMBER=-9223372036854775808
  370. CODE_MAX_STRING_LENGTH=80000
  371. TEMPLATE_TRANSFORM_MAX_LENGTH=80000
  372. CODE_MAX_STRING_ARRAY_LENGTH=30
  373. CODE_MAX_OBJECT_ARRAY_LENGTH=30
  374. CODE_MAX_NUMBER_ARRAY_LENGTH=1000
  375. # API Tool configuration
  376. API_TOOL_DEFAULT_CONNECT_TIMEOUT=10
  377. API_TOOL_DEFAULT_READ_TIMEOUT=60
  378. # HTTP Node configuration
  379. HTTP_REQUEST_MAX_CONNECT_TIMEOUT=300
  380. HTTP_REQUEST_MAX_READ_TIMEOUT=600
  381. HTTP_REQUEST_MAX_WRITE_TIMEOUT=600
  382. HTTP_REQUEST_NODE_MAX_BINARY_SIZE=10485760
  383. HTTP_REQUEST_NODE_MAX_TEXT_SIZE=1048576
  384. HTTP_REQUEST_NODE_SSL_VERIFY=True
  385. # Respect X-* headers to redirect clients
  386. RESPECT_XFORWARD_HEADERS_ENABLED=false
  387. # Log file path
  388. LOG_FILE=
  389. # Log file max size, the unit is MB
  390. LOG_FILE_MAX_SIZE=20
  391. # Log file max backup count
  392. LOG_FILE_BACKUP_COUNT=5
  393. # Log dateformat
  394. LOG_DATEFORMAT=%Y-%m-%d %H:%M:%S
  395. # Log Timezone
  396. LOG_TZ=UTC
  397. # Log format
  398. LOG_FORMAT=%(asctime)s,%(msecs)d %(levelname)-2s [%(filename)s:%(lineno)d] %(req_id)s %(message)s
  399. # Indexing configuration
  400. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=4000
  401. # Workflow runtime configuration
  402. WORKFLOW_MAX_EXECUTION_STEPS=500
  403. WORKFLOW_MAX_EXECUTION_TIME=1200
  404. WORKFLOW_CALL_MAX_DEPTH=5
  405. MAX_VARIABLE_SIZE=204800
  406. # GraphEngine Worker Pool Configuration
  407. # Minimum number of workers per GraphEngine instance (default: 1)
  408. GRAPH_ENGINE_MIN_WORKERS=1
  409. # Maximum number of workers per GraphEngine instance (default: 10)
  410. GRAPH_ENGINE_MAX_WORKERS=10
  411. # Queue depth threshold that triggers worker scale up (default: 3)
  412. GRAPH_ENGINE_SCALE_UP_THRESHOLD=3
  413. # Seconds of idle time before scaling down workers (default: 5.0)
  414. GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME=5.0
  415. # Workflow storage configuration
  416. # Options: rdbms, hybrid
  417. # rdbms: Use only the relational database (default)
  418. # hybrid: Save new data to object storage, read from both object storage and RDBMS
  419. WORKFLOW_NODE_EXECUTION_STORAGE=rdbms
  420. # Repository configuration
  421. # Core workflow execution repository implementation
  422. CORE_WORKFLOW_EXECUTION_REPOSITORY=core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository
  423. # Core workflow node execution repository implementation
  424. CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY=core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository
  425. # API workflow node execution repository implementation
  426. API_WORKFLOW_NODE_EXECUTION_REPOSITORY=repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository
  427. # API workflow run repository implementation
  428. API_WORKFLOW_RUN_REPOSITORY=repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository
  429. # Workflow log cleanup configuration
  430. # Enable automatic cleanup of workflow run logs to manage database size
  431. WORKFLOW_LOG_CLEANUP_ENABLED=true
  432. # Number of days to retain workflow run logs (default: 30 days)
  433. WORKFLOW_LOG_RETENTION_DAYS=30
  434. # Batch size for workflow log cleanup operations (default: 100)
  435. WORKFLOW_LOG_CLEANUP_BATCH_SIZE=100
  436. # App configuration
  437. APP_MAX_EXECUTION_TIME=1200
  438. APP_MAX_ACTIVE_REQUESTS=0
  439. # Celery beat configuration
  440. CELERY_BEAT_SCHEDULER_TIME=1
  441. # Celery schedule tasks configuration
  442. ENABLE_CLEAN_EMBEDDING_CACHE_TASK=false
  443. ENABLE_CLEAN_UNUSED_DATASETS_TASK=false
  444. ENABLE_CREATE_TIDB_SERVERLESS_TASK=false
  445. ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK=false
  446. ENABLE_CLEAN_MESSAGES=false
  447. ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK=false
  448. ENABLE_DATASETS_QUEUE_MONITOR=false
  449. ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK=true
  450. # Position configuration
  451. POSITION_TOOL_PINS=
  452. POSITION_TOOL_INCLUDES=
  453. POSITION_TOOL_EXCLUDES=
  454. POSITION_PROVIDER_PINS=
  455. POSITION_PROVIDER_INCLUDES=
  456. POSITION_PROVIDER_EXCLUDES=
  457. # Plugin configuration
  458. PLUGIN_DAEMON_KEY=lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi
  459. PLUGIN_DAEMON_URL=http://127.0.0.1:5002
  460. PLUGIN_REMOTE_INSTALL_PORT=5003
  461. PLUGIN_REMOTE_INSTALL_HOST=localhost
  462. PLUGIN_MAX_PACKAGE_SIZE=15728640
  463. INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1
  464. # Marketplace configuration
  465. MARKETPLACE_ENABLED=true
  466. MARKETPLACE_API_URL=https://marketplace.dify.ai
  467. # Endpoint configuration
  468. ENDPOINT_URL_TEMPLATE=http://localhost:5002/e/{hook_id}
  469. # Reset password token expiry minutes
  470. RESET_PASSWORD_TOKEN_EXPIRY_MINUTES=5
  471. EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES=5
  472. CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES=5
  473. OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES=5
  474. CREATE_TIDB_SERVICE_JOB_ENABLED=false
  475. # Maximum number of submitted thread count in a ThreadPool for parallel node execution
  476. MAX_SUBMIT_COUNT=100
  477. # Lockout duration in seconds
  478. LOGIN_LOCKOUT_DURATION=86400
  479. # Enable OpenTelemetry
  480. ENABLE_OTEL=false
  481. OTLP_TRACE_ENDPOINT=
  482. OTLP_METRIC_ENDPOINT=
  483. OTLP_BASE_ENDPOINT=http://localhost:4318
  484. OTLP_API_KEY=
  485. OTEL_EXPORTER_OTLP_PROTOCOL=
  486. OTEL_EXPORTER_TYPE=otlp
  487. OTEL_SAMPLING_RATE=0.1
  488. OTEL_BATCH_EXPORT_SCHEDULE_DELAY=5000
  489. OTEL_MAX_QUEUE_SIZE=2048
  490. OTEL_MAX_EXPORT_BATCH_SIZE=512
  491. OTEL_METRIC_EXPORT_INTERVAL=60000
  492. OTEL_BATCH_EXPORT_TIMEOUT=10000
  493. OTEL_METRIC_EXPORT_TIMEOUT=30000
  494. # Prevent Clickjacking
  495. ALLOW_EMBED=false
  496. # Dataset queue monitor configuration
  497. QUEUE_MONITOR_THRESHOLD=200
  498. # You can configure multiple ones, separated by commas. eg: test1@dify.ai,test2@dify.ai
  499. QUEUE_MONITOR_ALERT_EMAILS=
  500. # Monitor interval in minutes, default is 30 minutes
  501. QUEUE_MONITOR_INTERVAL=30
  502. # Swagger UI configuration
  503. SWAGGER_UI_ENABLED=true
  504. SWAGGER_UI_PATH=/swagger-ui.html
  505. # Whether to encrypt dataset IDs when exporting DSL files (default: true)
  506. # Set to false to export dataset IDs as plain text for easier cross-environment import
  507. DSL_EXPORT_ENCRYPT_DATASET_ID=true