55# ------------------------------
66# Common Variables
77# ------------------------------
8-
98# service 服务名称
109COMPOSE_PROJECT_NAME = dify_service
1110
@@ -42,6 +41,12 @@ APP_WEB_URL=
4241# File preview or download Url prefix.
4342# used to display File preview or download Url to the front-end or as Multi-model inputs;
4443# Url is signed and has expiration time.
44+ # Setting FILES_URL is required for file processing plugins.
45+ # - For https://example.com, use FILES_URL=https://example.com
46+ # - For http://example.com, use FILES_URL=http://example.com
47+ # Recommendation: use a dedicated domain (e.g., https://upload.example.com).
48+ # Alternatively, use http://<your-ip>:5001 or http://api:5001,
49+ # ensuring port 5001 is externally accessible (see docker-compose.yaml).
4550FILES_URL =
4651
4752# ------------------------------
@@ -71,15 +76,15 @@ DEBUG=false
7176# which is convenient for debugging.
7277FLASK_DEBUG = false
7378
74- # A secretkey that is used for securely signing the session cookie
79+ # A secret key that is used for securely signing the session cookie
7580# and encrypting sensitive information on the database.
7681# You can generate a strong key using `openssl rand -base64 42`.
7782SECRET_KEY = sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U
7883
7984# Password for admin user initialization.
8085# If left unset, admin user will not be prompted for a password
81- # when creating the initial admin account.
82- # The length of the password cannot exceed 30 charactors .
86+ # when creating the initial admin account.
87+ # The length of the password cannot exceed 30 characters .
8388INIT_PASSWORD =
8489
8590# Deployment environment.
@@ -177,6 +182,12 @@ CELERY_MIN_WORKERS=
177182API_TOOL_DEFAULT_CONNECT_TIMEOUT = 10
178183API_TOOL_DEFAULT_READ_TIMEOUT = 60
179184
185+ # -------------------------------
186+ # Datasource Configuration
187+ # --------------------------------
188+ ENABLE_WEBSITE_JINAREADER = true
189+ ENABLE_WEBSITE_FIRECRAWL = true
190+ ENABLE_WEBSITE_WATERCRAWL = true
180191
181192# ------------------------------
182193# Database Configuration
@@ -386,7 +397,7 @@ SUPABASE_URL=your-server-url
386397# ------------------------------
387398
388399# The type of vector store to use.
389- # Supported values are `weaviate`, `qdrant`, `milvus`, `myscale`, `relyt`, `pgvector`, `pgvecto-rs`, `chroma`, `opensearch`, `tidb_vector`, ` oracle`, `tencent`, `elasticsearch`, `elasticsearch-ja`, `analyticdb`, `couchbase`, `vikingdb`, `oceanbase`, `opengauss`.
400+ # 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 `.
390401VECTOR_STORE = weaviate
391402
392403# The Weaviate endpoint URL. Only available when VECTOR_STORE is `weaviate`.
@@ -403,10 +414,12 @@ QDRANT_GRPC_PORT=6334
403414# Milvus configuration. Only available when VECTOR_STORE is `milvus`.
404415# The milvus uri.
405416MILVUS_URI = http://host.docker.internal:19530
417+ MILVUS_DATABASE =
406418MILVUS_TOKEN =
407419MILVUS_USER =
408420MILVUS_PASSWORD =
409421MILVUS_ENABLE_HYBRID_SEARCH = False
422+ MILVUS_ANALYZER_PARAMS =
410423
411424# MyScale configuration, only available when VECTOR_STORE is `myscale`
412425# For multi-language support, please set MYSCALE_FTS_PARAMS with referring to:
@@ -437,6 +450,15 @@ PGVECTOR_MAX_CONNECTION=5
437450PGVECTOR_PG_BIGM = false
438451PGVECTOR_PG_BIGM_VERSION = 1.2-20240606
439452
453+ # vastbase configurations, only available when VECTOR_STORE is `vastbase`
454+ VASTBASE_HOST = vastbase
455+ VASTBASE_PORT = 5432
456+ VASTBASE_USER = dify
457+ VASTBASE_PASSWORD = Difyai123456
458+ VASTBASE_DATABASE = dify
459+ VASTBASE_MIN_CONNECTION = 1
460+ VASTBASE_MAX_CONNECTION = 5
461+
440462# pgvecto-rs configurations, only available when VECTOR_STORE is `pgvecto-rs`
441463PGVECTO_RS_HOST = pgvecto-rs
442464PGVECTO_RS_PORT = 5432
@@ -506,9 +528,13 @@ RELYT_DATABASE=postgres
506528# open search configuration, only available when VECTOR_STORE is `opensearch`
507529OPENSEARCH_HOST = opensearch
508530OPENSEARCH_PORT = 9200
531+ OPENSEARCH_SECURE = true
532+ OPENSEARCH_AUTH_METHOD = basic
509533OPENSEARCH_USER = admin
510534OPENSEARCH_PASSWORD = admin
511- OPENSEARCH_SECURE = true
535+ # If using AWS managed IAM, e.g. Managed Cluster or OpenSearch Serverless
536+ OPENSEARCH_AWS_REGION = ap-southeast-1
537+ OPENSEARCH_AWS_SERVICE = aoss
512538
513539# tencent vector configurations, only available when VECTOR_STORE is `tencent`
514540TENCENT_VECTOR_DB_URL = http://127.0.0.1
@@ -518,6 +544,7 @@ TENCENT_VECTOR_DB_USERNAME=dify
518544TENCENT_VECTOR_DB_DATABASE = dify
519545TENCENT_VECTOR_DB_SHARD = 1
520546TENCENT_VECTOR_DB_REPLICAS = 2
547+ TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH = false
521548
522549# ElasticSearch configuration, only available when VECTOR_STORE is `elasticsearch`
523550ELASTICSEARCH_HOST = 0.0.0.0
@@ -548,6 +575,7 @@ VIKINGDB_SOCKET_TIMEOUT=30
548575LINDORM_URL = http://lindorm:30070
549576LINDORM_USERNAME = lindorm
550577LINDORM_PASSWORD = lindorm
578+ LINDORM_QUERY_TIMEOUT = 1
551579
552580# OceanBase Vector configuration, only available when VECTOR_STORE is `oceanbase`
553581OCEANBASE_VECTOR_HOST = oceanbase
@@ -557,6 +585,7 @@ OCEANBASE_VECTOR_PASSWORD=difyai123456
557585OCEANBASE_VECTOR_DATABASE = test
558586OCEANBASE_CLUSTER_NAME = difyai
559587OCEANBASE_MEMORY_LIMIT = 6G
588+ OCEANBASE_ENABLE_HYBRID_SEARCH = false
560589
561590# opengauss configurations, only available when VECTOR_STORE is `opengauss`
562591OPENGAUSS_HOST = opengauss
@@ -566,11 +595,24 @@ OPENGAUSS_PASSWORD=Dify@123
566595OPENGAUSS_DATABASE = dify
567596OPENGAUSS_MIN_CONNECTION = 1
568597OPENGAUSS_MAX_CONNECTION = 5
598+ OPENGAUSS_ENABLE_PQ = false
599+
600+ # huawei cloud search service vector configurations, only available when VECTOR_STORE is `huawei_cloud`
601+ HUAWEI_CLOUD_HOSTS = https://127.0.0.1:9200
602+ HUAWEI_CLOUD_USER = admin
603+ HUAWEI_CLOUD_PASSWORD = admin
569604
570605# Upstash Vector configuration, only available when VECTOR_STORE is `upstash`
571606UPSTASH_VECTOR_URL = https://xxx-vector.upstash.io
572607UPSTASH_VECTOR_TOKEN = dify
573608
609+ # TableStore Vector configuration
610+ # (only used when VECTOR_STORE is tablestore)
611+ TABLESTORE_ENDPOINT = https://instance-name.cn-hangzhou.ots.aliyuncs.com
612+ TABLESTORE_INSTANCE_NAME = instance-name
613+ TABLESTORE_ACCESS_KEY_ID = xxx
614+ TABLESTORE_ACCESS_KEY_SECRET = xxx
615+
574616# ------------------------------
575617# Knowledge Configuration
576618# ------------------------------
@@ -598,17 +640,22 @@ SCARF_NO_ANALYTICS=true
598640# ------------------------------
599641
600642# The maximum number of tokens allowed for prompt generation.
601- # This setting controls the upper limit of tokens that can be used by the LLM
643+ # This setting controls the upper limit of tokens that can be used by the LLM
602644# when generating a prompt in the prompt generation tool.
603645# Default: 512 tokens.
604646PROMPT_GENERATION_MAX_TOKENS = 512
605647
606648# The maximum number of tokens allowed for code generation.
607- # This setting controls the upper limit of tokens that can be used by the LLM
649+ # This setting controls the upper limit of tokens that can be used by the LLM
608650# when generating code in the code generation tool.
609651# Default: 1024 tokens.
610652CODE_GENERATION_MAX_TOKENS = 1024
611653
654+ # Enable or disable plugin based token counting. If disabled, token counting will return 0.
655+ # This can improve performance by skipping token counting operations.
656+ # Default: false (disabled).
657+ PLUGIN_BASED_TOKEN_COUNTING_ENABLED = false
658+
612659# ------------------------------
613660# Multi-modal Configuration
614661# ------------------------------
@@ -725,6 +772,12 @@ MAX_VARIABLE_SIZE=204800
725772WORKFLOW_PARALLEL_DEPTH_LIMIT = 3
726773WORKFLOW_FILE_UPLOAD_LIMIT = 10
727774
775+ # Workflow storage configuration
776+ # Options: rdbms, hybrid
777+ # rdbms: Use only the relational database (default)
778+ # hybrid: Save new data to object storage, read from both object storage and RDBMS
779+ WORKFLOW_NODE_EXECUTION_STORAGE = rdbms
780+
728781# HTTP request node in workflow configuration
729782HTTP_REQUEST_NODE_MAX_BINARY_SIZE = 10485760
730783HTTP_REQUEST_NODE_MAX_TEXT_SIZE = 1048576
@@ -744,6 +797,9 @@ MAX_TOOLS_NUM=10
744797# Maximum number of Parallelism branches in the workflow
745798MAX_PARALLEL_LIMIT = 10
746799
800+ # The maximum number of iterations for agent setting
801+ MAX_ITERATIONS_NUM = 5
802+
747803# ------------------------------
748804# Environment Variables for web Service
749805# ------------------------------
@@ -811,7 +867,7 @@ CHROMA_IS_PERSISTENT=TRUE
811867
812868# ------------------------------
813869# Environment Variables for Oracle Service
814- # (only used when VECTOR_STORE is Oracle )
870+ # (only used when VECTOR_STORE is oracle )
815871# ------------------------------
816872ORACLE_PWD = Dify123456
817873ORACLE_CHARACTERSET = AL32UTF8
@@ -995,3 +1051,46 @@ PLUGIN_PYTHON_ENV_INIT_TIMEOUT=120
9951051PLUGIN_MAX_EXECUTION_TIMEOUT = 600
9961052# PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
9971053PIP_MIRROR_URL =
1054+
1055+ # https://github.com/langgenius/dify-plugin-daemon/blob/main/.env.example
1056+ # Plugin storage type, local aws_s3 tencent_cos azure_blob
1057+ PLUGIN_STORAGE_TYPE = local
1058+ PLUGIN_STORAGE_LOCAL_ROOT = /app/storage
1059+ PLUGIN_WORKING_PATH = /app/storage/cwd
1060+ PLUGIN_INSTALLED_PATH = plugin
1061+ PLUGIN_PACKAGE_CACHE_PATH = plugin_packages
1062+ PLUGIN_MEDIA_CACHE_PATH = assets
1063+ # Plugin oss bucket
1064+ PLUGIN_STORAGE_OSS_BUCKET =
1065+ # Plugin oss s3 credentials
1066+ PLUGIN_S3_USE_AWS_MANAGED_IAM = false
1067+ PLUGIN_S3_ENDPOINT =
1068+ PLUGIN_S3_USE_PATH_STYLE = false
1069+ PLUGIN_AWS_ACCESS_KEY =
1070+ PLUGIN_AWS_SECRET_KEY =
1071+ PLUGIN_AWS_REGION =
1072+ # Plugin oss azure blob
1073+ PLUGIN_AZURE_BLOB_STORAGE_CONTAINER_NAME =
1074+ PLUGIN_AZURE_BLOB_STORAGE_CONNECTION_STRING =
1075+ # Plugin oss tencent cos
1076+ PLUGIN_TENCENT_COS_SECRET_KEY =
1077+ PLUGIN_TENCENT_COS_SECRET_ID =
1078+ PLUGIN_TENCENT_COS_REGION =
1079+
1080+ # ------------------------------
1081+ # OTLP Collector Configuration
1082+ # ------------------------------
1083+ ENABLE_OTEL = false
1084+ OTLP_BASE_ENDPOINT = http://localhost:4318
1085+ OTLP_API_KEY =
1086+ OTEL_EXPORTER_TYPE = otlp
1087+ OTEL_SAMPLING_RATE = 0.1
1088+ OTEL_BATCH_EXPORT_SCHEDULE_DELAY = 5000
1089+ OTEL_MAX_QUEUE_SIZE = 2048
1090+ OTEL_MAX_EXPORT_BATCH_SIZE = 512
1091+ OTEL_METRIC_EXPORT_INTERVAL = 60000
1092+ OTEL_BATCH_EXPORT_TIMEOUT = 10000
1093+ OTEL_METRIC_EXPORT_TIMEOUT = 30000
1094+
1095+ # Prevent Clickjacking
1096+ ALLOW_EMBED = false
0 commit comments