.env.example 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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. # Console API base URL
  7. CONSOLE_API_URL=http://127.0.0.1:5001
  8. CONSOLE_WEB_URL=http://127.0.0.1:3000
  9. # Service API base URL
  10. SERVICE_API_URL=http://127.0.0.1:5001
  11. # Web APP base URL
  12. APP_WEB_URL=http://127.0.0.1:3000
  13. # Files URL
  14. FILES_URL=http://127.0.0.1:5001
  15. # The time in seconds after the signature is rejected
  16. FILES_ACCESS_TIMEOUT=300
  17. # celery configuration
  18. CELERY_BROKER_URL=redis://:difyai123456@localhost:6379/1
  19. # redis configuration
  20. REDIS_HOST=localhost
  21. REDIS_PORT=6379
  22. REDIS_USERNAME=
  23. REDIS_PASSWORD=difyai123456
  24. REDIS_DB=0
  25. # PostgreSQL database configuration
  26. DB_USERNAME=postgres
  27. DB_PASSWORD=difyai123456
  28. DB_HOST=localhost
  29. DB_PORT=5432
  30. DB_DATABASE=dify
  31. # Storage configuration
  32. # use for store upload files, private keys...
  33. # storage type: local, s3, azure-blob, google-storage, tencent-cos, huawei-obs, volcengine-tos, baidu-obs, supabase
  34. STORAGE_TYPE=local
  35. STORAGE_LOCAL_PATH=storage
  36. S3_USE_AWS_MANAGED_IAM=false
  37. S3_ENDPOINT=https://your-bucket-name.storage.s3.clooudflare.com
  38. S3_BUCKET_NAME=your-bucket-name
  39. S3_ACCESS_KEY=your-access-key
  40. S3_SECRET_KEY=your-secret-key
  41. S3_REGION=your-region
  42. # Azure Blob Storage configuration
  43. AZURE_BLOB_ACCOUNT_NAME=your-account-name
  44. AZURE_BLOB_ACCOUNT_KEY=your-account-key
  45. AZURE_BLOB_CONTAINER_NAME=yout-container-name
  46. AZURE_BLOB_ACCOUNT_URL=https://<your_account_name>.blob.core.windows.net
  47. # Aliyun oss Storage configuration
  48. ALIYUN_OSS_BUCKET_NAME=your-bucket-name
  49. ALIYUN_OSS_ACCESS_KEY=your-access-key
  50. ALIYUN_OSS_SECRET_KEY=your-secret-key
  51. ALIYUN_OSS_ENDPOINT=your-endpoint
  52. ALIYUN_OSS_AUTH_VERSION=v1
  53. ALIYUN_OSS_REGION=your-region
  54. # Don't start with '/'. OSS doesn't support leading slash in object names.
  55. ALIYUN_OSS_PATH=your-path
  56. # Google Storage configuration
  57. GOOGLE_STORAGE_BUCKET_NAME=yout-bucket-name
  58. GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64=your-google-service-account-json-base64-string
  59. # Tencent COS Storage configuration
  60. TENCENT_COS_BUCKET_NAME=your-bucket-name
  61. TENCENT_COS_SECRET_KEY=your-secret-key
  62. TENCENT_COS_SECRET_ID=your-secret-id
  63. TENCENT_COS_REGION=your-region
  64. TENCENT_COS_SCHEME=your-scheme
  65. # Huawei OBS Storage Configuration
  66. HUAWEI_OBS_BUCKET_NAME=your-bucket-name
  67. HUAWEI_OBS_SECRET_KEY=your-secret-key
  68. HUAWEI_OBS_ACCESS_KEY=your-access-key
  69. HUAWEI_OBS_SERVER=your-server-url
  70. # Baidu OBS Storage Configuration
  71. BAIDU_OBS_BUCKET_NAME=your-bucket-name
  72. BAIDU_OBS_SECRET_KEY=your-secret-key
  73. BAIDU_OBS_ACCESS_KEY=your-access-key
  74. BAIDU_OBS_ENDPOINT=your-server-url
  75. # OCI Storage configuration
  76. OCI_ENDPOINT=your-endpoint
  77. OCI_BUCKET_NAME=your-bucket-name
  78. OCI_ACCESS_KEY=your-access-key
  79. OCI_SECRET_KEY=your-secret-key
  80. OCI_REGION=your-region
  81. # Volcengine tos Storage configuration
  82. VOLCENGINE_TOS_ENDPOINT=your-endpoint
  83. VOLCENGINE_TOS_BUCKET_NAME=your-bucket-name
  84. VOLCENGINE_TOS_ACCESS_KEY=your-access-key
  85. VOLCENGINE_TOS_SECRET_KEY=your-secret-key
  86. VOLCENGINE_TOS_REGION=your-region
  87. # Supabase Storage Configuration
  88. SUPABASE_BUCKET_NAME=your-bucket-name
  89. SUPABASE_API_KEY=your-access-key
  90. SUPABASE_URL=your-server-url
  91. # CORS configuration
  92. WEB_API_CORS_ALLOW_ORIGINS=http://127.0.0.1:3000,*
  93. CONSOLE_CORS_ALLOW_ORIGINS=http://127.0.0.1:3000,*
  94. # Vector database configuration, support: weaviate, qdrant, milvus, myscale, relyt, pgvecto_rs, pgvector, pgvector, chroma, opensearch, tidb_vector
  95. VECTOR_STORE=weaviate
  96. # Weaviate configuration
  97. WEAVIATE_ENDPOINT=http://localhost:8080
  98. WEAVIATE_API_KEY=WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
  99. WEAVIATE_GRPC_ENABLED=false
  100. WEAVIATE_BATCH_SIZE=100
  101. # Qdrant configuration, use `http://localhost:6333` for local mode or `https://your-qdrant-cluster-url.qdrant.io` for remote mode
  102. QDRANT_URL=http://localhost:6333
  103. QDRANT_API_KEY=difyai123456
  104. QDRANT_CLIENT_TIMEOUT=20
  105. QDRANT_GRPC_ENABLED=false
  106. QDRANT_GRPC_PORT=6334
  107. # Milvus configuration
  108. MILVUS_URI=http://127.0.0.1:19530
  109. MILVUS_TOKEN=
  110. MILVUS_USER=root
  111. MILVUS_PASSWORD=Milvus
  112. # MyScale configuration
  113. MYSCALE_HOST=127.0.0.1
  114. MYSCALE_PORT=8123
  115. MYSCALE_USER=default
  116. MYSCALE_PASSWORD=
  117. MYSCALE_DATABASE=default
  118. MYSCALE_FTS_PARAMS=
  119. # Relyt configuration
  120. RELYT_HOST=127.0.0.1
  121. RELYT_PORT=5432
  122. RELYT_USER=postgres
  123. RELYT_PASSWORD=postgres
  124. RELYT_DATABASE=postgres
  125. # Tencent configuration
  126. TENCENT_VECTOR_DB_URL=http://127.0.0.1
  127. TENCENT_VECTOR_DB_API_KEY=dify
  128. TENCENT_VECTOR_DB_TIMEOUT=30
  129. TENCENT_VECTOR_DB_USERNAME=dify
  130. TENCENT_VECTOR_DB_DATABASE=dify
  131. TENCENT_VECTOR_DB_SHARD=1
  132. TENCENT_VECTOR_DB_REPLICAS=2
  133. # ElasticSearch configuration
  134. ELASTICSEARCH_HOST=127.0.0.1
  135. ELASTICSEARCH_PORT=9200
  136. ELASTICSEARCH_USERNAME=elastic
  137. ELASTICSEARCH_PASSWORD=elastic
  138. # PGVECTO_RS configuration
  139. PGVECTO_RS_HOST=localhost
  140. PGVECTO_RS_PORT=5431
  141. PGVECTO_RS_USER=postgres
  142. PGVECTO_RS_PASSWORD=difyai123456
  143. PGVECTO_RS_DATABASE=postgres
  144. # PGVector configuration
  145. PGVECTOR_HOST=127.0.0.1
  146. PGVECTOR_PORT=5433
  147. PGVECTOR_USER=postgres
  148. PGVECTOR_PASSWORD=postgres
  149. PGVECTOR_DATABASE=postgres
  150. PGVECTOR_MIN_CONNECTION=1
  151. PGVECTOR_MAX_CONNECTION=5
  152. # Tidb Vector configuration
  153. TIDB_VECTOR_HOST=xxx.eu-central-1.xxx.aws.tidbcloud.com
  154. TIDB_VECTOR_PORT=4000
  155. TIDB_VECTOR_USER=xxx.root
  156. TIDB_VECTOR_PASSWORD=xxxxxx
  157. TIDB_VECTOR_DATABASE=dify
  158. # Chroma configuration
  159. CHROMA_HOST=127.0.0.1
  160. CHROMA_PORT=8000
  161. CHROMA_TENANT=default_tenant
  162. CHROMA_DATABASE=default_database
  163. CHROMA_AUTH_PROVIDER=chromadb.auth.token_authn.TokenAuthenticationServerProvider
  164. CHROMA_AUTH_CREDENTIALS=difyai123456
  165. # AnalyticDB configuration
  166. ANALYTICDB_KEY_ID=your-ak
  167. ANALYTICDB_KEY_SECRET=your-sk
  168. ANALYTICDB_REGION_ID=cn-hangzhou
  169. ANALYTICDB_INSTANCE_ID=gp-ab123456
  170. ANALYTICDB_ACCOUNT=testaccount
  171. ANALYTICDB_PASSWORD=testpassword
  172. ANALYTICDB_NAMESPACE=dify
  173. ANALYTICDB_NAMESPACE_PASSWORD=difypassword
  174. # OpenSearch configuration
  175. OPENSEARCH_HOST=127.0.0.1
  176. OPENSEARCH_PORT=9200
  177. OPENSEARCH_USER=admin
  178. OPENSEARCH_PASSWORD=admin
  179. OPENSEARCH_SECURE=true
  180. # Baidu configuration
  181. BAIDU_VECTOR_DB_ENDPOINT=http://127.0.0.1:5287
  182. BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS=30000
  183. BAIDU_VECTOR_DB_ACCOUNT=root
  184. BAIDU_VECTOR_DB_API_KEY=dify
  185. BAIDU_VECTOR_DB_DATABASE=dify
  186. BAIDU_VECTOR_DB_SHARD=1
  187. BAIDU_VECTOR_DB_REPLICAS=3
  188. # Upload configuration
  189. UPLOAD_FILE_SIZE_LIMIT=15
  190. UPLOAD_FILE_BATCH_LIMIT=5
  191. UPLOAD_IMAGE_FILE_SIZE_LIMIT=10
  192. # Model Configuration
  193. MULTIMODAL_SEND_IMAGE_FORMAT=base64
  194. PROMPT_GENERATION_MAX_TOKENS=512
  195. # Mail configuration, support: resend, smtp
  196. MAIL_TYPE=
  197. MAIL_DEFAULT_SEND_FROM=no-reply <no-reply@dify.ai>
  198. RESEND_API_KEY=
  199. RESEND_API_URL=https://api.resend.com
  200. # smtp configuration
  201. SMTP_SERVER=smtp.gmail.com
  202. SMTP_PORT=465
  203. SMTP_USERNAME=123
  204. SMTP_PASSWORD=abc
  205. SMTP_USE_TLS=true
  206. SMTP_OPPORTUNISTIC_TLS=false
  207. # Sentry configuration
  208. SENTRY_DSN=
  209. # DEBUG
  210. DEBUG=false
  211. SQLALCHEMY_ECHO=false
  212. # Notion import configuration, support public and internal
  213. NOTION_INTEGRATION_TYPE=public
  214. NOTION_CLIENT_SECRET=you-client-secret
  215. NOTION_CLIENT_ID=you-client-id
  216. NOTION_INTERNAL_SECRET=you-internal-secret
  217. ETL_TYPE=dify
  218. UNSTRUCTURED_API_URL=
  219. UNSTRUCTURED_API_KEY=
  220. SSRF_PROXY_HTTP_URL=
  221. SSRF_PROXY_HTTPS_URL=
  222. SSRF_DEFAULT_MAX_RETRIES=3
  223. BATCH_UPLOAD_LIMIT=10
  224. KEYWORD_DATA_SOURCE_TYPE=database
  225. # CODE EXECUTION CONFIGURATION
  226. CODE_EXECUTION_ENDPOINT=http://127.0.0.1:8194
  227. CODE_EXECUTION_API_KEY=dify-sandbox
  228. CODE_MAX_NUMBER=9223372036854775807
  229. CODE_MIN_NUMBER=-9223372036854775808
  230. CODE_MAX_STRING_LENGTH=80000
  231. TEMPLATE_TRANSFORM_MAX_LENGTH=80000
  232. CODE_MAX_STRING_ARRAY_LENGTH=30
  233. CODE_MAX_OBJECT_ARRAY_LENGTH=30
  234. CODE_MAX_NUMBER_ARRAY_LENGTH=1000
  235. # API Tool configuration
  236. API_TOOL_DEFAULT_CONNECT_TIMEOUT=10
  237. API_TOOL_DEFAULT_READ_TIMEOUT=60
  238. # HTTP Node configuration
  239. HTTP_REQUEST_MAX_CONNECT_TIMEOUT=300
  240. HTTP_REQUEST_MAX_READ_TIMEOUT=600
  241. HTTP_REQUEST_MAX_WRITE_TIMEOUT=600
  242. HTTP_REQUEST_NODE_MAX_BINARY_SIZE=10485760
  243. HTTP_REQUEST_NODE_MAX_TEXT_SIZE=1048576
  244. # Respect X-* headers to redirect clients
  245. RESPECT_XFORWARD_HEADERS_ENABLED=false
  246. # Log file path
  247. LOG_FILE=
  248. # Indexing configuration
  249. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=1000
  250. # Workflow runtime configuration
  251. WORKFLOW_MAX_EXECUTION_STEPS=500
  252. WORKFLOW_MAX_EXECUTION_TIME=1200
  253. WORKFLOW_CALL_MAX_DEPTH=5
  254. # App configuration
  255. APP_MAX_EXECUTION_TIME=1200
  256. APP_MAX_ACTIVE_REQUESTS=0
  257. # Celery beat configuration
  258. CELERY_BEAT_SCHEDULER_TIME=1
  259. # Position configuration
  260. POSITION_TOOL_PINS=
  261. POSITION_TOOL_INCLUDES=
  262. POSITION_TOOL_EXCLUDES=
  263. POSITION_PROVIDER_PINS=
  264. POSITION_PROVIDER_INCLUDES=
  265. POSITION_PROVIDER_EXCLUDES=