.env.example 9.1 KB

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