.env.example 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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
  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. # Google Storage configuration
  55. GOOGLE_STORAGE_BUCKET_NAME=yout-bucket-name
  56. GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64=your-google-service-account-json-base64-string
  57. # Tencent COS Storage configuration
  58. TENCENT_COS_BUCKET_NAME=your-bucket-name
  59. TENCENT_COS_SECRET_KEY=your-secret-key
  60. TENCENT_COS_SECRET_ID=your-secret-id
  61. TENCENT_COS_REGION=your-region
  62. TENCENT_COS_SCHEME=your-scheme
  63. # OCI Storage configuration
  64. OCI_ENDPOINT=your-endpoint
  65. OCI_BUCKET_NAME=your-bucket-name
  66. OCI_ACCESS_KEY=your-access-key
  67. OCI_SECRET_KEY=your-secret-key
  68. OCI_REGION=your-region
  69. # CORS configuration
  70. WEB_API_CORS_ALLOW_ORIGINS=http://127.0.0.1:3000,*
  71. CONSOLE_CORS_ALLOW_ORIGINS=http://127.0.0.1:3000,*
  72. # Vector database configuration, support: weaviate, qdrant, milvus, myscale, relyt, pgvecto_rs, pgvector, pgvector, chroma, opensearch, tidb_vector
  73. VECTOR_STORE=weaviate
  74. # Weaviate configuration
  75. WEAVIATE_ENDPOINT=http://localhost:8080
  76. WEAVIATE_API_KEY=WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
  77. WEAVIATE_GRPC_ENABLED=false
  78. WEAVIATE_BATCH_SIZE=100
  79. # Qdrant configuration, use `http://localhost:6333` for local mode or `https://your-qdrant-cluster-url.qdrant.io` for remote mode
  80. QDRANT_URL=http://localhost:6333
  81. QDRANT_API_KEY=difyai123456
  82. QDRANT_CLIENT_TIMEOUT=20
  83. QDRANT_GRPC_ENABLED=false
  84. QDRANT_GRPC_PORT=6334
  85. # Milvus configuration
  86. MILVUS_HOST=127.0.0.1
  87. MILVUS_PORT=19530
  88. MILVUS_USER=root
  89. MILVUS_PASSWORD=Milvus
  90. MILVUS_SECURE=false
  91. # MyScale configuration
  92. MYSCALE_HOST=127.0.0.1
  93. MYSCALE_PORT=8123
  94. MYSCALE_USER=default
  95. MYSCALE_PASSWORD=
  96. MYSCALE_DATABASE=default
  97. MYSCALE_FTS_PARAMS=
  98. # Relyt configuration
  99. RELYT_HOST=127.0.0.1
  100. RELYT_PORT=5432
  101. RELYT_USER=postgres
  102. RELYT_PASSWORD=postgres
  103. RELYT_DATABASE=postgres
  104. # Tencent configuration
  105. TENCENT_VECTOR_DB_URL=http://127.0.0.1
  106. TENCENT_VECTOR_DB_API_KEY=dify
  107. TENCENT_VECTOR_DB_TIMEOUT=30
  108. TENCENT_VECTOR_DB_USERNAME=dify
  109. TENCENT_VECTOR_DB_DATABASE=dify
  110. TENCENT_VECTOR_DB_SHARD=1
  111. TENCENT_VECTOR_DB_REPLICAS=2
  112. # PGVECTO_RS configuration
  113. PGVECTO_RS_HOST=localhost
  114. PGVECTO_RS_PORT=5431
  115. PGVECTO_RS_USER=postgres
  116. PGVECTO_RS_PASSWORD=difyai123456
  117. PGVECTO_RS_DATABASE=postgres
  118. # PGVector configuration
  119. PGVECTOR_HOST=127.0.0.1
  120. PGVECTOR_PORT=5433
  121. PGVECTOR_USER=postgres
  122. PGVECTOR_PASSWORD=postgres
  123. PGVECTOR_DATABASE=postgres
  124. # Tidb Vector configuration
  125. TIDB_VECTOR_HOST=xxx.eu-central-1.xxx.aws.tidbcloud.com
  126. TIDB_VECTOR_PORT=4000
  127. TIDB_VECTOR_USER=xxx.root
  128. TIDB_VECTOR_PASSWORD=xxxxxx
  129. TIDB_VECTOR_DATABASE=dify
  130. # Chroma configuration
  131. CHROMA_HOST=127.0.0.1
  132. CHROMA_PORT=8000
  133. CHROMA_TENANT=default_tenant
  134. CHROMA_DATABASE=default_database
  135. CHROMA_AUTH_PROVIDER=chromadb.auth.token_authn.TokenAuthenticationServerProvider
  136. CHROMA_AUTH_CREDENTIALS=difyai123456
  137. # AnalyticDB configuration
  138. ANALYTICDB_KEY_ID=your-ak
  139. ANALYTICDB_KEY_SECRET=your-sk
  140. ANALYTICDB_REGION_ID=cn-hangzhou
  141. ANALYTICDB_INSTANCE_ID=gp-ab123456
  142. ANALYTICDB_ACCOUNT=testaccount
  143. ANALYTICDB_PASSWORD=testpassword
  144. ANALYTICDB_NAMESPACE=dify
  145. ANALYTICDB_NAMESPACE_PASSWORD=difypassword
  146. # OpenSearch configuration
  147. OPENSEARCH_HOST=127.0.0.1
  148. OPENSEARCH_PORT=9200
  149. OPENSEARCH_USER=admin
  150. OPENSEARCH_PASSWORD=admin
  151. OPENSEARCH_SECURE=true
  152. # Upload configuration
  153. UPLOAD_FILE_SIZE_LIMIT=15
  154. UPLOAD_FILE_BATCH_LIMIT=5
  155. UPLOAD_IMAGE_FILE_SIZE_LIMIT=10
  156. # Model Configuration
  157. MULTIMODAL_SEND_IMAGE_FORMAT=base64
  158. # Mail configuration, support: resend, smtp
  159. MAIL_TYPE=
  160. MAIL_DEFAULT_SEND_FROM=no-reply <no-reply@dify.ai>
  161. RESEND_API_KEY=
  162. RESEND_API_URL=https://api.resend.com
  163. # smtp configuration
  164. SMTP_SERVER=smtp.gmail.com
  165. SMTP_PORT=465
  166. SMTP_USERNAME=123
  167. SMTP_PASSWORD=abc
  168. SMTP_USE_TLS=true
  169. SMTP_OPPORTUNISTIC_TLS=false
  170. # Sentry configuration
  171. SENTRY_DSN=
  172. # DEBUG
  173. DEBUG=false
  174. SQLALCHEMY_ECHO=false
  175. # Notion import configuration, support public and internal
  176. NOTION_INTEGRATION_TYPE=public
  177. NOTION_CLIENT_SECRET=you-client-secret
  178. NOTION_CLIENT_ID=you-client-id
  179. NOTION_INTERNAL_SECRET=you-internal-secret
  180. ETL_TYPE=dify
  181. UNSTRUCTURED_API_URL=
  182. UNSTRUCTURED_API_KEY=
  183. SSRF_PROXY_HTTP_URL=
  184. SSRF_PROXY_HTTPS_URL=
  185. BATCH_UPLOAD_LIMIT=10
  186. KEYWORD_DATA_SOURCE_TYPE=database
  187. # CODE EXECUTION CONFIGURATION
  188. CODE_EXECUTION_ENDPOINT=http://127.0.0.1:8194
  189. CODE_EXECUTION_API_KEY=dify-sandbox
  190. CODE_MAX_NUMBER=9223372036854775807
  191. CODE_MIN_NUMBER=-9223372036854775808
  192. CODE_MAX_STRING_LENGTH=80000
  193. TEMPLATE_TRANSFORM_MAX_LENGTH=80000
  194. CODE_MAX_STRING_ARRAY_LENGTH=30
  195. CODE_MAX_OBJECT_ARRAY_LENGTH=30
  196. CODE_MAX_NUMBER_ARRAY_LENGTH=1000
  197. # API Tool configuration
  198. API_TOOL_DEFAULT_CONNECT_TIMEOUT=10
  199. API_TOOL_DEFAULT_READ_TIMEOUT=60
  200. # HTTP Node configuration
  201. HTTP_REQUEST_MAX_CONNECT_TIMEOUT=300
  202. HTTP_REQUEST_MAX_READ_TIMEOUT=600
  203. HTTP_REQUEST_MAX_WRITE_TIMEOUT=600
  204. HTTP_REQUEST_NODE_MAX_BINARY_SIZE=10485760 # 10MB
  205. HTTP_REQUEST_NODE_MAX_TEXT_SIZE=1048576 # 1MB
  206. # Log file path
  207. LOG_FILE=
  208. # Indexing configuration
  209. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=1000
  210. # Workflow runtime configuration
  211. WORKFLOW_MAX_EXECUTION_STEPS=500
  212. WORKFLOW_MAX_EXECUTION_TIME=1200
  213. WORKFLOW_CALL_MAX_DEPTH=5
  214. # App configuration
  215. APP_MAX_EXECUTION_TIME=1200
  216. APP_MAX_ACTIVE_REQUESTS=0