From 1b49059231d5584ad72d3d4e2fac493310ada42f Mon Sep 17 00:00:00 2001 From: zhaohao1004 Date: Tue, 21 Apr 2026 21:26:28 +0800 Subject: [PATCH] feat: add frontend environment reference generation - Introduced `frontend-env.reference.json` and `frontend-env.reference.md` to document frontend environment variables. - Implemented `env-reference.mjs` script to extract and generate environment variable metadata from `web/env.ts`. - Added tests for environment reference generation in `env-reference.spec.ts`. --- .gitignore | 6 + api/configs/env_reference.py | 431 + api/docs/backend-env.reference.json | 8307 +++++++++++++++++ api/docs/backend-env.reference.md | 1364 +++ .../unit_tests/configs/test_env_reference.py | 251 + docker/docker-compose-demo.yaml | 4038 -------- web/docs/frontend-env.reference.json | 655 ++ web/docs/frontend-env.reference.md | 64 + web/package.json | 1 + web/scripts/__tests__/env-reference.spec.ts | 73 + web/scripts/env-reference.mjs | 377 + 11 files changed, 11529 insertions(+), 4038 deletions(-) create mode 100644 api/configs/env_reference.py create mode 100644 api/docs/backend-env.reference.json create mode 100644 api/docs/backend-env.reference.md create mode 100644 api/tests/unit_tests/configs/test_env_reference.py delete mode 100644 docker/docker-compose-demo.yaml create mode 100644 web/docs/frontend-env.reference.json create mode 100644 web/docs/frontend-env.reference.md create mode 100644 web/scripts/__tests__/env-reference.spec.ts create mode 100644 web/scripts/env-reference.mjs diff --git a/.gitignore b/.gitignore index 3493a7c756..1ba65a7c6f 100644 --- a/.gitignore +++ b/.gitignore @@ -245,3 +245,9 @@ scripts/stress-test/reports/ .qoder/* .eslintcache + +docker/.codex/ +docker/.claude/ +docker/defaults +docker/openspec +docker/AGENTS.md diff --git a/api/configs/env_reference.py b/api/configs/env_reference.py new file mode 100644 index 0000000000..93b3bedf1d --- /dev/null +++ b/api/configs/env_reference.py @@ -0,0 +1,431 @@ +"""Generate a backend env reference from the authoritative config model. + +This module derives backend env input metadata from ``DifyConfig`` instead of +grepping individual files. The exported reference intentionally captures only +code-defined semantics and fallback defaults; it does not attempt to represent +deployment defaults or runtime-effective values. +""" + +from __future__ import annotations + +import inspect +import json +import logging +import re +from collections import defaultdict +from enum import Enum +from pathlib import Path +from types import UnionType +from typing import Any, TypedDict, get_args, get_origin + +from pydantic import AliasChoices, BaseModel +from pydantic.fields import FieldInfo +from pydantic_settings import BaseSettings + +from .app_config import DifyConfig + +_REPO_ROOT = Path(__file__).resolve().parents[2] +_API_ROOT = Path(__file__).resolve().parents[1] +_DOCS_ROOT = _API_ROOT / "docs" +_JSON_OUTPUT = _DOCS_ROOT / "backend-env.reference.json" +_MARKDOWN_OUTPUT = _DOCS_ROOT / "backend-env.reference.md" +_SENSITIVE_SUFFIXES = ( + "_PASSWORD", + "_SECRET", + "_TOKEN", + "_API_KEY", + "_ACCESS_KEY", + "_SECRET_KEY", + "_PRIVATE_KEY", +) +logger = logging.getLogger(__name__) + +_DESCRIPTION_REWRITES = { + "Duration in minutes for which a account deletion token remains valid": ( + "Duration in minutes for which an account deletion token remains valid." + ), + "whether to enable education identity": "Whether to enable education identity.", + ( + "Granularity for async workflow scheduler, sometime, few users could block the queue " + "due to some time-consuming tasks, to avoid this, workflow can be suspended if needed, " + "to achievethis, a time-based checker is required, every granularity seconds, " + "the checker will check the workflow queue and suspend the workflow" + ): ( + "Granularity for the async workflow scheduler. Some users could block the queue with " + "time-consuming tasks, so workflows can be suspended when needed. A time-based checker " + "runs every granularity seconds to inspect the queue and suspend workflows." + ), + ( + "Base URL for file preview or download, used for frontend display and multi-model " + "inputsUrl is signed and has expiration time." + ): ( + "Base URL for file preview or download, used for frontend display and multi-model " + "inputs. The URL is signed and has an expiration time." + ), +} + + +class BackendEnvVariableReference(TypedDict): + name: str + accepted_names: list[str] + group: str + type: str + description: str + code_default: Any | None + required: bool + applies_when: str | None + + +class BackendEnvReference(TypedDict): + schema_version: str + artifact_policy: str + authority: dict[str, str] + resolution: dict[str, list[str]] + variables: list[BackendEnvVariableReference] + + +def _config_classes() -> list[type[BaseSettings]]: + return [ + cls + for cls in DifyConfig.__mro__[1:] + if inspect.isclass(cls) + and issubclass(cls, BaseSettings) + and cls is not BaseSettings + and cls.__module__.startswith("configs.") + ] + + +def _owner_class_for_field(field_name: str) -> type[BaseSettings] | None: + for cls in _config_classes(): + if field_name in getattr(cls, "__annotations__", {}): + return cls + return None + + +def _normalize_name(name: str) -> str: + return re.sub(r"(? str: + module_parts = owner.__module__.removeprefix("configs.").split(".") + if module_parts[-1].endswith("_config"): + module_parts = module_parts[:-1] + return ".".join([*module_parts, _normalize_name(owner.__name__.removesuffix("Config"))]) + + +def _accepted_names(field_name: str, field_info: FieldInfo) -> list[str]: + alias = field_info.validation_alias + if isinstance(alias, AliasChoices): + names = [str(choice) for choice in alias.choices] + elif isinstance(alias, str): + names = [alias] + else: + names = [field_name] + + if field_name not in names: + names.append(field_name) + return names + + +def _type_name(annotation: Any) -> str: + origin = get_origin(annotation) + if origin is None: + if annotation in {str, Any}: + return "string" + if annotation is bool: + return "boolean" + if annotation is int: + return "integer" + if annotation is float: + return "float" + if annotation is type(None): + return "null" + if inspect.isclass(annotation): + if issubclass(annotation, Enum): + return "enum" + if issubclass(annotation, str): + return "string" + if issubclass(annotation, bool): + return "boolean" + if issubclass(annotation, int): + return "integer" + if issubclass(annotation, float): + return "float" + return getattr(annotation, "__name__", str(annotation)) + + if origin is UnionType or str(origin).endswith("Union"): + args = [arg for arg in get_args(annotation) if arg is not type(None)] + rendered = " | ".join(_type_name(arg) for arg in args) if args else "null" + if len(args) != len(get_args(annotation)): + return f"{rendered} | null" + return rendered + + if str(origin).endswith("Literal"): + values = ", ".join(repr(value) for value in get_args(annotation)) + return f"literal[{values}]" + + if str(origin).endswith("Annotated"): + args = get_args(annotation) + return _type_name(args[0]) if args else "annotated" + + if origin in {list, tuple, set}: + args = get_args(annotation) + item_type = _type_name(args[0]) if args else "any" + return f"{origin.__name__}[{item_type}]" + + return str(annotation) + + +def _serialize_default(value: Any) -> Any | None: + if value is None: + return None + if isinstance(value, BaseModel): + return value.model_dump(mode="json") + if isinstance(value, Enum): + return value.value + if isinstance(value, Path): + return str(value) + if isinstance(value, (str, int, float, bool)): + return value + if isinstance(value, (list, tuple)): + return [_serialize_default(item) for item in value] + if isinstance(value, dict): + return {str(key): _serialize_default(item) for key, item in value.items()} + return str(value) + + +def _markdown_cell(value: Any | None) -> str: + if value is None: + return "" + + text = str(value) + normalized = " ".join(text.split()) + return normalized.replace("|", "\\|") + + +def _markdown_code_cell(value: Any | None, *, empty: str = "") -> str: + text = _markdown_cell(value) + if not text: + return empty + return f"`{text.replace('`', '\\`')}`" + + +def _render_code_default(value: Any | None) -> str: + if value is None: + return _markdown_code_cell(json.dumps("", ensure_ascii=False)) + + if isinstance(value, str): + return _markdown_code_cell(json.dumps(" ".join(value.split()), ensure_ascii=False)) + + return _markdown_code_cell(json.dumps(value, ensure_ascii=False)) + + +def _normalize_description(description: str) -> str: + normalized = " ".join(description.split()) + if not normalized: + return "" + + rewritten = _DESCRIPTION_REWRITES.get(normalized, normalized) + rewritten = re.sub(r"(?<=[.!?])(?=[A-Z])", " ", rewritten) + rewritten = re.sub(r"(?<=\w),(?=[A-Za-z])", ", ", rewritten) + rewritten = re.sub(r"(?<=:)(?=https?://)", " ", rewritten) + rewritten = re.sub(r"(?<=\w)\((?=e\.g\.,)", " (", rewritten) + return rewritten + + +def _render_group_applicability_notes(variables: list[BackendEnvVariableReference]) -> list[str]: + applies_when_groups: dict[str, list[str]] = defaultdict(list) + for variable in variables: + applies_when = variable["applies_when"] + if applies_when: + applies_when_groups[applies_when].append(variable["name"]) + + if not applies_when_groups: + return [] + + if len(applies_when_groups) == 1 and len(next(iter(applies_when_groups.values()))) == len(variables): + applies_when = next(iter(applies_when_groups)) + return [f"> Applies when: {_markdown_code_cell(applies_when)}", ""] + + lines = ["Applies when:"] + for applies_when, names in sorted(applies_when_groups.items()): + joined_names = ", ".join(f"`{name}`" for name in sorted(names)) + lines.append(f"- {joined_names}: {_markdown_code_cell(applies_when)}") + lines.append("") + return lines + + +def _provider_applies_when(owner: type[BaseSettings], field_name: str) -> str | None: + source_file = Path(inspect.getsourcefile(owner) or "") + source_name = source_file.name + + storage_map = { + "amazon_s3_storage_config.py": "STORAGE_TYPE=s3", + "aliyun_oss_storage_config.py": "STORAGE_TYPE=aliyun-oss", + "azure_blob_storage_config.py": "STORAGE_TYPE=azure-blob", + "baidu_obs_storage_config.py": "STORAGE_TYPE=baidu-obs", + "clickzetta_volume_storage_config.py": "STORAGE_TYPE=clickzetta-volume", + "google_cloud_storage_config.py": "STORAGE_TYPE=google-storage", + "huawei_obs_storage_config.py": "STORAGE_TYPE=huawei-obs", + "oci_storage_config.py": "STORAGE_TYPE=oci-storage", + "opendal_storage_config.py": "STORAGE_TYPE=opendal", + "supabase_storage_config.py": "STORAGE_TYPE=supabase", + "tencent_cos_storage_config.py": "STORAGE_TYPE=tencent-cos", + "volcengine_tos_storage_config.py": "STORAGE_TYPE=volcengine-tos", + } + if field_name == "STORAGE_LOCAL_PATH": + return "STORAGE_TYPE=local" + if source_name in storage_map: + return storage_map[source_name] + + vector_map = { + "analyticdb_config.py": "VECTOR_STORE=analyticdb", + "baidu_vector_config.py": "VECTOR_STORE=baidu_vector", + "chroma_config.py": "VECTOR_STORE=chroma", + "clickzetta_config.py": "VECTOR_STORE=clickzetta", + "couchbase_config.py": "VECTOR_STORE=couchbase", + "elasticsearch_config.py": "VECTOR_STORE=elasticsearch", + "hologres_config.py": "VECTOR_STORE=hologres", + "huawei_cloud_config.py": "VECTOR_STORE=huawei-cloud", + "iris_config.py": "VECTOR_STORE=iris", + "lindorm_config.py": "VECTOR_STORE=lindorm", + "matrixone_config.py": "VECTOR_STORE=matrixone", + "milvus_config.py": "VECTOR_STORE=milvus", + "myscale_config.py": "VECTOR_STORE=myscale", + "oceanbase_config.py": "VECTOR_STORE=oceanbase", + "opengauss_config.py": "VECTOR_STORE=opengauss", + "opensearch_config.py": "VECTOR_STORE=opensearch", + "oracle_config.py": "VECTOR_STORE=oracle", + "pgvector_config.py": "VECTOR_STORE=pgvector", + "pgvectors_config.py": "VECTOR_STORE=pgvectors", + "qdrant_config.py": "VECTOR_STORE=qdrant", + "relyt_config.py": "VECTOR_STORE=relyt", + "tablestore_config.py": "VECTOR_STORE=tablestore", + "tencent_vector_config.py": "VECTOR_STORE=tencent", + "tidb_on_qdrant_config.py": "VECTOR_STORE=tidb_on_qdrant", + "tidb_vector_config.py": "VECTOR_STORE=tidb_vector", + "upstash_config.py": "VECTOR_STORE=upstash", + "vastbase_vector_config.py": "VECTOR_STORE=vastbase", + "vikingdb_config.py": "VECTOR_STORE=vikingdb", + "weaviate_config.py": "VECTOR_STORE=weaviate", + "alibabacloud_mysql_config.py": "VECTOR_STORE=alibabacloud-mysql", + } + applies_when = vector_map.get(source_name) + if ( + applies_when + and source_name == "elasticsearch_config.py" + and ("CLOUD" in field_name or field_name in {"ELASTICSEARCH_API_KEY", "ELASTICSEARCH_CA_CERTS"}) + ): + return f"{applies_when}; ELASTICSEARCH_USE_CLOUD=true" + return applies_when + + +def build_backend_env_reference() -> BackendEnvReference: + variables: list[BackendEnvVariableReference] = [] + + for field_name, field_info in sorted(DifyConfig.model_fields.items()): + if not field_name.isupper(): + continue + + owner = _owner_class_for_field(field_name) + if owner is None: + continue + + variables.append( + { + "name": field_name, + "accepted_names": _accepted_names(field_name, field_info), + "group": _group_for_owner(owner), + "type": _type_name(field_info.annotation), + "description": field_info.description or "", + "code_default": None if field_info.is_required() else _serialize_default(field_info.default), + "required": field_info.is_required(), + "applies_when": _provider_applies_when(owner, field_name), + } + ) + + return { + "schema_version": "1", + "artifact_policy": "committed-generated-artifact", + "authority": { + "kind": "backend-code-defaults", + "source_root": "api/configs", + "model": "configs.app_config.DifyConfig", + }, + "resolution": { + "precedence": [ + "init_settings", + "process_env", + "remote_settings", + "dotenv", + "file_secrets", + "toml", + "code_default", + ] + }, + "variables": variables, + } + + +def render_backend_env_reference_markdown(reference: BackendEnvReference) -> str: + grouped: dict[str, list[BackendEnvVariableReference]] = defaultdict(list) + for variable in reference["variables"]: + grouped[variable["group"]].append(variable) + + lines = [ + "# Backend Env Reference", + "", + "> Generated from `api/configs/**/*.py`. Do not edit manually.", + "", + "This reference documents backend env input semantics and code defaults only.", + "Deployment defaults, `.env.example`, and runtime-effective values are intentionally excluded.", + "", + "## Value Resolution Order", + "", + "```text", + " > ".join(reference["resolution"]["precedence"]), + "```", + "", + "Code defaults are fallback values only. Runtime process environment, remote settings, and dotenv values can override them.", + "", + ] + + for group in sorted(grouped): + lines.extend([f"## `{group}`", ""]) + lines.extend(_render_group_applicability_notes(grouped[group])) + lines.append("| Name | Type | Default | Accepted Env Names | Description |") + lines.append("| --- | --- | --- | --- | --- |") + + for variable in grouped[group]: + code_default = _render_code_default(variable["code_default"]) + aliases = _markdown_code_cell(", ".join(variable["accepted_names"])) + description = _markdown_cell(_normalize_description(variable["description"])) + variable_type = _markdown_code_cell(variable["type"]) + lines.append( + f"| `{variable['name']}` | {variable_type} | {code_default} | {aliases} | {description} |" + ) + lines.append("") + + return "\n".join(lines) + + +def write_backend_env_reference( + json_output: Path = _JSON_OUTPUT, + markdown_output: Path = _MARKDOWN_OUTPUT, +) -> tuple[Path, Path]: + reference = build_backend_env_reference() + json_output.parent.mkdir(parents=True, exist_ok=True) + markdown_output.parent.mkdir(parents=True, exist_ok=True) + json_output.write_text(json.dumps(reference, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + markdown_output.write_text(render_backend_env_reference_markdown(reference) + "\n", encoding="utf-8") + return json_output, markdown_output + + +def main() -> None: + json_output, markdown_output = write_backend_env_reference() + logger.info("Wrote %s", json_output.relative_to(_REPO_ROOT)) + logger.info("Wrote %s", markdown_output.relative_to(_REPO_ROOT)) + + +if __name__ == "__main__": + main() diff --git a/api/docs/backend-env.reference.json b/api/docs/backend-env.reference.json new file mode 100644 index 0000000000..22f206bffd --- /dev/null +++ b/api/docs/backend-env.reference.json @@ -0,0 +1,8307 @@ +{ + "schema_version": "1", + "artifact_policy": "committed-generated-artifact", + "authority": { + "kind": "backend-code-defaults", + "source_root": "api/configs", + "model": "configs.app_config.DifyConfig" + }, + "resolution": { + "precedence": [ + "init_settings", + "process_env", + "remote_settings", + "dotenv", + "file_secrets", + "toml", + "code_default" + ] + }, + "variables": [ + { + "name": "ACCESS_TOKEN_EXPIRE_MINUTES", + "accepted_names": [ + "ACCESS_TOKEN_EXPIRE_MINUTES" + ], + "group": "feature.auth", + "type": "integer", + "description": "Expiration time for access tokens in minutes", + "code_default": 60, + "required": false, + "applies_when": null + }, + { + "name": "ACCOUNT_DELETION_TOKEN_EXPIRY_MINUTES", + "accepted_names": [ + "ACCOUNT_DELETION_TOKEN_EXPIRY_MINUTES" + ], + "group": "feature.account", + "type": "integer", + "description": "Duration in minutes for which a account deletion token remains valid", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "ADMIN_API_KEY", + "accepted_names": [ + "ADMIN_API_KEY" + ], + "group": "feature.security", + "type": "string | null", + "description": "admin api key for authentication", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "ADMIN_API_KEY_ENABLE", + "accepted_names": [ + "ADMIN_API_KEY_ENABLE" + ], + "group": "feature.security", + "type": "boolean", + "description": "Whether to enable admin api key for authentication", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ALIBABACLOUD_MYSQL_CHARSET", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_CHARSET" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "string", + "description": "Character set for AlibabaCloud MySQL connection (default is 'utf8mb4')", + "code_default": "utf8mb4", + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIBABACLOUD_MYSQL_DATABASE", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_DATABASE" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "string", + "description": "Name of the AlibabaCloud MySQL database to connect to (default is 'dify')", + "code_default": "dify", + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIBABACLOUD_MYSQL_DISTANCE_FUNCTION", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_DISTANCE_FUNCTION" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "string", + "description": "Distance function used for vector similarity search in AlibabaCloud MySQL (e.g., 'cosine', 'euclidean')", + "code_default": "cosine", + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIBABACLOUD_MYSQL_HNSW_M", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_HNSW_M" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "integer", + "description": "Maximum number of connections per layer for HNSW vector index (default is 6, range: 3-200)", + "code_default": 6, + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIBABACLOUD_MYSQL_HOST", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_HOST" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "string", + "description": "Hostname or IP address of the AlibabaCloud MySQL server (e.g., 'localhost' or 'mysql.aliyun.com')", + "code_default": "localhost", + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIBABACLOUD_MYSQL_MAX_CONNECTION", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_MAX_CONNECTION" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "integer", + "description": "Maximum number of connections in the connection pool", + "code_default": 5, + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIBABACLOUD_MYSQL_PASSWORD", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_PASSWORD" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "string", + "description": "Password for authenticating with AlibabaCloud MySQL (default is an empty string)", + "code_default": "", + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIBABACLOUD_MYSQL_PORT", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_PORT" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "integer", + "description": "Port number on which the AlibabaCloud MySQL server is listening (default is 3306)", + "code_default": 3306, + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIBABACLOUD_MYSQL_USER", + "accepted_names": [ + "ALIBABACLOUD_MYSQL_USER" + ], + "group": "middleware.vdb.alibaba-cloud-my-s-q-l", + "type": "string", + "description": "Username for authenticating with AlibabaCloud MySQL (default is 'root')", + "code_default": "root", + "required": false, + "applies_when": "VECTOR_STORE=alibabacloud-mysql" + }, + { + "name": "ALIYUN_CLOUDBOX_ID", + "accepted_names": [ + "ALIYUN_CLOUDBOX_ID" + ], + "group": "middleware.storage.aliyun-o-s-s-storage", + "type": "string | null", + "description": "Cloudbox id for aliyun cloudbox service", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=aliyun-oss" + }, + { + "name": "ALIYUN_OSS_ACCESS_KEY", + "accepted_names": [ + "ALIYUN_OSS_ACCESS_KEY" + ], + "group": "middleware.storage.aliyun-o-s-s-storage", + "type": "string | null", + "description": "Access key ID for authenticating with Aliyun OSS", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=aliyun-oss" + }, + { + "name": "ALIYUN_OSS_AUTH_VERSION", + "accepted_names": [ + "ALIYUN_OSS_AUTH_VERSION" + ], + "group": "middleware.storage.aliyun-o-s-s-storage", + "type": "string | null", + "description": "Version of the authentication protocol to use with Aliyun OSS (e.g., 'v4')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=aliyun-oss" + }, + { + "name": "ALIYUN_OSS_BUCKET_NAME", + "accepted_names": [ + "ALIYUN_OSS_BUCKET_NAME" + ], + "group": "middleware.storage.aliyun-o-s-s-storage", + "type": "string | null", + "description": "Name of the Aliyun OSS bucket to store and retrieve objects", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=aliyun-oss" + }, + { + "name": "ALIYUN_OSS_ENDPOINT", + "accepted_names": [ + "ALIYUN_OSS_ENDPOINT" + ], + "group": "middleware.storage.aliyun-o-s-s-storage", + "type": "string | null", + "description": "URL of the Aliyun OSS endpoint for your chosen region", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=aliyun-oss" + }, + { + "name": "ALIYUN_OSS_PATH", + "accepted_names": [ + "ALIYUN_OSS_PATH" + ], + "group": "middleware.storage.aliyun-o-s-s-storage", + "type": "string | null", + "description": "Base path within the bucket to store objects (e.g., 'my-app-data/')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=aliyun-oss" + }, + { + "name": "ALIYUN_OSS_REGION", + "accepted_names": [ + "ALIYUN_OSS_REGION" + ], + "group": "middleware.storage.aliyun-o-s-s-storage", + "type": "string | null", + "description": "Aliyun OSS region where your bucket is located (e.g., 'oss-cn-hangzhou')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=aliyun-oss" + }, + { + "name": "ALIYUN_OSS_SECRET_KEY", + "accepted_names": [ + "ALIYUN_OSS_SECRET_KEY" + ], + "group": "middleware.storage.aliyun-o-s-s-storage", + "type": "string | null", + "description": "Secret access key for authenticating with Aliyun OSS", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=aliyun-oss" + }, + { + "name": "ALLOW_CREATE_WORKSPACE", + "accepted_names": [ + "ALLOW_CREATE_WORKSPACE" + ], + "group": "feature.login", + "type": "boolean", + "description": "whether to enable create workspace", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ALLOW_REGISTER", + "accepted_names": [ + "ALLOW_REGISTER" + ], + "group": "feature.login", + "type": "boolean", + "description": "whether to enable register", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ANALYTICDB_ACCOUNT", + "accepted_names": [ + "ANALYTICDB_ACCOUNT" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The account name used to log in to the AnalyticDB instance (usually the initial account created with the instance).", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_HOST", + "accepted_names": [ + "ANALYTICDB_HOST" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The host of the AnalyticDB instance you want to connect to.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_INSTANCE_ID", + "accepted_names": [ + "ANALYTICDB_INSTANCE_ID" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The unique identifier of the AnalyticDB instance you want to connect to.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_KEY_ID", + "accepted_names": [ + "ANALYTICDB_KEY_ID" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The Access Key ID provided by Alibaba Cloud for API authentication.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_KEY_SECRET", + "accepted_names": [ + "ANALYTICDB_KEY_SECRET" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The Secret Access Key corresponding to the Access Key ID for secure API access.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_MAX_CONNECTION", + "accepted_names": [ + "ANALYTICDB_MAX_CONNECTION" + ], + "group": "middleware.vdb.analyticdb", + "type": "integer", + "description": "Max connection of the AnalyticDB database.", + "code_default": 5, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_MIN_CONNECTION", + "accepted_names": [ + "ANALYTICDB_MIN_CONNECTION" + ], + "group": "middleware.vdb.analyticdb", + "type": "integer", + "description": "Min connection of the AnalyticDB database.", + "code_default": 1, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_NAMESPACE", + "accepted_names": [ + "ANALYTICDB_NAMESPACE" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The namespace within AnalyticDB for schema isolation (if using namespace feature).", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_NAMESPACE_PASSWORD", + "accepted_names": [ + "ANALYTICDB_NAMESPACE_PASSWORD" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The password for accessing the specified namespace within the AnalyticDB instance (if namespace feature is enabled).", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_PASSWORD", + "accepted_names": [ + "ANALYTICDB_PASSWORD" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The password associated with the AnalyticDB account for database authentication.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_PORT", + "accepted_names": [ + "ANALYTICDB_PORT" + ], + "group": "middleware.vdb.analyticdb", + "type": "integer", + "description": "The port of the AnalyticDB instance you want to connect to.", + "code_default": 5432, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANALYTICDB_REGION_ID", + "accepted_names": [ + "ANALYTICDB_REGION_ID" + ], + "group": "middleware.vdb.analyticdb", + "type": "string | null", + "description": "The region where the AnalyticDB instance is deployed (e.g., 'cn-hangzhou', 'ap-southeast-1').", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=analyticdb" + }, + { + "name": "ANNOTATION_IMPORT_FILE_SIZE_LIMIT", + "accepted_names": [ + "ANNOTATION_IMPORT_FILE_SIZE_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum allowed CSV file size for annotation import in megabytes", + "code_default": 2, + "required": false, + "applies_when": null + }, + { + "name": "ANNOTATION_IMPORT_MAX_CONCURRENT", + "accepted_names": [ + "ANNOTATION_IMPORT_MAX_CONCURRENT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of concurrent annotation import tasks per tenant", + "code_default": 2, + "required": false, + "applies_when": null + }, + { + "name": "ANNOTATION_IMPORT_MAX_RECORDS", + "accepted_names": [ + "ANNOTATION_IMPORT_MAX_RECORDS" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of annotation records allowed in a single import", + "code_default": 10000, + "required": false, + "applies_when": null + }, + { + "name": "ANNOTATION_IMPORT_MIN_RECORDS", + "accepted_names": [ + "ANNOTATION_IMPORT_MIN_RECORDS" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Minimum number of annotation records required in a single import", + "code_default": 1, + "required": false, + "applies_when": null + }, + { + "name": "ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR", + "accepted_names": [ + "ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of annotation import requests per hour per tenant", + "code_default": 20, + "required": false, + "applies_when": null + }, + { + "name": "ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE", + "accepted_names": [ + "ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of annotation import requests per minute per tenant", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "API_COMPRESSION_ENABLED", + "accepted_names": [ + "API_COMPRESSION_ENABLED" + ], + "group": "feature.http", + "type": "boolean", + "description": "Enable or disable gzip compression for HTTP responses", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "API_TOKEN_LAST_USED_UPDATE_INTERVAL", + "accepted_names": [ + "API_TOKEN_LAST_USED_UPDATE_INTERVAL" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Interval in minutes for batch updating API token last_used_at (default 30)", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "API_WORKFLOW_NODE_EXECUTION_REPOSITORY", + "accepted_names": [ + "API_WORKFLOW_NODE_EXECUTION_REPOSITORY" + ], + "group": "feature.repository", + "type": "string", + "description": "Service-layer repository implementation for WorkflowNodeExecutionModel operations. Specify as a module path", + "code_default": "repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository", + "required": false, + "applies_when": null + }, + { + "name": "API_WORKFLOW_RUN_REPOSITORY", + "accepted_names": [ + "API_WORKFLOW_RUN_REPOSITORY" + ], + "group": "feature.repository", + "type": "string", + "description": "Service-layer repository implementation for WorkflowRun operations. Specify as a module path", + "code_default": "repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository", + "required": false, + "applies_when": null + }, + { + "name": "APOLLO_APP_ID", + "accepted_names": [ + "APOLLO_APP_ID" + ], + "group": "remote_settings_sources.apollo.apollo-settings-source-info", + "type": "string | null", + "description": "apollo app_id", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "APOLLO_CLUSTER", + "accepted_names": [ + "APOLLO_CLUSTER" + ], + "group": "remote_settings_sources.apollo.apollo-settings-source-info", + "type": "string | null", + "description": "apollo cluster", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "APOLLO_CONFIG_URL", + "accepted_names": [ + "APOLLO_CONFIG_URL" + ], + "group": "remote_settings_sources.apollo.apollo-settings-source-info", + "type": "string | null", + "description": "apollo config url", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "APOLLO_NAMESPACE", + "accepted_names": [ + "APOLLO_NAMESPACE" + ], + "group": "remote_settings_sources.apollo.apollo-settings-source-info", + "type": "string | null", + "description": "apollo namespace", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "APPLICATION_NAME", + "accepted_names": [ + "APPLICATION_NAME" + ], + "group": "deploy.deployment", + "type": "string", + "description": "Name of the application, used for identification and logging purposes", + "code_default": "langgenius/dify", + "required": false, + "applies_when": null + }, + { + "name": "APP_DEFAULT_ACTIVE_REQUESTS", + "accepted_names": [ + "APP_DEFAULT_ACTIVE_REQUESTS" + ], + "group": "feature.app-execution", + "type": "integer", + "description": "Default number of concurrent active requests per app (0 for unlimited)", + "code_default": 0, + "required": false, + "applies_when": null + }, + { + "name": "APP_MAX_ACTIVE_REQUESTS", + "accepted_names": [ + "APP_MAX_ACTIVE_REQUESTS" + ], + "group": "feature.app-execution", + "type": "integer", + "description": "Maximum number of concurrent active requests per app (0 for unlimited)", + "code_default": 0, + "required": false, + "applies_when": null + }, + { + "name": "APP_MAX_EXECUTION_TIME", + "accepted_names": [ + "APP_MAX_EXECUTION_TIME" + ], + "group": "feature.app-execution", + "type": "integer", + "description": "Maximum allowed execution time for the application in seconds", + "code_default": 1200, + "required": false, + "applies_when": null + }, + { + "name": "APP_WEB_URL", + "accepted_names": [ + "APP_WEB_URL" + ], + "group": "feature.endpoint", + "type": "string", + "description": "Base URL for the web application, used for frontend references", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "ARCHIVE_STORAGE_ACCESS_KEY", + "accepted_names": [ + "ARCHIVE_STORAGE_ACCESS_KEY" + ], + "group": "extra.archive-storage", + "type": "string | null", + "description": "Access key ID for authenticating with storage", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "ARCHIVE_STORAGE_ARCHIVE_BUCKET", + "accepted_names": [ + "ARCHIVE_STORAGE_ARCHIVE_BUCKET" + ], + "group": "extra.archive-storage", + "type": "string | null", + "description": "Name of the bucket to store archived workflow logs", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "ARCHIVE_STORAGE_ENABLED", + "accepted_names": [ + "ARCHIVE_STORAGE_ENABLED" + ], + "group": "extra.archive-storage", + "type": "boolean", + "description": "Enable workflow run logs archiving to S3-compatible storage", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ARCHIVE_STORAGE_ENDPOINT", + "accepted_names": [ + "ARCHIVE_STORAGE_ENDPOINT" + ], + "group": "extra.archive-storage", + "type": "string | null", + "description": "URL of the S3-compatible storage endpoint (e.g., 'https://storage.example.com')", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "ARCHIVE_STORAGE_EXPORT_BUCKET", + "accepted_names": [ + "ARCHIVE_STORAGE_EXPORT_BUCKET" + ], + "group": "extra.archive-storage", + "type": "string | null", + "description": "Name of the bucket to store exported workflow runs", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "ARCHIVE_STORAGE_REGION", + "accepted_names": [ + "ARCHIVE_STORAGE_REGION" + ], + "group": "extra.archive-storage", + "type": "string", + "description": "Region for storage (use 'auto' if the provider supports it)", + "code_default": "auto", + "required": false, + "applies_when": null + }, + { + "name": "ARCHIVE_STORAGE_SECRET_KEY", + "accepted_names": [ + "ARCHIVE_STORAGE_SECRET_KEY" + ], + "group": "extra.archive-storage", + "type": "string | null", + "description": "Secret access key for authenticating with storage", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "ASYNC_WORKFLOW_SCHEDULER_GRANULARITY", + "accepted_names": [ + "ASYNC_WORKFLOW_SCHEDULER_GRANULARITY" + ], + "group": "feature.async-workflow", + "type": "integer", + "description": "Granularity for async workflow scheduler, sometime, few users could block the queue due to some time-consuming tasks, to avoid this, workflow can be suspended if needed, to achievethis, a time-based checker is required, every granularity seconds, the checker will check the workflow queue and suspend the workflow", + "code_default": 120, + "required": false, + "applies_when": null + }, + { + "name": "ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT", + "accepted_names": [ + "ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Timeout for downloading image attachments in seconds", + "code_default": 60, + "required": false, + "applies_when": null + }, + { + "name": "ATTACHMENT_IMAGE_FILE_SIZE_LIMIT", + "accepted_names": [ + "ATTACHMENT_IMAGE_FILE_SIZE_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum allowed image file size for attachments in megabytes", + "code_default": 2, + "required": false, + "applies_when": null + }, + { + "name": "AWS_ACCESS_KEY_ID", + "accepted_names": [ + "AWS_ACCESS_KEY_ID" + ], + "group": "middleware.internal-test", + "type": "string | null", + "description": "Internal test AWS access key ID", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "AWS_SECRET_ACCESS_KEY", + "accepted_names": [ + "AWS_SECRET_ACCESS_KEY" + ], + "group": "middleware.internal-test", + "type": "string | null", + "description": "Internal test AWS secret access key", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "AZURE_BLOB_ACCOUNT_KEY", + "accepted_names": [ + "AZURE_BLOB_ACCOUNT_KEY" + ], + "group": "middleware.storage.azure-blob-storage", + "type": "string | null", + "description": "Access key for authenticating with the Azure Storage account", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=azure-blob" + }, + { + "name": "AZURE_BLOB_ACCOUNT_NAME", + "accepted_names": [ + "AZURE_BLOB_ACCOUNT_NAME" + ], + "group": "middleware.storage.azure-blob-storage", + "type": "string | null", + "description": "Name of the Azure Storage account (e.g., 'mystorageaccount')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=azure-blob" + }, + { + "name": "AZURE_BLOB_ACCOUNT_URL", + "accepted_names": [ + "AZURE_BLOB_ACCOUNT_URL" + ], + "group": "middleware.storage.azure-blob-storage", + "type": "string | null", + "description": "URL of the Azure Blob storage endpoint (e.g., 'https://mystorageaccount.blob.core.windows.net')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=azure-blob" + }, + { + "name": "AZURE_BLOB_CONTAINER_NAME", + "accepted_names": [ + "AZURE_BLOB_CONTAINER_NAME" + ], + "group": "middleware.storage.azure-blob-storage", + "type": "string | null", + "description": "Name of the Azure Blob container to store and retrieve objects", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=azure-blob" + }, + { + "name": "BAIDU_OBS_ACCESS_KEY", + "accepted_names": [ + "BAIDU_OBS_ACCESS_KEY" + ], + "group": "middleware.storage.baidu-o-b-s-storage", + "type": "string | null", + "description": "Access Key ID for authenticating with Baidu OBS", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=baidu-obs" + }, + { + "name": "BAIDU_OBS_BUCKET_NAME", + "accepted_names": [ + "BAIDU_OBS_BUCKET_NAME" + ], + "group": "middleware.storage.baidu-o-b-s-storage", + "type": "string | null", + "description": "Name of the Baidu OBS bucket to store and retrieve objects (e.g., 'my-obs-bucket')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=baidu-obs" + }, + { + "name": "BAIDU_OBS_ENDPOINT", + "accepted_names": [ + "BAIDU_OBS_ENDPOINT" + ], + "group": "middleware.storage.baidu-o-b-s-storage", + "type": "string | null", + "description": "URL of the Baidu OSS endpoint for your chosen region (e.g., 'https://.bj.bcebos.com')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=baidu-obs" + }, + { + "name": "BAIDU_OBS_SECRET_KEY", + "accepted_names": [ + "BAIDU_OBS_SECRET_KEY" + ], + "group": "middleware.storage.baidu-o-b-s-storage", + "type": "string | null", + "description": "Secret Access Key for authenticating with Baidu OBS", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=baidu-obs" + }, + { + "name": "BAIDU_VECTOR_DB_ACCOUNT", + "accepted_names": [ + "BAIDU_VECTOR_DB_ACCOUNT" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "string | null", + "description": "Account for authenticating with the Baidu Vector Database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_API_KEY", + "accepted_names": [ + "BAIDU_VECTOR_DB_API_KEY" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "string | null", + "description": "API key for authenticating with the Baidu Vector Database service", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT", + "accepted_names": [ + "BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "integer", + "description": "Auto build row count increment threshold (default is 500)", + "code_default": 500, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO", + "accepted_names": [ + "BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "float", + "description": "Auto build row count increment ratio threshold (default is 0.05)", + "code_default": 0.05, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS", + "accepted_names": [ + "BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "integer", + "description": "Timeout in milliseconds for Baidu Vector Database operations (default is 30000 milliseconds)", + "code_default": 30000, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_DATABASE", + "accepted_names": [ + "BAIDU_VECTOR_DB_DATABASE" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "string | null", + "description": "Name of the specific Baidu Vector Database to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_ENDPOINT", + "accepted_names": [ + "BAIDU_VECTOR_DB_ENDPOINT" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "string | null", + "description": "URL of the Baidu Vector Database service (e.g., 'http://vdb.bj.baidubce.com')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER", + "accepted_names": [ + "BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "string", + "description": "Analyzer type for inverted index in Baidu Vector Database (default is DEFAULT_ANALYZER)", + "code_default": "DEFAULT_ANALYZER", + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE", + "accepted_names": [ + "BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "string", + "description": "Parser mode for inverted index in Baidu Vector Database (default is COARSE_MODE)", + "code_default": "COARSE_MODE", + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS", + "accepted_names": [ + "BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "integer", + "description": "Timeout in seconds for rebuilding the index in Baidu Vector Database (default is 3600 seconds)", + "code_default": 300, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_REPLICAS", + "accepted_names": [ + "BAIDU_VECTOR_DB_REPLICAS" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "integer", + "description": "Number of replicas for the Baidu Vector Database (default is 3)", + "code_default": 3, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BAIDU_VECTOR_DB_SHARD", + "accepted_names": [ + "BAIDU_VECTOR_DB_SHARD" + ], + "group": "middleware.vdb.baidu-vector-d-b", + "type": "integer", + "description": "Number of shards for the Baidu Vector Database (default is 1)", + "code_default": 1, + "required": false, + "applies_when": "VECTOR_STORE=baidu_vector" + }, + { + "name": "BATCH_UPLOAD_LIMIT", + "accepted_names": [ + "BATCH_UPLOAD_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of files allowed in a batch upload operation", + "code_default": 20, + "required": false, + "applies_when": null + }, + { + "name": "BILLING_ENABLED", + "accepted_names": [ + "BILLING_ENABLED" + ], + "group": "feature.billing", + "type": "boolean", + "description": "Enable or disable billing functionality", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "CAN_REPLACE_LOGO", + "accepted_names": [ + "CAN_REPLACE_LOGO" + ], + "group": "enterprise.enterprise-feature", + "type": "boolean", + "description": "Allow customization of the enterprise logo.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "CELERY_BACKEND", + "accepted_names": [ + "CELERY_BACKEND" + ], + "group": "middleware.celery", + "type": "string", + "description": "Backend for Celery task results. Options: 'database', 'redis', 'rabbitmq'.", + "code_default": "redis", + "required": false, + "applies_when": null + }, + { + "name": "CELERY_BEAT_SCHEDULER_TIME", + "accepted_names": [ + "CELERY_BEAT_SCHEDULER_TIME" + ], + "group": "feature.celery-beat", + "type": "integer", + "description": "Interval in days for Celery Beat scheduler execution, default to 1 day", + "code_default": 1, + "required": false, + "applies_when": null + }, + { + "name": "CELERY_BROKER_URL", + "accepted_names": [ + "CELERY_BROKER_URL" + ], + "group": "middleware.celery", + "type": "string | null", + "description": "URL of the message broker for Celery tasks.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "CELERY_SENTINEL_MASTER_NAME", + "accepted_names": [ + "CELERY_SENTINEL_MASTER_NAME" + ], + "group": "middleware.celery", + "type": "string | null", + "description": "Name of the Redis Sentinel master.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "CELERY_SENTINEL_PASSWORD", + "accepted_names": [ + "CELERY_SENTINEL_PASSWORD" + ], + "group": "middleware.celery", + "type": "string | null", + "description": "Password of the Redis Sentinel master.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "CELERY_SENTINEL_SOCKET_TIMEOUT", + "accepted_names": [ + "CELERY_SENTINEL_SOCKET_TIMEOUT" + ], + "group": "middleware.celery", + "type": "typing.Annotated[float, Gt(gt=0)] | null", + "description": "Timeout for Redis Sentinel socket operations in seconds.", + "code_default": 0.1, + "required": false, + "applies_when": null + }, + { + "name": "CELERY_TASK_ANNOTATIONS", + "accepted_names": [ + "CELERY_TASK_ANNOTATIONS" + ], + "group": "middleware.celery", + "type": "dict[str, typing.Any] | null", + "description": "Annotations for Celery tasks as a JSON mapping of task name -> options (for example, rate limits or other task-specific settings).", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "CELERY_USE_SENTINEL", + "accepted_names": [ + "CELERY_USE_SENTINEL" + ], + "group": "middleware.celery", + "type": "boolean | null", + "description": "Whether to use Redis Sentinel for high availability.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "CHANGE_EMAIL_LOCKOUT_DURATION", + "accepted_names": [ + "CHANGE_EMAIL_LOCKOUT_DURATION" + ], + "group": "feature.auth", + "type": "integer", + "description": "Time (in seconds) a user must wait before retrying change email after exceeding the rate limit.", + "code_default": 86400, + "required": false, + "applies_when": null + }, + { + "name": "CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES", + "accepted_names": [ + "CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES" + ], + "group": "feature.security", + "type": "integer", + "description": "Duration in minutes for which a change email token remains valid", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "CHECK_UPDATE_URL", + "accepted_names": [ + "CHECK_UPDATE_URL" + ], + "group": "feature.update", + "type": "string", + "description": "URL to check for application updates", + "code_default": "https://updates.dify.ai", + "required": false, + "applies_when": null + }, + { + "name": "CHILD_CHUNKS_PREVIEW_NUMBER", + "accepted_names": [ + "CHILD_CHUNKS_PREVIEW_NUMBER" + ], + "group": "feature.indexing", + "type": "integer", + "description": "Maximum number of child chunks to preview", + "code_default": 50, + "required": false, + "applies_when": null + }, + { + "name": "CHROMA_AUTH_CREDENTIALS", + "accepted_names": [ + "CHROMA_AUTH_CREDENTIALS" + ], + "group": "middleware.vdb.chroma", + "type": "string | null", + "description": "Authentication credentials for Chroma (format depends on the auth provider)", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=chroma" + }, + { + "name": "CHROMA_AUTH_PROVIDER", + "accepted_names": [ + "CHROMA_AUTH_PROVIDER" + ], + "group": "middleware.vdb.chroma", + "type": "string | null", + "description": "Authentication provider for Chroma (e.g., 'basic', 'token', or a custom provider)", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=chroma" + }, + { + "name": "CHROMA_DATABASE", + "accepted_names": [ + "CHROMA_DATABASE" + ], + "group": "middleware.vdb.chroma", + "type": "string | null", + "description": "Name of the Chroma database to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=chroma" + }, + { + "name": "CHROMA_HOST", + "accepted_names": [ + "CHROMA_HOST" + ], + "group": "middleware.vdb.chroma", + "type": "string | null", + "description": "Hostname or IP address of the Chroma server (e.g., 'localhost' or '192.168.1.100')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=chroma" + }, + { + "name": "CHROMA_PORT", + "accepted_names": [ + "CHROMA_PORT" + ], + "group": "middleware.vdb.chroma", + "type": "integer", + "description": "Port number on which the Chroma server is listening (default is 8000)", + "code_default": 8000, + "required": false, + "applies_when": "VECTOR_STORE=chroma" + }, + { + "name": "CHROMA_TENANT", + "accepted_names": [ + "CHROMA_TENANT" + ], + "group": "middleware.vdb.chroma", + "type": "string | null", + "description": "Tenant identifier for multi-tenancy support in Chroma", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=chroma" + }, + { + "name": "CLICKZETTA_ANALYZER_MODE", + "accepted_names": [ + "CLICKZETTA_ANALYZER_MODE" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Analyzer mode for tokenization: max_word (fine-grained) or smart (intelligent)", + "code_default": "smart", + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_ANALYZER_TYPE", + "accepted_names": [ + "CLICKZETTA_ANALYZER_TYPE" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Analyzer type for full-text search: keyword, english, chinese, unicode", + "code_default": "chinese", + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_BATCH_SIZE", + "accepted_names": [ + "CLICKZETTA_BATCH_SIZE" + ], + "group": "middleware.vdb.clickzetta", + "type": "integer | null", + "description": "Batch size for bulk insert operations", + "code_default": 100, + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_ENABLE_INVERTED_INDEX", + "accepted_names": [ + "CLICKZETTA_ENABLE_INVERTED_INDEX" + ], + "group": "middleware.vdb.clickzetta", + "type": "boolean | null", + "description": "Enable inverted index for full-text search capabilities", + "code_default": true, + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_INSTANCE", + "accepted_names": [ + "CLICKZETTA_INSTANCE" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Clickzetta Lakehouse instance ID", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_PASSWORD", + "accepted_names": [ + "CLICKZETTA_PASSWORD" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Password for authenticating with Clickzetta Lakehouse", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_SCHEMA", + "accepted_names": [ + "CLICKZETTA_SCHEMA" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Database schema name in Clickzetta", + "code_default": "public", + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_SERVICE", + "accepted_names": [ + "CLICKZETTA_SERVICE" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Clickzetta API service endpoint (e.g., 'api.clickzetta.com')", + "code_default": "api.clickzetta.com", + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_USERNAME", + "accepted_names": [ + "CLICKZETTA_USERNAME" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Username for authenticating with Clickzetta Lakehouse", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_VCLUSTER", + "accepted_names": [ + "CLICKZETTA_VCLUSTER" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Clickzetta virtual cluster name", + "code_default": "default_ap", + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_VECTOR_DISTANCE_FUNCTION", + "accepted_names": [ + "CLICKZETTA_VECTOR_DISTANCE_FUNCTION" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Distance function for vector similarity: l2_distance or cosine_distance", + "code_default": "cosine_distance", + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CLICKZETTA_VOLUME_DIFY_PREFIX", + "accepted_names": [ + "CLICKZETTA_VOLUME_DIFY_PREFIX" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string", + "description": "Directory prefix for User Volume to organize Dify files", + "code_default": "dify_km", + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_INSTANCE", + "accepted_names": [ + "CLICKZETTA_VOLUME_INSTANCE" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string | null", + "description": "ClickZetta instance identifier", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_NAME", + "accepted_names": [ + "CLICKZETTA_VOLUME_NAME" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string | null", + "description": "ClickZetta volume name for external volumes", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_PASSWORD", + "accepted_names": [ + "CLICKZETTA_VOLUME_PASSWORD" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string | null", + "description": "Password for ClickZetta Volume authentication", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_SCHEMA", + "accepted_names": [ + "CLICKZETTA_VOLUME_SCHEMA" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string", + "description": "ClickZetta schema name", + "code_default": "dify", + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_SERVICE", + "accepted_names": [ + "CLICKZETTA_VOLUME_SERVICE" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string", + "description": "ClickZetta service endpoint", + "code_default": "api.clickzetta.com", + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_TABLE_PREFIX", + "accepted_names": [ + "CLICKZETTA_VOLUME_TABLE_PREFIX" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string", + "description": "Prefix for ClickZetta volume table names", + "code_default": "dataset_", + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_TYPE", + "accepted_names": [ + "CLICKZETTA_VOLUME_TYPE" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string", + "description": "ClickZetta volume type (table|user|external)", + "code_default": "user", + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_USERNAME", + "accepted_names": [ + "CLICKZETTA_VOLUME_USERNAME" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string | null", + "description": "Username for ClickZetta Volume authentication", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_VCLUSTER", + "accepted_names": [ + "CLICKZETTA_VOLUME_VCLUSTER" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string", + "description": "ClickZetta virtual cluster name", + "code_default": "default_ap", + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_VOLUME_WORKSPACE", + "accepted_names": [ + "CLICKZETTA_VOLUME_WORKSPACE" + ], + "group": "middleware.storage.click-zetta-volume-storage", + "type": "string", + "description": "ClickZetta workspace name", + "code_default": "quick_start", + "required": false, + "applies_when": "STORAGE_TYPE=clickzetta-volume" + }, + { + "name": "CLICKZETTA_WORKSPACE", + "accepted_names": [ + "CLICKZETTA_WORKSPACE" + ], + "group": "middleware.vdb.clickzetta", + "type": "string | null", + "description": "Clickzetta workspace name", + "code_default": "default", + "required": false, + "applies_when": "VECTOR_STORE=clickzetta" + }, + { + "name": "CODE_EXECUTION_API_KEY", + "accepted_names": [ + "CODE_EXECUTION_API_KEY" + ], + "group": "feature.code-execution-sandbox", + "type": "string", + "description": "API key for accessing the code execution service", + "code_default": "dify-sandbox", + "required": false, + "applies_when": null + }, + { + "name": "CODE_EXECUTION_CONNECT_TIMEOUT", + "accepted_names": [ + "CODE_EXECUTION_CONNECT_TIMEOUT" + ], + "group": "feature.code-execution-sandbox", + "type": "float | null", + "description": "Connection timeout in seconds for code execution requests", + "code_default": 10.0, + "required": false, + "applies_when": null + }, + { + "name": "CODE_EXECUTION_ENDPOINT", + "accepted_names": [ + "CODE_EXECUTION_ENDPOINT" + ], + "group": "feature.code-execution-sandbox", + "type": "HttpUrl", + "description": "URL endpoint for the code execution service", + "code_default": "http://sandbox:8194/", + "required": false, + "applies_when": null + }, + { + "name": "CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY", + "accepted_names": [ + "CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY" + ], + "group": "feature.code-execution-sandbox", + "type": "typing.Annotated[float, Gt(gt=0)] | null", + "description": "Keep-alive expiry in seconds for idle connections (set to None to disable)", + "code_default": 5.0, + "required": false, + "applies_when": null + }, + { + "name": "CODE_EXECUTION_POOL_MAX_CONNECTIONS", + "accepted_names": [ + "CODE_EXECUTION_POOL_MAX_CONNECTIONS" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum number of concurrent connections for the code execution HTTP client", + "code_default": 100, + "required": false, + "applies_when": null + }, + { + "name": "CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS", + "accepted_names": [ + "CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum number of persistent keep-alive connections for the code execution HTTP client", + "code_default": 20, + "required": false, + "applies_when": null + }, + { + "name": "CODE_EXECUTION_READ_TIMEOUT", + "accepted_names": [ + "CODE_EXECUTION_READ_TIMEOUT" + ], + "group": "feature.code-execution-sandbox", + "type": "float | null", + "description": "Read timeout in seconds for code execution requests", + "code_default": 60.0, + "required": false, + "applies_when": null + }, + { + "name": "CODE_EXECUTION_SSL_VERIFY", + "accepted_names": [ + "CODE_EXECUTION_SSL_VERIFY" + ], + "group": "feature.code-execution-sandbox", + "type": "boolean", + "description": "Enable or disable SSL verification for code execution requests", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "CODE_EXECUTION_WRITE_TIMEOUT", + "accepted_names": [ + "CODE_EXECUTION_WRITE_TIMEOUT" + ], + "group": "feature.code-execution-sandbox", + "type": "float | null", + "description": "Write timeout in seconds for code execution request", + "code_default": 10.0, + "required": false, + "applies_when": null + }, + { + "name": "CODE_MAX_DEPTH", + "accepted_names": [ + "CODE_MAX_DEPTH" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum allowed depth for nested structures in code execution", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "CODE_MAX_NUMBER", + "accepted_names": [ + "CODE_MAX_NUMBER" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum allowed numeric value in code execution", + "code_default": 9223372036854775807, + "required": false, + "applies_when": null + }, + { + "name": "CODE_MAX_NUMBER_ARRAY_LENGTH", + "accepted_names": [ + "CODE_MAX_NUMBER_ARRAY_LENGTH" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum allowed length for numeric arrays in code execution", + "code_default": 1000, + "required": false, + "applies_when": null + }, + { + "name": "CODE_MAX_OBJECT_ARRAY_LENGTH", + "accepted_names": [ + "CODE_MAX_OBJECT_ARRAY_LENGTH" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum allowed length for object arrays in code execution", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "CODE_MAX_PRECISION", + "accepted_names": [ + "CODE_MAX_PRECISION" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum number of decimal places for floating-point numbers in code execution", + "code_default": 20, + "required": false, + "applies_when": null + }, + { + "name": "CODE_MAX_STRING_ARRAY_LENGTH", + "accepted_names": [ + "CODE_MAX_STRING_ARRAY_LENGTH" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum allowed length for string arrays in code execution", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "CODE_MAX_STRING_LENGTH", + "accepted_names": [ + "CODE_MAX_STRING_LENGTH" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Maximum allowed length for strings in code execution", + "code_default": 400000, + "required": false, + "applies_when": null + }, + { + "name": "CODE_MIN_NUMBER", + "accepted_names": [ + "CODE_MIN_NUMBER" + ], + "group": "feature.code-execution-sandbox", + "type": "integer", + "description": "Minimum allowed numeric value in code execution", + "code_default": -9223372036854775807, + "required": false, + "applies_when": null + }, + { + "name": "COMMIT_SHA", + "accepted_names": [ + "COMMIT_SHA" + ], + "group": "packaging.packaging-info", + "type": "string", + "description": "SHA-1 checksum of the git commit used to build the app", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "CONSOLE_API_URL", + "accepted_names": [ + "CONSOLE_API_URL" + ], + "group": "feature.endpoint", + "type": "string", + "description": "Base URL for the console API,used for login authentication callback or notion integration callbacks", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "CONSOLE_WEB_URL", + "accepted_names": [ + "CONSOLE_WEB_URL" + ], + "group": "feature.endpoint", + "type": "string", + "description": "Base URL for the console web interface,used for frontend references and CORS configuration", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "COOKIE_DOMAIN", + "accepted_names": [ + "COOKIE_DOMAIN" + ], + "group": "feature.http", + "type": "string", + "description": "Explicit cookie domain for console/service cookies when sharing across subdomains", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "CORE_WORKFLOW_EXECUTION_REPOSITORY", + "accepted_names": [ + "CORE_WORKFLOW_EXECUTION_REPOSITORY" + ], + "group": "feature.repository", + "type": "string", + "description": "Repository implementation for WorkflowExecution. Options: 'core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository' (default), 'core.repositories.celery_workflow_execution_repository.CeleryWorkflowExecutionRepository'", + "code_default": "core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository", + "required": false, + "applies_when": null + }, + { + "name": "CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY", + "accepted_names": [ + "CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY" + ], + "group": "feature.repository", + "type": "string", + "description": "Repository implementation for WorkflowNodeExecution. Options: 'core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository' (default), 'core.repositories.celery_workflow_node_execution_repository.CeleryWorkflowNodeExecutionRepository'", + "code_default": "core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository", + "required": false, + "applies_when": null + }, + { + "name": "COUCHBASE_BUCKET_NAME", + "accepted_names": [ + "COUCHBASE_BUCKET_NAME" + ], + "group": "middleware.vdb.couchbase", + "type": "string | null", + "description": "COUCHBASE bucket name", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=couchbase" + }, + { + "name": "COUCHBASE_CONNECTION_STRING", + "accepted_names": [ + "COUCHBASE_CONNECTION_STRING" + ], + "group": "middleware.vdb.couchbase", + "type": "string | null", + "description": "COUCHBASE connection string", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=couchbase" + }, + { + "name": "COUCHBASE_PASSWORD", + "accepted_names": [ + "COUCHBASE_PASSWORD" + ], + "group": "middleware.vdb.couchbase", + "type": "string | null", + "description": "COUCHBASE password", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=couchbase" + }, + { + "name": "COUCHBASE_SCOPE_NAME", + "accepted_names": [ + "COUCHBASE_SCOPE_NAME" + ], + "group": "middleware.vdb.couchbase", + "type": "string | null", + "description": "COUCHBASE scope name", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=couchbase" + }, + { + "name": "COUCHBASE_USER", + "accepted_names": [ + "COUCHBASE_USER" + ], + "group": "middleware.vdb.couchbase", + "type": "string | null", + "description": "COUCHBASE user", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=couchbase" + }, + { + "name": "CREATE_TIDB_SERVICE_JOB_ENABLED", + "accepted_names": [ + "CREATE_TIDB_SERVICE_JOB_ENABLED" + ], + "group": "feature.data-set", + "type": "boolean", + "description": "Enable or disable create tidb service job", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "DATASET_MAX_SEGMENTS_PER_REQUEST", + "accepted_names": [ + "DATASET_MAX_SEGMENTS_PER_REQUEST" + ], + "group": "feature.data-set", + "type": "integer", + "description": "Maximum number of segments for dataset segments API (0 for unlimited)", + "code_default": 0, + "required": false, + "applies_when": null + }, + { + "name": "DATASET_OPERATOR_ENABLED", + "accepted_names": [ + "DATASET_OPERATOR_ENABLED" + ], + "group": "feature.data-set", + "type": "boolean", + "description": "Enable or disable dataset operator functionality", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "DB_CHARSET", + "accepted_names": [ + "DB_CHARSET" + ], + "group": "middleware.database", + "type": "string", + "description": "Character set for database connection.", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "DB_DATABASE", + "accepted_names": [ + "DB_DATABASE" + ], + "group": "middleware.database", + "type": "string", + "description": "Name of the database to connect to.", + "code_default": "dify", + "required": false, + "applies_when": null + }, + { + "name": "DB_EXTRAS", + "accepted_names": [ + "DB_EXTRAS" + ], + "group": "middleware.database", + "type": "string", + "description": "Additional database connection parameters. Example: 'keepalives_idle=60&keepalives=1'", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "DB_HOST", + "accepted_names": [ + "DB_HOST" + ], + "group": "middleware.database", + "type": "string", + "description": "Hostname or IP address of the database server.", + "code_default": "localhost", + "required": false, + "applies_when": null + }, + { + "name": "DB_PASSWORD", + "accepted_names": [ + "DB_PASSWORD" + ], + "group": "middleware.database", + "type": "string", + "description": "Password for database authentication.", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "DB_PORT", + "accepted_names": [ + "DB_PORT" + ], + "group": "middleware.database", + "type": "integer", + "description": "Port number for database connection.", + "code_default": 5432, + "required": false, + "applies_when": null + }, + { + "name": "DB_SESSION_TIMEZONE_OVERRIDE", + "accepted_names": [ + "DB_SESSION_TIMEZONE_OVERRIDE" + ], + "group": "middleware.database", + "type": "string", + "description": "PostgreSQL session timezone override injected via startup options. Default is 'UTC' for out-of-the-box consistency. Set to empty string to disable app-level timezone injection, for example when using RDS Proxy together with a database-side default timezone.", + "code_default": "UTC", + "required": false, + "applies_when": null + }, + { + "name": "DB_TYPE", + "accepted_names": [ + "DB_TYPE" + ], + "group": "middleware.database", + "type": "literal['postgresql', 'mysql', 'oceanbase', 'seekdb']", + "description": "Database type to use. OceanBase is MySQL-compatible.", + "code_default": "postgresql", + "required": false, + "applies_when": null + }, + { + "name": "DB_USERNAME", + "accepted_names": [ + "DB_USERNAME" + ], + "group": "middleware.database", + "type": "string", + "description": "Username for database authentication.", + "code_default": "postgres", + "required": false, + "applies_when": null + }, + { + "name": "DEBUG", + "accepted_names": [ + "DEBUG" + ], + "group": "deploy.deployment", + "type": "boolean", + "description": "Enable debug mode for additional logging and development features", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "DEPLOY_ENV", + "accepted_names": [ + "DEPLOY_ENV" + ], + "group": "deploy.deployment", + "type": "string", + "description": "Deployment environment (e.g., 'PRODUCTION', 'DEVELOPMENT'), default to PRODUCTION", + "code_default": "PRODUCTION", + "required": false, + "applies_when": null + }, + { + "name": "DSL_EXPORT_ENCRYPT_DATASET_ID", + "accepted_names": [ + "DSL_EXPORT_ENCRYPT_DATASET_ID" + ], + "group": "feature.data-set", + "type": "boolean", + "description": "Enable or disable dataset ID encryption when exporting DSL files", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "EDITION", + "accepted_names": [ + "EDITION" + ], + "group": "deploy.deployment", + "type": "string", + "description": "Deployment edition of the application (e.g., 'SELF_HOSTED', 'CLOUD')", + "code_default": "SELF_HOSTED", + "required": false, + "applies_when": null + }, + { + "name": "EDUCATION_ENABLED", + "accepted_names": [ + "EDUCATION_ENABLED" + ], + "group": "feature.account", + "type": "boolean", + "description": "whether to enable education identity", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ELASTICSEARCH_API_KEY", + "accepted_names": [ + "ELASTICSEARCH_API_KEY" + ], + "group": "middleware.vdb.elasticsearch", + "type": "string | null", + "description": "API key for authenticating with Elastic Cloud", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch; ELASTICSEARCH_USE_CLOUD=true" + }, + { + "name": "ELASTICSEARCH_CA_CERTS", + "accepted_names": [ + "ELASTICSEARCH_CA_CERTS" + ], + "group": "middleware.vdb.elasticsearch", + "type": "string | null", + "description": "Path to CA certificate file for SSL verification", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch; ELASTICSEARCH_USE_CLOUD=true" + }, + { + "name": "ELASTICSEARCH_CLOUD_URL", + "accepted_names": [ + "ELASTICSEARCH_CLOUD_URL" + ], + "group": "middleware.vdb.elasticsearch", + "type": "string | null", + "description": "Full URL for Elastic Cloud deployment (e.g., 'https://example.es.region.aws.found.io:443')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch; ELASTICSEARCH_USE_CLOUD=true" + }, + { + "name": "ELASTICSEARCH_HOST", + "accepted_names": [ + "ELASTICSEARCH_HOST" + ], + "group": "middleware.vdb.elasticsearch", + "type": "string | null", + "description": "Hostname or IP address of the Elasticsearch server (e.g., 'localhost' or '192.168.1.100')", + "code_default": "127.0.0.1", + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch" + }, + { + "name": "ELASTICSEARCH_MAX_RETRIES", + "accepted_names": [ + "ELASTICSEARCH_MAX_RETRIES" + ], + "group": "middleware.vdb.elasticsearch", + "type": "integer", + "description": "Maximum number of retry attempts (default is 10000)", + "code_default": 10000, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch" + }, + { + "name": "ELASTICSEARCH_PASSWORD", + "accepted_names": [ + "ELASTICSEARCH_PASSWORD" + ], + "group": "middleware.vdb.elasticsearch", + "type": "string | null", + "description": "Password for authenticating with Elasticsearch (default is 'elastic')", + "code_default": "elastic", + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch" + }, + { + "name": "ELASTICSEARCH_PORT", + "accepted_names": [ + "ELASTICSEARCH_PORT" + ], + "group": "middleware.vdb.elasticsearch", + "type": "integer", + "description": "Port number on which the Elasticsearch server is listening (default is 9200)", + "code_default": 9200, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch" + }, + { + "name": "ELASTICSEARCH_REQUEST_TIMEOUT", + "accepted_names": [ + "ELASTICSEARCH_REQUEST_TIMEOUT" + ], + "group": "middleware.vdb.elasticsearch", + "type": "integer", + "description": "Request timeout in milliseconds (default is 100000)", + "code_default": 100000, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch" + }, + { + "name": "ELASTICSEARCH_RETRY_ON_TIMEOUT", + "accepted_names": [ + "ELASTICSEARCH_RETRY_ON_TIMEOUT" + ], + "group": "middleware.vdb.elasticsearch", + "type": "boolean", + "description": "Whether to retry requests on timeout (default is True)", + "code_default": true, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch" + }, + { + "name": "ELASTICSEARCH_USERNAME", + "accepted_names": [ + "ELASTICSEARCH_USERNAME" + ], + "group": "middleware.vdb.elasticsearch", + "type": "string | null", + "description": "Username for authenticating with Elasticsearch (default is 'elastic')", + "code_default": "elastic", + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch" + }, + { + "name": "ELASTICSEARCH_USE_CLOUD", + "accepted_names": [ + "ELASTICSEARCH_USE_CLOUD" + ], + "group": "middleware.vdb.elasticsearch", + "type": "boolean | null", + "description": "Set to True to use Elastic Cloud instead of self-hosted Elasticsearch", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch; ELASTICSEARCH_USE_CLOUD=true" + }, + { + "name": "ELASTICSEARCH_VERIFY_CERTS", + "accepted_names": [ + "ELASTICSEARCH_VERIFY_CERTS" + ], + "group": "middleware.vdb.elasticsearch", + "type": "boolean", + "description": "Whether to verify SSL certificates (default is False)", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=elasticsearch" + }, + { + "name": "EMAIL_CODE_LOGIN_TOKEN_EXPIRY_MINUTES", + "accepted_names": [ + "EMAIL_CODE_LOGIN_TOKEN_EXPIRY_MINUTES" + ], + "group": "feature.login", + "type": "integer", + "description": "expiry time in minutes for email code login token", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "EMAIL_REGISTER_LOCKOUT_DURATION", + "accepted_names": [ + "EMAIL_REGISTER_LOCKOUT_DURATION" + ], + "group": "feature.auth", + "type": "integer", + "description": "Time (in seconds) a user must wait before retrying email register after exceeding the rate limit.", + "code_default": 86400, + "required": false, + "applies_when": null + }, + { + "name": "EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES", + "accepted_names": [ + "EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES" + ], + "group": "feature.security", + "type": "integer", + "description": "Duration in minutes for which a email register token remains valid", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "EMAIL_SEND_IP_LIMIT_PER_MINUTE", + "accepted_names": [ + "EMAIL_SEND_IP_LIMIT_PER_MINUTE" + ], + "group": "feature.mail", + "type": "integer", + "description": "Maximum number of emails allowed to be sent from the same IP address in a minute", + "code_default": 50, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_API_TOKEN_LAST_USED_UPDATE_TASK", + "accepted_names": [ + "ENABLE_API_TOKEN_LAST_USED_UPDATE_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable periodic batch update of API token last_used_at timestamps", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK", + "accepted_names": [ + "ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable check upgradable plugin task", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_CLEAN_EMBEDDING_CACHE_TASK", + "accepted_names": [ + "ENABLE_CLEAN_EMBEDDING_CACHE_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable clean embedding cache task", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_CLEAN_MESSAGES", + "accepted_names": [ + "ENABLE_CLEAN_MESSAGES" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable clean messages task", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_CLEAN_UNUSED_DATASETS_TASK", + "accepted_names": [ + "ENABLE_CLEAN_UNUSED_DATASETS_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable clean unused datasets task", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_COLLABORATION_MODE", + "accepted_names": [ + "ENABLE_COLLABORATION_MODE" + ], + "group": "feature.collaboration", + "type": "boolean", + "description": "Whether to enable collaboration mode features across the workspace", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_CREATE_TIDB_SERVERLESS_TASK", + "accepted_names": [ + "ENABLE_CREATE_TIDB_SERVERLESS_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable create tidb service job task", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_DATASETS_QUEUE_MONITOR", + "accepted_names": [ + "ENABLE_DATASETS_QUEUE_MONITOR" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable queue monitor task", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_EMAIL_CODE_LOGIN", + "accepted_names": [ + "ENABLE_EMAIL_CODE_LOGIN" + ], + "group": "feature.login", + "type": "boolean", + "description": "whether to enable email code login", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_EMAIL_PASSWORD_LOGIN", + "accepted_names": [ + "ENABLE_EMAIL_PASSWORD_LOGIN" + ], + "group": "feature.login", + "type": "boolean", + "description": "whether to enable email password login", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_EXPLORE_BANNER", + "accepted_names": [ + "ENABLE_EXPLORE_BANNER" + ], + "group": "feature.mail", + "type": "boolean", + "description": "Enable explore banner", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_HUMAN_INPUT_TIMEOUT_TASK", + "accepted_names": [ + "ENABLE_HUMAN_INPUT_TIMEOUT_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable human input timeout check task", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK", + "accepted_names": [ + "ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable mail clean document notify task", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_OTEL", + "accepted_names": [ + "ENABLE_OTEL" + ], + "group": "observability.otel.o-tel", + "type": "boolean", + "description": "Whether to enable OpenTelemetry", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_REQUEST_LOGGING", + "accepted_names": [ + "ENABLE_REQUEST_LOGGING" + ], + "group": "deploy.deployment", + "type": "boolean", + "description": "Enable request and response body logging", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_SOCIAL_OAUTH_LOGIN", + "accepted_names": [ + "ENABLE_SOCIAL_OAUTH_LOGIN" + ], + "group": "feature.login", + "type": "boolean", + "description": "whether to enable github/google oauth login", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_TRIAL_APP", + "accepted_names": [ + "ENABLE_TRIAL_APP" + ], + "group": "feature.mail", + "type": "boolean", + "description": "Enable trial app", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_TRIGGER_PROVIDER_REFRESH_TASK", + "accepted_names": [ + "ENABLE_TRIGGER_PROVIDER_REFRESH_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable trigger provider refresh poller", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK", + "accepted_names": [ + "ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable update tidb service job status task", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_WORKFLOW_RUN_CLEANUP_TASK", + "accepted_names": [ + "ENABLE_WORKFLOW_RUN_CLEANUP_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable scheduled workflow run cleanup task", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK", + "accepted_names": [ + "ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK" + ], + "group": "feature.celery-schedule-tasks", + "type": "boolean", + "description": "Enable workflow schedule poller task", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "ENDPOINT_URL_TEMPLATE", + "accepted_names": [ + "ENDPOINT_URL_TEMPLATE" + ], + "group": "feature.endpoint", + "type": "string", + "description": "Template url for endpoint plugin", + "code_default": "http://localhost:5002/e/{hook_id}", + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_ENABLED", + "accepted_names": [ + "ENTERPRISE_ENABLED" + ], + "group": "enterprise.enterprise-feature", + "type": "boolean", + "description": "Enable or disable enterprise-level features.Before using, please contact business@dify.ai by email to inquire about licensing matters.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_INCLUDE_CONTENT", + "accepted_names": [ + "ENTERPRISE_INCLUDE_CONTENT" + ], + "group": "enterprise.enterprise-telemetry", + "type": "boolean", + "description": "Include input/output content in traces (privacy toggle).", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_OTEL_SAMPLING_RATE", + "accepted_names": [ + "ENTERPRISE_OTEL_SAMPLING_RATE" + ], + "group": "enterprise.enterprise-telemetry", + "type": "float", + "description": "Sampling rate for enterprise traces (0.0 to 1.0, default 1.0 = 100%).", + "code_default": 1.0, + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_OTLP_API_KEY", + "accepted_names": [ + "ENTERPRISE_OTLP_API_KEY" + ], + "group": "enterprise.enterprise-telemetry", + "type": "string", + "description": "Bearer token for enterprise OTLP export authentication.", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_OTLP_ENDPOINT", + "accepted_names": [ + "ENTERPRISE_OTLP_ENDPOINT" + ], + "group": "enterprise.enterprise-telemetry", + "type": "string", + "description": "Enterprise OTEL collector endpoint.", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_OTLP_HEADERS", + "accepted_names": [ + "ENTERPRISE_OTLP_HEADERS" + ], + "group": "enterprise.enterprise-telemetry", + "type": "string", + "description": "Auth headers for OTLP export (key=value,key2=value2).", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_OTLP_PROTOCOL", + "accepted_names": [ + "ENTERPRISE_OTLP_PROTOCOL" + ], + "group": "enterprise.enterprise-telemetry", + "type": "string", + "description": "OTLP protocol: 'http' or 'grpc' (default: http).", + "code_default": "http", + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_REQUEST_TIMEOUT", + "accepted_names": [ + "ENTERPRISE_REQUEST_TIMEOUT" + ], + "group": "enterprise.enterprise-feature", + "type": "integer", + "description": "Maximum timeout in seconds for enterprise requests", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_SERVICE_NAME", + "accepted_names": [ + "ENTERPRISE_SERVICE_NAME" + ], + "group": "enterprise.enterprise-telemetry", + "type": "string", + "description": "Service name for OTEL resource.", + "code_default": "dify", + "required": false, + "applies_when": null + }, + { + "name": "ENTERPRISE_TELEMETRY_ENABLED", + "accepted_names": [ + "ENTERPRISE_TELEMETRY_ENABLED" + ], + "group": "enterprise.enterprise-telemetry", + "type": "boolean", + "description": "Enable enterprise telemetry collection (also requires ENTERPRISE_ENABLED=true).", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "ETL_TYPE", + "accepted_names": [ + "ETL_TYPE" + ], + "group": "feature.rag-etl", + "type": "string", + "description": "RAG ETL type ('dify' or 'Unstructured'), default to 'dify'", + "code_default": "dify", + "required": false, + "applies_when": null + }, + { + "name": "FILES_ACCESS_TIMEOUT", + "accepted_names": [ + "FILES_ACCESS_TIMEOUT" + ], + "group": "feature.file-access", + "type": "integer", + "description": "Expiration time in seconds for file access URLs", + "code_default": 300, + "required": false, + "applies_when": null + }, + { + "name": "FILES_URL", + "accepted_names": [ + "FILES_URL", + "CONSOLE_API_URL" + ], + "group": "feature.file-access", + "type": "string", + "description": "Base URL for file preview or download, used for frontend display and multi-model inputsUrl is signed and has expiration time.", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "FORGOT_PASSWORD_LOCKOUT_DURATION", + "accepted_names": [ + "FORGOT_PASSWORD_LOCKOUT_DURATION" + ], + "group": "feature.auth", + "type": "integer", + "description": "Time (in seconds) a user must wait before retrying password reset after exceeding the rate limit.", + "code_default": 86400, + "required": false, + "applies_when": null + }, + { + "name": "GITHUB_CLIENT_ID", + "accepted_names": [ + "GITHUB_CLIENT_ID" + ], + "group": "feature.auth", + "type": "string | null", + "description": "GitHub OAuth client ID", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "GITHUB_CLIENT_SECRET", + "accepted_names": [ + "GITHUB_CLIENT_SECRET" + ], + "group": "feature.auth", + "type": "string | null", + "description": "GitHub OAuth client secret", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "GOOGLE_CLIENT_ID", + "accepted_names": [ + "GOOGLE_CLIENT_ID" + ], + "group": "feature.auth", + "type": "string | null", + "description": "Google OAuth client ID", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "GOOGLE_CLIENT_SECRET", + "accepted_names": [ + "GOOGLE_CLIENT_SECRET" + ], + "group": "feature.auth", + "type": "string | null", + "description": "Google OAuth client secret", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "GOOGLE_STORAGE_BUCKET_NAME", + "accepted_names": [ + "GOOGLE_STORAGE_BUCKET_NAME" + ], + "group": "middleware.storage.google-cloud-storage", + "type": "string | null", + "description": "Name of the Google Cloud Storage bucket to store and retrieve objects (e.g., 'my-gcs-bucket')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=google-storage" + }, + { + "name": "GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64", + "accepted_names": [ + "GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64" + ], + "group": "middleware.storage.google-cloud-storage", + "type": "string | null", + "description": "Base64-encoded JSON key file for Google Cloud service account authentication", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=google-storage" + }, + { + "name": "GRAPH_ENGINE_MAX_WORKERS", + "accepted_names": [ + "GRAPH_ENGINE_MAX_WORKERS" + ], + "group": "feature.workflow", + "type": "integer", + "description": "Maximum number of workers per GraphEngine instance", + "code_default": 10, + "required": false, + "applies_when": null + }, + { + "name": "GRAPH_ENGINE_MIN_WORKERS", + "accepted_names": [ + "GRAPH_ENGINE_MIN_WORKERS" + ], + "group": "feature.workflow", + "type": "integer", + "description": "Minimum number of workers per GraphEngine instance", + "code_default": 1, + "required": false, + "applies_when": null + }, + { + "name": "GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME", + "accepted_names": [ + "GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME" + ], + "group": "feature.workflow", + "type": "float", + "description": "Seconds of idle time before scaling down workers", + "code_default": 5.0, + "required": false, + "applies_when": null + }, + { + "name": "GRAPH_ENGINE_SCALE_UP_THRESHOLD", + "accepted_names": [ + "GRAPH_ENGINE_SCALE_UP_THRESHOLD" + ], + "group": "feature.workflow", + "type": "integer", + "description": "Queue depth threshold that triggers worker scale up", + "code_default": 3, + "required": false, + "applies_when": null + }, + { + "name": "HOLOGRES_ACCESS_KEY_ID", + "accepted_names": [ + "HOLOGRES_ACCESS_KEY_ID" + ], + "group": "middleware.vdb.hologres", + "type": "string | null", + "description": "Alibaba Cloud AccessKey ID, also used as the PostgreSQL username.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_ACCESS_KEY_SECRET", + "accepted_names": [ + "HOLOGRES_ACCESS_KEY_SECRET" + ], + "group": "middleware.vdb.hologres", + "type": "string | null", + "description": "Alibaba Cloud AccessKey Secret, also used as the PostgreSQL password.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_BASE_QUANTIZATION_TYPE", + "accepted_names": [ + "HOLOGRES_BASE_QUANTIZATION_TYPE" + ], + "group": "middleware.vdb.hologres", + "type": "string", + "description": "Base quantization type for vector index (e.g., 'rabitq', 'sq8', 'fp16', 'fp32').", + "code_default": "rabitq", + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_DATABASE", + "accepted_names": [ + "HOLOGRES_DATABASE" + ], + "group": "middleware.vdb.hologres", + "type": "string | null", + "description": "Name of the Hologres database to connect to.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_DISTANCE_METHOD", + "accepted_names": [ + "HOLOGRES_DISTANCE_METHOD" + ], + "group": "middleware.vdb.hologres", + "type": "string", + "description": "Distance method for vector index (e.g., 'Cosine', 'Euclidean', 'InnerProduct').", + "code_default": "Cosine", + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_EF_CONSTRUCTION", + "accepted_names": [ + "HOLOGRES_EF_CONSTRUCTION" + ], + "group": "middleware.vdb.hologres", + "type": "integer", + "description": "ef_construction parameter for HNSW vector index.", + "code_default": 400, + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_HOST", + "accepted_names": [ + "HOLOGRES_HOST" + ], + "group": "middleware.vdb.hologres", + "type": "string | null", + "description": "Hostname or IP address of the Hologres instance.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_MAX_DEGREE", + "accepted_names": [ + "HOLOGRES_MAX_DEGREE" + ], + "group": "middleware.vdb.hologres", + "type": "integer", + "description": "Max degree (M) parameter for HNSW vector index.", + "code_default": 64, + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_PORT", + "accepted_names": [ + "HOLOGRES_PORT" + ], + "group": "middleware.vdb.hologres", + "type": "integer", + "description": "Port number for connecting to the Hologres instance.", + "code_default": 80, + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_SCHEMA", + "accepted_names": [ + "HOLOGRES_SCHEMA" + ], + "group": "middleware.vdb.hologres", + "type": "string", + "description": "Schema name in the Hologres database.", + "code_default": "public", + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOLOGRES_TOKENIZER", + "accepted_names": [ + "HOLOGRES_TOKENIZER" + ], + "group": "middleware.vdb.hologres", + "type": "string", + "description": "Tokenizer for full-text search index (e.g., 'jieba', 'ik', 'standard', 'simple').", + "code_default": "jieba", + "required": false, + "applies_when": "VECTOR_STORE=hologres" + }, + { + "name": "HOSTED_ANTHROPIC_API_BASE", + "accepted_names": [ + "HOSTED_ANTHROPIC_API_BASE" + ], + "group": "feature.hosted_service.hosted-anthropic", + "type": "string | null", + "description": "Base URL for hosted Anthropic API", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_ANTHROPIC_API_KEY", + "accepted_names": [ + "HOSTED_ANTHROPIC_API_KEY" + ], + "group": "feature.hosted_service.hosted-anthropic", + "type": "string | null", + "description": "API key for hosted Anthropic service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_ANTHROPIC_PAID_ENABLED", + "accepted_names": [ + "HOSTED_ANTHROPIC_PAID_ENABLED" + ], + "group": "feature.hosted_service.hosted-anthropic", + "type": "boolean", + "description": "Enable paid access to hosted Anthropic service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_ANTHROPIC_PAID_MODELS", + "accepted_names": [ + "HOSTED_ANTHROPIC_PAID_MODELS" + ], + "group": "feature.hosted_service.hosted-anthropic", + "type": "string", + "description": "Comma-separated list of available models for paid access", + "code_default": "claude-opus-4-20250514,claude-sonnet-4-20250514,claude-3-5-haiku-20241022,claude-3-opus-20240229,claude-3-7-sonnet-20250219,claude-3-haiku-20240307", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_ANTHROPIC_TRIAL_ENABLED", + "accepted_names": [ + "HOSTED_ANTHROPIC_TRIAL_ENABLED" + ], + "group": "feature.hosted_service.hosted-anthropic", + "type": "boolean", + "description": "Enable trial access to hosted Anthropic service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_ANTHROPIC_TRIAL_MODELS", + "accepted_names": [ + "HOSTED_ANTHROPIC_TRIAL_MODELS" + ], + "group": "feature.hosted_service.hosted-anthropic", + "type": "string", + "description": "Comma-separated list of available models for paid access", + "code_default": "claude-opus-4-20250514,claude-sonnet-4-20250514,claude-3-5-haiku-20241022,claude-3-opus-20240229,claude-3-7-sonnet-20250219,claude-3-haiku-20240307", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_AZURE_OPENAI_API_BASE", + "accepted_names": [ + "HOSTED_AZURE_OPENAI_API_BASE" + ], + "group": "feature.hosted_service.hosted-azure-open-ai", + "type": "string | null", + "description": "Base URL for hosted Azure OpenAI API", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_AZURE_OPENAI_API_KEY", + "accepted_names": [ + "HOSTED_AZURE_OPENAI_API_KEY" + ], + "group": "feature.hosted_service.hosted-azure-open-ai", + "type": "string | null", + "description": "API key for hosted Azure OpenAI service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_AZURE_OPENAI_ENABLED", + "accepted_names": [ + "HOSTED_AZURE_OPENAI_ENABLED" + ], + "group": "feature.hosted_service.hosted-azure-open-ai", + "type": "boolean", + "description": "Enable hosted Azure OpenAI service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_AZURE_OPENAI_QUOTA_LIMIT", + "accepted_names": [ + "HOSTED_AZURE_OPENAI_QUOTA_LIMIT" + ], + "group": "feature.hosted_service.hosted-azure-open-ai", + "type": "integer", + "description": "Quota limit for hosted Azure OpenAI service usage", + "code_default": 200, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_DEEPSEEK_API_BASE", + "accepted_names": [ + "HOSTED_DEEPSEEK_API_BASE" + ], + "group": "feature.hosted_service.hosted-deepseek", + "type": "string | null", + "description": "Base URL for hosted Deepseek API", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_DEEPSEEK_API_KEY", + "accepted_names": [ + "HOSTED_DEEPSEEK_API_KEY" + ], + "group": "feature.hosted_service.hosted-deepseek", + "type": "string | null", + "description": "API key for hosted Deepseek service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_DEEPSEEK_API_ORGANIZATION", + "accepted_names": [ + "HOSTED_DEEPSEEK_API_ORGANIZATION" + ], + "group": "feature.hosted_service.hosted-deepseek", + "type": "string | null", + "description": "Organization ID for hosted Deepseek service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_DEEPSEEK_PAID_ENABLED", + "accepted_names": [ + "HOSTED_DEEPSEEK_PAID_ENABLED" + ], + "group": "feature.hosted_service.hosted-deepseek", + "type": "boolean", + "description": "Enable paid access to hosted Deepseek service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_DEEPSEEK_PAID_MODELS", + "accepted_names": [ + "HOSTED_DEEPSEEK_PAID_MODELS" + ], + "group": "feature.hosted_service.hosted-deepseek", + "type": "string", + "description": "Comma-separated list of available models for paid access", + "code_default": "deepseek-chat,deepseek-reasoner", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_DEEPSEEK_TRIAL_ENABLED", + "accepted_names": [ + "HOSTED_DEEPSEEK_TRIAL_ENABLED" + ], + "group": "feature.hosted_service.hosted-deepseek", + "type": "boolean", + "description": "Enable trial access to hosted Deepseek service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_DEEPSEEK_TRIAL_MODELS", + "accepted_names": [ + "HOSTED_DEEPSEEK_TRIAL_MODELS" + ], + "group": "feature.hosted_service.hosted-deepseek", + "type": "string", + "description": "Comma-separated list of available models for trial access", + "code_default": "deepseek-chat,deepseek-reasoner", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_FETCH_APP_TEMPLATES_MODE", + "accepted_names": [ + "HOSTED_FETCH_APP_TEMPLATES_MODE" + ], + "group": "feature.hosted_service.hosted-fetch-app-template", + "type": "string", + "description": "Mode for fetching app templates: remote, db, or builtin default to remote,", + "code_default": "remote", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_FETCH_APP_TEMPLATES_REMOTE_DOMAIN", + "accepted_names": [ + "HOSTED_FETCH_APP_TEMPLATES_REMOTE_DOMAIN" + ], + "group": "feature.hosted_service.hosted-fetch-app-template", + "type": "string", + "description": "Domain for fetching remote app templates", + "code_default": "https://tmpl.dify.ai", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_FETCH_PIPELINE_TEMPLATES_MODE", + "accepted_names": [ + "HOSTED_FETCH_PIPELINE_TEMPLATES_MODE" + ], + "group": "feature.hosted_service.hosted-fetch-pipeline-template", + "type": "string", + "description": "Mode for fetching pipeline templates: remote, db, or builtin default to remote,", + "code_default": "remote", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_FETCH_PIPELINE_TEMPLATES_REMOTE_DOMAIN", + "accepted_names": [ + "HOSTED_FETCH_PIPELINE_TEMPLATES_REMOTE_DOMAIN" + ], + "group": "feature.hosted_service.hosted-fetch-pipeline-template", + "type": "string", + "description": "Domain for fetching remote pipeline templates", + "code_default": "https://tmpl.dify.ai", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_GEMINI_API_BASE", + "accepted_names": [ + "HOSTED_GEMINI_API_BASE" + ], + "group": "feature.hosted_service.hosted-gemini", + "type": "string | null", + "description": "Base URL for hosted Gemini API", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_GEMINI_API_KEY", + "accepted_names": [ + "HOSTED_GEMINI_API_KEY" + ], + "group": "feature.hosted_service.hosted-gemini", + "type": "string | null", + "description": "API key for hosted Gemini service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_GEMINI_API_ORGANIZATION", + "accepted_names": [ + "HOSTED_GEMINI_API_ORGANIZATION" + ], + "group": "feature.hosted_service.hosted-gemini", + "type": "string | null", + "description": "Organization ID for hosted Gemini service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_GEMINI_PAID_ENABLED", + "accepted_names": [ + "HOSTED_GEMINI_PAID_ENABLED" + ], + "group": "feature.hosted_service.hosted-gemini", + "type": "boolean", + "description": "Enable paid access to hosted gemini service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_GEMINI_PAID_MODELS", + "accepted_names": [ + "HOSTED_GEMINI_PAID_MODELS" + ], + "group": "feature.hosted_service.hosted-gemini", + "type": "string", + "description": "Comma-separated list of available models for paid access", + "code_default": "gemini-2.5-flash,gemini-2.0-flash,gemini-2.0-flash-lite,", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_GEMINI_TRIAL_ENABLED", + "accepted_names": [ + "HOSTED_GEMINI_TRIAL_ENABLED" + ], + "group": "feature.hosted_service.hosted-gemini", + "type": "boolean", + "description": "Enable trial access to hosted Gemini service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_GEMINI_TRIAL_MODELS", + "accepted_names": [ + "HOSTED_GEMINI_TRIAL_MODELS" + ], + "group": "feature.hosted_service.hosted-gemini", + "type": "string", + "description": "Comma-separated list of available models for trial access", + "code_default": "gemini-2.5-flash,gemini-2.0-flash,gemini-2.0-flash-lite,", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_MINIMAX_ENABLED", + "accepted_names": [ + "HOSTED_MINIMAX_ENABLED" + ], + "group": "feature.hosted_service.hosted-minmax", + "type": "boolean", + "description": "Enable hosted Minmax service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_MODEL_CREDIT_CONFIG", + "accepted_names": [ + "HOSTED_MODEL_CREDIT_CONFIG" + ], + "group": "feature.hosted_service.hosted-credit", + "type": "string", + "description": "Model credit configuration in format 'model:credits,model:credits', e.g., 'gpt-4:20,gpt-4o:10'", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_MODERATION_ENABLED", + "accepted_names": [ + "HOSTED_MODERATION_ENABLED" + ], + "group": "feature.hosted_service.hosted-moderation", + "type": "boolean", + "description": "Enable hosted Moderation service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_MODERATION_PROVIDERS", + "accepted_names": [ + "HOSTED_MODERATION_PROVIDERS" + ], + "group": "feature.hosted_service.hosted-moderation", + "type": "string", + "description": "Comma-separated list of moderation providers", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_OPENAI_API_BASE", + "accepted_names": [ + "HOSTED_OPENAI_API_BASE" + ], + "group": "feature.hosted_service.hosted-open-ai", + "type": "string | null", + "description": "Base URL for hosted OpenAI API", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_OPENAI_API_KEY", + "accepted_names": [ + "HOSTED_OPENAI_API_KEY" + ], + "group": "feature.hosted_service.hosted-open-ai", + "type": "string | null", + "description": "API key for hosted OpenAI service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_OPENAI_API_ORGANIZATION", + "accepted_names": [ + "HOSTED_OPENAI_API_ORGANIZATION" + ], + "group": "feature.hosted_service.hosted-open-ai", + "type": "string | null", + "description": "Organization ID for hosted OpenAI service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_OPENAI_PAID_ENABLED", + "accepted_names": [ + "HOSTED_OPENAI_PAID_ENABLED" + ], + "group": "feature.hosted_service.hosted-open-ai", + "type": "boolean", + "description": "Enable paid access to hosted OpenAI service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_OPENAI_PAID_MODELS", + "accepted_names": [ + "HOSTED_OPENAI_PAID_MODELS" + ], + "group": "feature.hosted_service.hosted-open-ai", + "type": "string", + "description": "Comma-separated list of available models for paid access", + "code_default": "gpt-4,gpt-4-turbo-preview,gpt-4-turbo-2024-04-09,gpt-4-1106-preview,gpt-4-0125-preview,gpt-4-turbo,gpt-4.1,gpt-4.1-2025-04-14,gpt-4.1-mini,gpt-4.1-mini-2025-04-14,gpt-4.1-nano,gpt-4.1-nano-2025-04-14,gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613,gpt-3.5-turbo-0125,gpt-3.5-turbo-instruct,text-davinci-003,chatgpt-4o-latest,gpt-4o,gpt-4o-2024-05-13,gpt-4o-2024-08-06,gpt-4o-2024-11-20,gpt-4o-audio-preview,gpt-4o-audio-preview-2025-06-03,gpt-4o-mini,gpt-4o-mini-2024-07-18,o3-mini,o3-mini-2025-01-31,gpt-5-mini-2025-08-07,gpt-5-mini,o4-mini,o4-mini-2025-04-16,gpt-5-chat-latest,gpt-5,gpt-5-2025-08-07,gpt-5-nano,gpt-5-nano-2025-08-07", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_OPENAI_TRIAL_ENABLED", + "accepted_names": [ + "HOSTED_OPENAI_TRIAL_ENABLED" + ], + "group": "feature.hosted_service.hosted-open-ai", + "type": "boolean", + "description": "Enable trial access to hosted OpenAI service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_OPENAI_TRIAL_MODELS", + "accepted_names": [ + "HOSTED_OPENAI_TRIAL_MODELS" + ], + "group": "feature.hosted_service.hosted-open-ai", + "type": "string", + "description": "Comma-separated list of available models for trial access", + "code_default": "gpt-4,gpt-4-turbo-preview,gpt-4-turbo-2024-04-09,gpt-4-1106-preview,gpt-4-0125-preview,gpt-4-turbo,gpt-4.1,gpt-4.1-2025-04-14,gpt-4.1-mini,gpt-4.1-mini-2025-04-14,gpt-4.1-nano,gpt-4.1-nano-2025-04-14,gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613,gpt-3.5-turbo-0125,gpt-3.5-turbo-instruct,text-davinci-003,chatgpt-4o-latest,gpt-4o,gpt-4o-2024-05-13,gpt-4o-2024-08-06,gpt-4o-2024-11-20,gpt-4o-audio-preview,gpt-4o-audio-preview-2025-06-03,gpt-4o-mini,gpt-4o-mini-2024-07-18,o3-mini,o3-mini-2025-01-31,gpt-5-mini-2025-08-07,gpt-5-mini,o4-mini,o4-mini-2025-04-16,gpt-5-chat-latest,gpt-5,gpt-5-2025-08-07,gpt-5-nano,gpt-5-nano-2025-08-07", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_POOL_CREDITS", + "accepted_names": [ + "HOSTED_POOL_CREDITS" + ], + "group": "feature.hosted_service.hosted-credit", + "type": "integer", + "description": "Pool credits for hosted service", + "code_default": 200, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_SPARK_ENABLED", + "accepted_names": [ + "HOSTED_SPARK_ENABLED" + ], + "group": "feature.hosted_service.hosted-spark", + "type": "boolean", + "description": "Enable hosted Spark service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_TONGYI_API_KEY", + "accepted_names": [ + "HOSTED_TONGYI_API_KEY" + ], + "group": "feature.hosted_service.hosted-tongyi", + "type": "string | null", + "description": "API key for hosted Tongyi service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_TONGYI_PAID_ENABLED", + "accepted_names": [ + "HOSTED_TONGYI_PAID_ENABLED" + ], + "group": "feature.hosted_service.hosted-tongyi", + "type": "boolean", + "description": "Enable paid access to hosted Anthropic service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_TONGYI_PAID_MODELS", + "accepted_names": [ + "HOSTED_TONGYI_PAID_MODELS" + ], + "group": "feature.hosted_service.hosted-tongyi", + "type": "string", + "description": "Comma-separated list of available models for paid access", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_TONGYI_TRIAL_ENABLED", + "accepted_names": [ + "HOSTED_TONGYI_TRIAL_ENABLED" + ], + "group": "feature.hosted_service.hosted-tongyi", + "type": "boolean", + "description": "Enable trial access to hosted Tongyi service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_TONGYI_TRIAL_MODELS", + "accepted_names": [ + "HOSTED_TONGYI_TRIAL_MODELS" + ], + "group": "feature.hosted_service.hosted-tongyi", + "type": "string", + "description": "Comma-separated list of available models for trial access", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_TONGYI_USE_INTERNATIONAL_ENDPOINT", + "accepted_names": [ + "HOSTED_TONGYI_USE_INTERNATIONAL_ENDPOINT" + ], + "group": "feature.hosted_service.hosted-tongyi", + "type": "boolean", + "description": "Use international endpoint for hosted Tongyi service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_XAI_API_BASE", + "accepted_names": [ + "HOSTED_XAI_API_BASE" + ], + "group": "feature.hosted_service.hosted-x-a-i", + "type": "string | null", + "description": "Base URL for hosted XAI API", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_XAI_API_KEY", + "accepted_names": [ + "HOSTED_XAI_API_KEY" + ], + "group": "feature.hosted_service.hosted-x-a-i", + "type": "string | null", + "description": "API key for hosted XAI service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_XAI_API_ORGANIZATION", + "accepted_names": [ + "HOSTED_XAI_API_ORGANIZATION" + ], + "group": "feature.hosted_service.hosted-x-a-i", + "type": "string | null", + "description": "Organization ID for hosted XAI service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_XAI_PAID_ENABLED", + "accepted_names": [ + "HOSTED_XAI_PAID_ENABLED" + ], + "group": "feature.hosted_service.hosted-x-a-i", + "type": "boolean", + "description": "Enable paid access to hosted XAI service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_XAI_PAID_MODELS", + "accepted_names": [ + "HOSTED_XAI_PAID_MODELS" + ], + "group": "feature.hosted_service.hosted-x-a-i", + "type": "string", + "description": "Comma-separated list of available models for paid access", + "code_default": "grok-3,grok-3-mini,grok-3-mini-fast", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_XAI_TRIAL_ENABLED", + "accepted_names": [ + "HOSTED_XAI_TRIAL_ENABLED" + ], + "group": "feature.hosted_service.hosted-x-a-i", + "type": "boolean", + "description": "Enable trial access to hosted XAI service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_XAI_TRIAL_MODELS", + "accepted_names": [ + "HOSTED_XAI_TRIAL_MODELS" + ], + "group": "feature.hosted_service.hosted-x-a-i", + "type": "string", + "description": "Comma-separated list of available models for trial access", + "code_default": "grok-3,grok-3-mini,grok-3-mini-fast", + "required": false, + "applies_when": null + }, + { + "name": "HOSTED_ZHIPUAI_ENABLED", + "accepted_names": [ + "HOSTED_ZHIPUAI_ENABLED" + ], + "group": "feature.hosted_service.hosted-zhipu-a-i", + "type": "boolean", + "description": "Enable hosted ZhipuAI service", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "HTTP_REQUEST_MAX_CONNECT_TIMEOUT", + "accepted_names": [ + "HTTP_REQUEST_MAX_CONNECT_TIMEOUT" + ], + "group": "feature.http", + "type": "integer", + "description": "Maximum connection timeout in seconds for HTTP requests", + "code_default": 10, + "required": false, + "applies_when": null + }, + { + "name": "HTTP_REQUEST_MAX_READ_TIMEOUT", + "accepted_names": [ + "HTTP_REQUEST_MAX_READ_TIMEOUT" + ], + "group": "feature.http", + "type": "integer", + "description": "Maximum read timeout in seconds for HTTP requests", + "code_default": 600, + "required": false, + "applies_when": null + }, + { + "name": "HTTP_REQUEST_MAX_WRITE_TIMEOUT", + "accepted_names": [ + "HTTP_REQUEST_MAX_WRITE_TIMEOUT" + ], + "group": "feature.http", + "type": "integer", + "description": "Maximum write timeout in seconds for HTTP requests", + "code_default": 600, + "required": false, + "applies_when": null + }, + { + "name": "HTTP_REQUEST_NODE_MAX_BINARY_SIZE", + "accepted_names": [ + "HTTP_REQUEST_NODE_MAX_BINARY_SIZE" + ], + "group": "feature.http", + "type": "integer", + "description": "Maximum allowed size in bytes for binary data in HTTP requests", + "code_default": 10485760, + "required": false, + "applies_when": null + }, + { + "name": "HTTP_REQUEST_NODE_MAX_TEXT_SIZE", + "accepted_names": [ + "HTTP_REQUEST_NODE_MAX_TEXT_SIZE" + ], + "group": "feature.http", + "type": "integer", + "description": "Maximum allowed size in bytes for text data in HTTP requests", + "code_default": 1048576, + "required": false, + "applies_when": null + }, + { + "name": "HTTP_REQUEST_NODE_SSL_VERIFY", + "accepted_names": [ + "HTTP_REQUEST_NODE_SSL_VERIFY" + ], + "group": "feature.http", + "type": "boolean", + "description": "Enable or disable SSL verification for HTTP requests", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "HUAWEI_CLOUD_HOSTS", + "accepted_names": [ + "HUAWEI_CLOUD_HOSTS" + ], + "group": "middleware.vdb.huawei-cloud", + "type": "string | null", + "description": "Hostname or IP address of the Huawei cloud search service instance", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=huawei-cloud" + }, + { + "name": "HUAWEI_CLOUD_PASSWORD", + "accepted_names": [ + "HUAWEI_CLOUD_PASSWORD" + ], + "group": "middleware.vdb.huawei-cloud", + "type": "string | null", + "description": "Password for authenticating with Huawei cloud search service", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=huawei-cloud" + }, + { + "name": "HUAWEI_CLOUD_USER", + "accepted_names": [ + "HUAWEI_CLOUD_USER" + ], + "group": "middleware.vdb.huawei-cloud", + "type": "string | null", + "description": "Username for authenticating with Huawei cloud search service", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=huawei-cloud" + }, + { + "name": "HUAWEI_OBS_ACCESS_KEY", + "accepted_names": [ + "HUAWEI_OBS_ACCESS_KEY" + ], + "group": "middleware.storage.huawei-cloud-o-b-s-storage", + "type": "string | null", + "description": "Access Key ID for authenticating with Huawei Cloud OBS", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=huawei-obs" + }, + { + "name": "HUAWEI_OBS_BUCKET_NAME", + "accepted_names": [ + "HUAWEI_OBS_BUCKET_NAME" + ], + "group": "middleware.storage.huawei-cloud-o-b-s-storage", + "type": "string | null", + "description": "Name of the Huawei Cloud OBS bucket to store and retrieve objects (e.g., 'my-obs-bucket')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=huawei-obs" + }, + { + "name": "HUAWEI_OBS_PATH_STYLE", + "accepted_names": [ + "HUAWEI_OBS_PATH_STYLE" + ], + "group": "middleware.storage.huawei-cloud-o-b-s-storage", + "type": "boolean", + "description": "Flag to indicate whether to use path-style URLs for OBS requests", + "code_default": false, + "required": false, + "applies_when": "STORAGE_TYPE=huawei-obs" + }, + { + "name": "HUAWEI_OBS_SECRET_KEY", + "accepted_names": [ + "HUAWEI_OBS_SECRET_KEY" + ], + "group": "middleware.storage.huawei-cloud-o-b-s-storage", + "type": "string | null", + "description": "Secret Access Key for authenticating with Huawei Cloud OBS", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=huawei-obs" + }, + { + "name": "HUAWEI_OBS_SERVER", + "accepted_names": [ + "HUAWEI_OBS_SERVER" + ], + "group": "middleware.storage.huawei-cloud-o-b-s-storage", + "type": "string | null", + "description": "Endpoint URL for Huawei Cloud OBS (e.g., 'https://obs.cn-north-4.myhuaweicloud.com')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=huawei-obs" + }, + { + "name": "HUMAN_INPUT_GLOBAL_TIMEOUT_SECONDS", + "accepted_names": [ + "HUMAN_INPUT_GLOBAL_TIMEOUT_SECONDS" + ], + "group": "feature.app-execution", + "type": "integer", + "description": "Maximum seconds a workflow run can stay paused waiting for human input before global timeout.", + "code_default": 604800, + "required": false, + "applies_when": null + }, + { + "name": "HUMAN_INPUT_TIMEOUT_TASK_INTERVAL", + "accepted_names": [ + "HUMAN_INPUT_TIMEOUT_TASK_INTERVAL" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Human input timeout check interval in minutes", + "code_default": 1, + "required": false, + "applies_when": null + }, + { + "name": "IMAGE_FILE_BATCH_LIMIT", + "accepted_names": [ + "IMAGE_FILE_BATCH_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of files allowed in a image batch upload operation", + "code_default": 10, + "required": false, + "applies_when": null + }, + { + "name": "INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH", + "accepted_names": [ + "INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH" + ], + "group": "feature.indexing", + "type": "integer", + "description": "Maximum token length for text segmentation during indexing", + "code_default": 4000, + "required": false, + "applies_when": null + }, + { + "name": "INNER_API", + "accepted_names": [ + "INNER_API" + ], + "group": "feature.inner-a-p-i", + "type": "boolean", + "description": "Enable or disable the internal API", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "INNER_API_KEY", + "accepted_names": [ + "INNER_API_KEY" + ], + "group": "feature.inner-a-p-i", + "type": "string | null", + "description": "API key for accessing the internal API", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "INNER_API_KEY_FOR_PLUGIN", + "accepted_names": [ + "INNER_API_KEY_FOR_PLUGIN" + ], + "group": "feature.plugin", + "type": "string", + "description": "Inner api key for plugin", + "code_default": "inner-api-key", + "required": false, + "applies_when": null + }, + { + "name": "INTERNAL_FILES_URL", + "accepted_names": [ + "INTERNAL_FILES_URL" + ], + "group": "feature.file-access", + "type": "string", + "description": "Internal base URL for file access within Docker network, used for plugin daemon and internal service communication. Falls back to FILES_URL if not specified.", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "INVITE_EXPIRY_HOURS", + "accepted_names": [ + "INVITE_EXPIRY_HOURS" + ], + "group": "feature.workspace", + "type": "integer", + "description": "Expiration time in hours for workspace invitation links", + "code_default": 72, + "required": false, + "applies_when": null + }, + { + "name": "IRIS_CONNECTION_URL", + "accepted_names": [ + "IRIS_CONNECTION_URL" + ], + "group": "middleware.vdb.iris-vector", + "type": "string | null", + "description": "Full connection URL for IRIS (overrides individual fields if provided).", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_DATABASE", + "accepted_names": [ + "IRIS_DATABASE" + ], + "group": "middleware.vdb.iris-vector", + "type": "string | null", + "description": "Database namespace for IRIS connection.", + "code_default": "USER", + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_HOST", + "accepted_names": [ + "IRIS_HOST" + ], + "group": "middleware.vdb.iris-vector", + "type": "string | null", + "description": "Hostname or IP address of the IRIS server.", + "code_default": "localhost", + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_MAX_CONNECTION", + "accepted_names": [ + "IRIS_MAX_CONNECTION" + ], + "group": "middleware.vdb.iris-vector", + "type": "integer", + "description": "Maximum number of connections in the pool.", + "code_default": 3, + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_MIN_CONNECTION", + "accepted_names": [ + "IRIS_MIN_CONNECTION" + ], + "group": "middleware.vdb.iris-vector", + "type": "integer", + "description": "Minimum number of connections in the pool.", + "code_default": 1, + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_PASSWORD", + "accepted_names": [ + "IRIS_PASSWORD" + ], + "group": "middleware.vdb.iris-vector", + "type": "string | null", + "description": "Password for IRIS authentication.", + "code_default": "Dify@1234", + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_SCHEMA", + "accepted_names": [ + "IRIS_SCHEMA" + ], + "group": "middleware.vdb.iris-vector", + "type": "string | null", + "description": "Schema name for IRIS tables.", + "code_default": "dify", + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_SUPER_SERVER_PORT", + "accepted_names": [ + "IRIS_SUPER_SERVER_PORT" + ], + "group": "middleware.vdb.iris-vector", + "type": "typing.Annotated[int, Gt(gt=0)] | null", + "description": "Port number for IRIS connection.", + "code_default": 1972, + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_TEXT_INDEX", + "accepted_names": [ + "IRIS_TEXT_INDEX" + ], + "group": "middleware.vdb.iris-vector", + "type": "boolean", + "description": "Enable full-text search index using %iFind.Index.Basic.", + "code_default": true, + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_TEXT_INDEX_LANGUAGE", + "accepted_names": [ + "IRIS_TEXT_INDEX_LANGUAGE" + ], + "group": "middleware.vdb.iris-vector", + "type": "string", + "description": "Language for full-text search index (e.g., 'en', 'ja', 'zh', 'de').", + "code_default": "en", + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "IRIS_USER", + "accepted_names": [ + "IRIS_USER" + ], + "group": "middleware.vdb.iris-vector", + "type": "string | null", + "description": "Username for IRIS authentication.", + "code_default": "_SYSTEM", + "required": false, + "applies_when": "VECTOR_STORE=iris" + }, + { + "name": "KEYWORD_DATA_SOURCE_TYPE", + "accepted_names": [ + "KEYWORD_DATA_SOURCE_TYPE" + ], + "group": "feature.rag-etl", + "type": "string", + "description": "Data source type for keyword extraction ('database' or other supported types), default to 'database'", + "code_default": "database", + "required": false, + "applies_when": null + }, + { + "name": "KEYWORD_STORE", + "accepted_names": [ + "KEYWORD_STORE" + ], + "group": "middleware.keyword-store", + "type": "string", + "description": "Method for keyword extraction and storage. Default is 'jieba', a Chinese text segmentation library.", + "code_default": "jieba", + "required": false, + "applies_when": null + }, + { + "name": "LINDORM_DISTANCE_TYPE", + "accepted_names": [ + "LINDORM_DISTANCE_TYPE" + ], + "group": "middleware.vdb.lindorm", + "type": "string | null", + "description": "Vector Distance Type, support l2, cosinesimil, innerproduct", + "code_default": "l2", + "required": false, + "applies_when": "VECTOR_STORE=lindorm" + }, + { + "name": "LINDORM_INDEX_TYPE", + "accepted_names": [ + "LINDORM_INDEX_TYPE" + ], + "group": "middleware.vdb.lindorm", + "type": "string | null", + "description": "Lindorm Vector Index Type, hnsw or flat is available in dify", + "code_default": "hnsw", + "required": false, + "applies_when": "VECTOR_STORE=lindorm" + }, + { + "name": "LINDORM_PASSWORD", + "accepted_names": [ + "LINDORM_PASSWORD" + ], + "group": "middleware.vdb.lindorm", + "type": "string | null", + "description": "Lindorm password", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=lindorm" + }, + { + "name": "LINDORM_QUERY_TIMEOUT", + "accepted_names": [ + "LINDORM_QUERY_TIMEOUT" + ], + "group": "middleware.vdb.lindorm", + "type": "float | null", + "description": "The lindorm search request timeout (s)", + "code_default": 2.0, + "required": false, + "applies_when": "VECTOR_STORE=lindorm" + }, + { + "name": "LINDORM_URL", + "accepted_names": [ + "LINDORM_URL" + ], + "group": "middleware.vdb.lindorm", + "type": "string | null", + "description": "Lindorm url", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=lindorm" + }, + { + "name": "LINDORM_USERNAME", + "accepted_names": [ + "LINDORM_USERNAME" + ], + "group": "middleware.vdb.lindorm", + "type": "string | null", + "description": "Lindorm user", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=lindorm" + }, + { + "name": "LINDORM_USING_UGC", + "accepted_names": [ + "LINDORM_USING_UGC" + ], + "group": "middleware.vdb.lindorm", + "type": "boolean | null", + "description": "Using UGC index will store indexes with the same IndexType/Dimension in a single big index.", + "code_default": true, + "required": false, + "applies_when": "VECTOR_STORE=lindorm" + }, + { + "name": "LOGIN_DISABLED", + "accepted_names": [ + "LOGIN_DISABLED" + ], + "group": "feature.security", + "type": "boolean", + "description": "Whether to disable login checks", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "LOGIN_LOCKOUT_DURATION", + "accepted_names": [ + "LOGIN_LOCKOUT_DURATION" + ], + "group": "feature.auth", + "type": "integer", + "description": "Time (in seconds) a user must wait before retrying login after exceeding the rate limit.", + "code_default": 86400, + "required": false, + "applies_when": null + }, + { + "name": "LOG_DATEFORMAT", + "accepted_names": [ + "LOG_DATEFORMAT" + ], + "group": "feature.logging", + "type": "string | null", + "description": "Date format string for log timestamps", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "LOG_FILE", + "accepted_names": [ + "LOG_FILE" + ], + "group": "feature.logging", + "type": "string | null", + "description": "File path for log output.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "LOG_FILE_BACKUP_COUNT", + "accepted_names": [ + "LOG_FILE_BACKUP_COUNT" + ], + "group": "feature.logging", + "type": "integer", + "description": "Maximum file backup count file rotation retention", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "LOG_FILE_MAX_SIZE", + "accepted_names": [ + "LOG_FILE_MAX_SIZE" + ], + "group": "feature.logging", + "type": "integer", + "description": "Maximum file size for file rotation retention, the unit is megabytes (MB)", + "code_default": 20, + "required": false, + "applies_when": null + }, + { + "name": "LOG_FORMAT", + "accepted_names": [ + "LOG_FORMAT" + ], + "group": "feature.logging", + "type": "string", + "description": "Format string for log messages", + "code_default": "%(asctime)s.%(msecs)03d %(levelname)s [%(threadName)s] [%(filename)s:%(lineno)d] %(trace_id)s - %(message)s", + "required": false, + "applies_when": null + }, + { + "name": "LOG_LEVEL", + "accepted_names": [ + "LOG_LEVEL" + ], + "group": "feature.logging", + "type": "string", + "description": "Logging level, default to INFO. Set to ERROR for production environments.", + "code_default": "INFO", + "required": false, + "applies_when": null + }, + { + "name": "LOG_OUTPUT_FORMAT", + "accepted_names": [ + "LOG_OUTPUT_FORMAT" + ], + "group": "feature.logging", + "type": "literal['text', 'json']", + "description": "Log output format: 'text' for human-readable, 'json' for structured JSON logs.", + "code_default": "text", + "required": false, + "applies_when": null + }, + { + "name": "LOG_TZ", + "accepted_names": [ + "LOG_TZ" + ], + "group": "feature.logging", + "type": "string | null", + "description": "Timezone for log timestamps (e.g., 'America/New_York')", + "code_default": "UTC", + "required": false, + "applies_when": null + }, + { + "name": "MAIL_DEFAULT_SEND_FROM", + "accepted_names": [ + "MAIL_DEFAULT_SEND_FROM" + ], + "group": "feature.mail", + "type": "string | null", + "description": "Default email address to use as the sender", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "MAIL_TEMPLATING_MODE", + "accepted_names": [ + "MAIL_TEMPLATING_MODE" + ], + "group": "feature.mail", + "type": "enum", + "description": "Template mode for email services", + "code_default": "sandbox", + "required": false, + "applies_when": null + }, + { + "name": "MAIL_TEMPLATING_TIMEOUT", + "accepted_names": [ + "MAIL_TEMPLATING_TIMEOUT" + ], + "group": "feature.mail", + "type": "integer", + "description": "\n Timeout for email templating in seconds. Used to prevent infinite loops in malicious templates.\n Only available in sandbox mode.", + "code_default": 3, + "required": false, + "applies_when": null + }, + { + "name": "MAIL_TYPE", + "accepted_names": [ + "MAIL_TYPE" + ], + "group": "feature.mail", + "type": "string | null", + "description": "Email service provider type ('smtp' or 'resend' or 'sendGrid), default to None.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "MARKETPLACE_API_URL", + "accepted_names": [ + "MARKETPLACE_API_URL" + ], + "group": "feature.marketplace", + "type": "HttpUrl", + "description": "Marketplace API URL", + "code_default": "https://marketplace.dify.ai/", + "required": false, + "applies_when": null + }, + { + "name": "MARKETPLACE_ENABLED", + "accepted_names": [ + "MARKETPLACE_ENABLED" + ], + "group": "feature.marketplace", + "type": "boolean", + "description": "Enable or disable marketplace", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "MATRIXONE_DATABASE", + "accepted_names": [ + "MATRIXONE_DATABASE" + ], + "group": "middleware.vdb.matrixone", + "type": "string", + "description": "Name of the Matrixone database to connect to", + "code_default": "dify", + "required": false, + "applies_when": "VECTOR_STORE=matrixone" + }, + { + "name": "MATRIXONE_HOST", + "accepted_names": [ + "MATRIXONE_HOST" + ], + "group": "middleware.vdb.matrixone", + "type": "string", + "description": "Host address of the Matrixone server", + "code_default": "localhost", + "required": false, + "applies_when": "VECTOR_STORE=matrixone" + }, + { + "name": "MATRIXONE_METRIC", + "accepted_names": [ + "MATRIXONE_METRIC" + ], + "group": "middleware.vdb.matrixone", + "type": "string", + "description": "Distance metric type for vector similarity search (cosine or l2)", + "code_default": "l2", + "required": false, + "applies_when": "VECTOR_STORE=matrixone" + }, + { + "name": "MATRIXONE_PASSWORD", + "accepted_names": [ + "MATRIXONE_PASSWORD" + ], + "group": "middleware.vdb.matrixone", + "type": "string", + "description": "Password for authenticating with Matrixone", + "code_default": "111", + "required": false, + "applies_when": "VECTOR_STORE=matrixone" + }, + { + "name": "MATRIXONE_PORT", + "accepted_names": [ + "MATRIXONE_PORT" + ], + "group": "middleware.vdb.matrixone", + "type": "integer", + "description": "Port number of the Matrixone server", + "code_default": 6001, + "required": false, + "applies_when": "VECTOR_STORE=matrixone" + }, + { + "name": "MATRIXONE_USER", + "accepted_names": [ + "MATRIXONE_USER" + ], + "group": "middleware.vdb.matrixone", + "type": "string", + "description": "Username for authenticating with Matrixone", + "code_default": "dump", + "required": false, + "applies_when": "VECTOR_STORE=matrixone" + }, + { + "name": "MAX_SUBMIT_COUNT", + "accepted_names": [ + "MAX_SUBMIT_COUNT" + ], + "group": "feature.workflow-node-execution", + "type": "integer", + "description": "Maximum number of submitted thread count in a ThreadPool for parallel node execution", + "code_default": 100, + "required": false, + "applies_when": null + }, + { + "name": "MAX_VARIABLE_SIZE", + "accepted_names": [ + "MAX_VARIABLE_SIZE" + ], + "group": "feature.workflow", + "type": "integer", + "description": "Maximum size in bytes for a single variable in workflows. Default to 200 KB.", + "code_default": 204800, + "required": false, + "applies_when": null + }, + { + "name": "MILVUS_ANALYZER_PARAMS", + "accepted_names": [ + "MILVUS_ANALYZER_PARAMS" + ], + "group": "middleware.vdb.milvus", + "type": "string | null", + "description": "Milvus text analyzer parameters, e.g., {\"type\": \"chinese\"} for Chinese segmentation support.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=milvus" + }, + { + "name": "MILVUS_DATABASE", + "accepted_names": [ + "MILVUS_DATABASE" + ], + "group": "middleware.vdb.milvus", + "type": "string", + "description": "Name of the Milvus database to connect to (default is 'default')", + "code_default": "default", + "required": false, + "applies_when": "VECTOR_STORE=milvus" + }, + { + "name": "MILVUS_ENABLE_HYBRID_SEARCH", + "accepted_names": [ + "MILVUS_ENABLE_HYBRID_SEARCH" + ], + "group": "middleware.vdb.milvus", + "type": "boolean", + "description": "Enable hybrid search features (requires Milvus >= 2.5.0). Set to false for compatibility with older versions", + "code_default": true, + "required": false, + "applies_when": "VECTOR_STORE=milvus" + }, + { + "name": "MILVUS_PASSWORD", + "accepted_names": [ + "MILVUS_PASSWORD" + ], + "group": "middleware.vdb.milvus", + "type": "string | null", + "description": "Password for authenticating with Milvus, if username/password authentication is enabled", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=milvus" + }, + { + "name": "MILVUS_TOKEN", + "accepted_names": [ + "MILVUS_TOKEN" + ], + "group": "middleware.vdb.milvus", + "type": "string | null", + "description": "Authentication token for Milvus, if token-based authentication is enabled", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=milvus" + }, + { + "name": "MILVUS_URI", + "accepted_names": [ + "MILVUS_URI" + ], + "group": "middleware.vdb.milvus", + "type": "string | null", + "description": "URI for connecting to the Milvus server (e.g., 'http://localhost:19530' or 'https://milvus-instance.example.com:19530')", + "code_default": "http://127.0.0.1:19530", + "required": false, + "applies_when": "VECTOR_STORE=milvus" + }, + { + "name": "MILVUS_USER", + "accepted_names": [ + "MILVUS_USER" + ], + "group": "middleware.vdb.milvus", + "type": "string | null", + "description": "Username for authenticating with Milvus, if username/password authentication is enabled", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=milvus" + }, + { + "name": "MODEL_LB_ENABLED", + "accepted_names": [ + "MODEL_LB_ENABLED" + ], + "group": "feature.model-load-balance", + "type": "boolean", + "description": "Enable or disable load balancing for models", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "MODERATION_BUFFER_SIZE", + "accepted_names": [ + "MODERATION_BUFFER_SIZE" + ], + "group": "feature.moderation", + "type": "integer", + "description": "Size of the buffer for content moderation processing", + "code_default": 300, + "required": false, + "applies_when": null + }, + { + "name": "MULTIMODAL_SEND_FORMAT", + "accepted_names": [ + "MULTIMODAL_SEND_FORMAT" + ], + "group": "feature.multi-modal-transfer", + "type": "literal['base64', 'url']", + "description": "Format for sending files in multimodal contexts ('base64' or 'url'), default is base64", + "code_default": "base64", + "required": false, + "applies_when": null + }, + { + "name": "MYSCALE_DATABASE", + "accepted_names": [ + "MYSCALE_DATABASE" + ], + "group": "middleware.vdb.my-scale", + "type": "string", + "description": "Name of the MyScale database to connect to (default is 'default')", + "code_default": "default", + "required": false, + "applies_when": "VECTOR_STORE=myscale" + }, + { + "name": "MYSCALE_FTS_PARAMS", + "accepted_names": [ + "MYSCALE_FTS_PARAMS" + ], + "group": "middleware.vdb.my-scale", + "type": "string", + "description": "Additional parameters for MyScale Full Text Search index)", + "code_default": "", + "required": false, + "applies_when": "VECTOR_STORE=myscale" + }, + { + "name": "MYSCALE_HOST", + "accepted_names": [ + "MYSCALE_HOST" + ], + "group": "middleware.vdb.my-scale", + "type": "string", + "description": "Hostname or IP address of the MyScale server (e.g., 'localhost' or 'myscale.example.com')", + "code_default": "localhost", + "required": false, + "applies_when": "VECTOR_STORE=myscale" + }, + { + "name": "MYSCALE_PASSWORD", + "accepted_names": [ + "MYSCALE_PASSWORD" + ], + "group": "middleware.vdb.my-scale", + "type": "string", + "description": "Password for authenticating with MyScale (default is an empty string)", + "code_default": "", + "required": false, + "applies_when": "VECTOR_STORE=myscale" + }, + { + "name": "MYSCALE_PORT", + "accepted_names": [ + "MYSCALE_PORT" + ], + "group": "middleware.vdb.my-scale", + "type": "integer", + "description": "Port number on which the MyScale server is listening (default is 8123)", + "code_default": 8123, + "required": false, + "applies_when": "VECTOR_STORE=myscale" + }, + { + "name": "MYSCALE_USER", + "accepted_names": [ + "MYSCALE_USER" + ], + "group": "middleware.vdb.my-scale", + "type": "string", + "description": "Username for authenticating with MyScale (default is 'default')", + "code_default": "default", + "required": false, + "applies_when": "VECTOR_STORE=myscale" + }, + { + "name": "NOTION_CLIENT_ID", + "accepted_names": [ + "NOTION_CLIENT_ID" + ], + "group": "extra.notion", + "type": "string | null", + "description": "Client ID for Notion API authentication. Required for OAuth 2.0 flow.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "NOTION_CLIENT_SECRET", + "accepted_names": [ + "NOTION_CLIENT_SECRET" + ], + "group": "extra.notion", + "type": "string | null", + "description": "Client secret for Notion API authentication. Required for OAuth 2.0 flow.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "NOTION_INTEGRATION_TOKEN", + "accepted_names": [ + "NOTION_INTEGRATION_TOKEN" + ], + "group": "extra.notion", + "type": "string | null", + "description": "Integration token for Notion API access. Used for direct API calls without OAuth flow.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "NOTION_INTEGRATION_TYPE", + "accepted_names": [ + "NOTION_INTEGRATION_TYPE" + ], + "group": "extra.notion", + "type": "string | null", + "description": "Type of Notion integration. Set to 'internal' for internal integrations, or None for public integrations.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "NOTION_INTERNAL_SECRET", + "accepted_names": [ + "NOTION_INTERNAL_SECRET" + ], + "group": "extra.notion", + "type": "string | null", + "description": "Secret key for internal Notion integrations. Required when NOTION_INTEGRATION_TYPE is 'internal'.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "OAUTH_REDIRECT_PATH", + "accepted_names": [ + "OAUTH_REDIRECT_PATH" + ], + "group": "feature.auth", + "type": "string", + "description": "Redirect path for OAuth authentication callbacks", + "code_default": "/console/api/oauth/authorize", + "required": false, + "applies_when": null + }, + { + "name": "OCEANBASE_ENABLE_HYBRID_SEARCH", + "accepted_names": [ + "OCEANBASE_ENABLE_HYBRID_SEARCH" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "boolean", + "description": "Enable hybrid search features (requires OceanBase >= 4.3.5.1). Set to false for compatibility with older versions", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_FULLTEXT_PARSER", + "accepted_names": [ + "OCEANBASE_FULLTEXT_PARSER" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "string | null", + "description": "Fulltext parser to use for text indexing. Built-in options: 'ngram' (N-gram tokenizer for English/numbers), 'beng' (Basic English tokenizer), 'space' (Space-based tokenizer), 'ngram2' (Improved N-gram tokenizer), 'ik' (Chinese tokenizer). External plugins (require installation): 'japanese_ftparser' (Japanese tokenizer), 'thai_ftparser' (Thai tokenizer). Default is 'ik'", + "code_default": "ik", + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_HNSW_EF_CONSTRUCTION", + "accepted_names": [ + "OCEANBASE_HNSW_EF_CONSTRUCTION" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "integer", + "description": "HNSW efConstruction parameter (index build-time search width)", + "code_default": 256, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_HNSW_EF_SEARCH", + "accepted_names": [ + "OCEANBASE_HNSW_EF_SEARCH" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "integer", + "description": "HNSW efSearch parameter (query-time search width, -1 uses server default)", + "code_default": -1, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_HNSW_M", + "accepted_names": [ + "OCEANBASE_HNSW_M" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "integer", + "description": "HNSW M parameter (max number of connections per node)", + "code_default": 16, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_HNSW_REFRESH_THRESHOLD", + "accepted_names": [ + "OCEANBASE_HNSW_REFRESH_THRESHOLD" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "integer", + "description": "Minimum number of inserted documents to trigger an automatic HNSW index refresh (0 to disable)", + "code_default": 1000, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_BATCH_SIZE", + "accepted_names": [ + "OCEANBASE_VECTOR_BATCH_SIZE" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "integer", + "description": "Number of documents to insert per batch", + "code_default": 100, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_DATABASE", + "accepted_names": [ + "OCEANBASE_VECTOR_DATABASE" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "string | null", + "description": "Name of the OceanBase Vector database to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_HOST", + "accepted_names": [ + "OCEANBASE_VECTOR_HOST" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "string | null", + "description": "Hostname or IP address of the OceanBase Vector server (e.g. 'localhost')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_MAX_OVERFLOW", + "accepted_names": [ + "OCEANBASE_VECTOR_MAX_OVERFLOW" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "integer", + "description": "SQLAlchemy connection pool max overflow connections", + "code_default": 10, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_METRIC_TYPE", + "accepted_names": [ + "OCEANBASE_VECTOR_METRIC_TYPE" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "literal['l2', 'cosine', 'inner_product']", + "description": "Distance metric type for vector index: l2, cosine, or inner_product", + "code_default": "l2", + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_PASSWORD", + "accepted_names": [ + "OCEANBASE_VECTOR_PASSWORD" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "string | null", + "description": "Password for authenticating with the OceanBase Vector database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_POOL_SIZE", + "accepted_names": [ + "OCEANBASE_VECTOR_POOL_SIZE" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "integer", + "description": "SQLAlchemy connection pool size", + "code_default": 5, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_PORT", + "accepted_names": [ + "OCEANBASE_VECTOR_PORT" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "typing.Annotated[int, Gt(gt=0)] | null", + "description": "Port number on which the OceanBase Vector server is listening (default is 2881)", + "code_default": 2881, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCEANBASE_VECTOR_USER", + "accepted_names": [ + "OCEANBASE_VECTOR_USER" + ], + "group": "middleware.vdb.ocean-base-vector", + "type": "string | null", + "description": "Username for authenticating with the OceanBase Vector database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oceanbase" + }, + { + "name": "OCI_ACCESS_KEY", + "accepted_names": [ + "OCI_ACCESS_KEY" + ], + "group": "middleware.storage.o-c-i-storage", + "type": "string | null", + "description": "Access key (also known as API key) for authenticating with OCI Object Storage", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=oci-storage" + }, + { + "name": "OCI_BUCKET_NAME", + "accepted_names": [ + "OCI_BUCKET_NAME" + ], + "group": "middleware.storage.o-c-i-storage", + "type": "string | null", + "description": "Name of the OCI Object Storage bucket to store and retrieve objects (e.g., 'my-oci-bucket')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=oci-storage" + }, + { + "name": "OCI_ENDPOINT", + "accepted_names": [ + "OCI_ENDPOINT" + ], + "group": "middleware.storage.o-c-i-storage", + "type": "string | null", + "description": "URL of the OCI Object Storage endpoint (e.g., 'https://objectstorage.us-phoenix-1.oraclecloud.com')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=oci-storage" + }, + { + "name": "OCI_REGION", + "accepted_names": [ + "OCI_REGION" + ], + "group": "middleware.storage.o-c-i-storage", + "type": "string | null", + "description": "OCI region where the bucket is located (e.g., 'us-phoenix-1')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=oci-storage" + }, + { + "name": "OCI_SECRET_KEY", + "accepted_names": [ + "OCI_SECRET_KEY" + ], + "group": "middleware.storage.o-c-i-storage", + "type": "string | null", + "description": "Secret key associated with the access key for authenticating with OCI Object Storage", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=oci-storage" + }, + { + "name": "OPENDAL_SCHEME", + "accepted_names": [ + "OPENDAL_SCHEME" + ], + "group": "middleware.storage.open-d-a-l-storage", + "type": "string", + "description": "OpenDAL scheme.", + "code_default": "fs", + "required": false, + "applies_when": "STORAGE_TYPE=opendal" + }, + { + "name": "OPENGAUSS_DATABASE", + "accepted_names": [ + "OPENGAUSS_DATABASE" + ], + "group": "middleware.vdb.open-gauss", + "type": "string | null", + "description": "Name of the OpenGauss database to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opengauss" + }, + { + "name": "OPENGAUSS_ENABLE_PQ", + "accepted_names": [ + "OPENGAUSS_ENABLE_PQ" + ], + "group": "middleware.vdb.open-gauss", + "type": "boolean", + "description": "Enable openGauss PQ acceleration feature", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=opengauss" + }, + { + "name": "OPENGAUSS_HOST", + "accepted_names": [ + "OPENGAUSS_HOST" + ], + "group": "middleware.vdb.open-gauss", + "type": "string | null", + "description": "Hostname or IP address of the OpenGauss server(e.g., 'localhost')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opengauss" + }, + { + "name": "OPENGAUSS_MAX_CONNECTION", + "accepted_names": [ + "OPENGAUSS_MAX_CONNECTION" + ], + "group": "middleware.vdb.open-gauss", + "type": "integer", + "description": "Max connection of the OpenGauss database", + "code_default": 5, + "required": false, + "applies_when": "VECTOR_STORE=opengauss" + }, + { + "name": "OPENGAUSS_MIN_CONNECTION", + "accepted_names": [ + "OPENGAUSS_MIN_CONNECTION" + ], + "group": "middleware.vdb.open-gauss", + "type": "integer", + "description": "Min connection of the OpenGauss database", + "code_default": 1, + "required": false, + "applies_when": "VECTOR_STORE=opengauss" + }, + { + "name": "OPENGAUSS_PASSWORD", + "accepted_names": [ + "OPENGAUSS_PASSWORD" + ], + "group": "middleware.vdb.open-gauss", + "type": "string | null", + "description": "Password for authenticating with the OpenGauss database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opengauss" + }, + { + "name": "OPENGAUSS_PORT", + "accepted_names": [ + "OPENGAUSS_PORT" + ], + "group": "middleware.vdb.open-gauss", + "type": "integer", + "description": "Port number on which the OpenGauss server is listening (default is 6600)", + "code_default": 6600, + "required": false, + "applies_when": "VECTOR_STORE=opengauss" + }, + { + "name": "OPENGAUSS_USER", + "accepted_names": [ + "OPENGAUSS_USER" + ], + "group": "middleware.vdb.open-gauss", + "type": "string | null", + "description": "Username for authenticating with the OpenGauss database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opengauss" + }, + { + "name": "OPENSEARCH_AUTH_METHOD", + "accepted_names": [ + "OPENSEARCH_AUTH_METHOD" + ], + "group": "middleware.vdb.open-search", + "type": "enum", + "description": "Authentication method for OpenSearch connection (default is 'basic')", + "code_default": "basic", + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "OPENSEARCH_AWS_REGION", + "accepted_names": [ + "OPENSEARCH_AWS_REGION" + ], + "group": "middleware.vdb.open-search", + "type": "string | null", + "description": "AWS region for OpenSearch (e.g. 'us-west-2')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "OPENSEARCH_AWS_SERVICE", + "accepted_names": [ + "OPENSEARCH_AWS_SERVICE" + ], + "group": "middleware.vdb.open-search", + "type": "literal['es', 'aoss'] | null", + "description": "AWS service for OpenSearch (e.g. 'aoss' for OpenSearch Serverless)", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "OPENSEARCH_HOST", + "accepted_names": [ + "OPENSEARCH_HOST" + ], + "group": "middleware.vdb.open-search", + "type": "string | null", + "description": "Hostname or IP address of the OpenSearch server (e.g., 'localhost' or 'opensearch.example.com')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "OPENSEARCH_PASSWORD", + "accepted_names": [ + "OPENSEARCH_PASSWORD" + ], + "group": "middleware.vdb.open-search", + "type": "string | null", + "description": "Password for authenticating with OpenSearch", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "OPENSEARCH_PORT", + "accepted_names": [ + "OPENSEARCH_PORT" + ], + "group": "middleware.vdb.open-search", + "type": "integer", + "description": "Port number on which the OpenSearch server is listening (default is 9200)", + "code_default": 9200, + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "OPENSEARCH_SECURE", + "accepted_names": [ + "OPENSEARCH_SECURE" + ], + "group": "middleware.vdb.open-search", + "type": "boolean", + "description": "Whether to use SSL/TLS encrypted connection for OpenSearch (True for HTTPS, False for HTTP)", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "OPENSEARCH_USER", + "accepted_names": [ + "OPENSEARCH_USER" + ], + "group": "middleware.vdb.open-search", + "type": "string | null", + "description": "Username for authenticating with OpenSearch", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "OPENSEARCH_VERIFY_CERTS", + "accepted_names": [ + "OPENSEARCH_VERIFY_CERTS" + ], + "group": "middleware.vdb.open-search", + "type": "boolean", + "description": "Whether to verify SSL certificates for HTTPS connections (recommended to set True in production)", + "code_default": true, + "required": false, + "applies_when": "VECTOR_STORE=opensearch" + }, + { + "name": "ORACLE_CONFIG_DIR", + "accepted_names": [ + "ORACLE_CONFIG_DIR" + ], + "group": "middleware.vdb.oracle", + "type": "string | null", + "description": "Directory containing the tnsnames.ora configuration file. Only used in thin mode connection", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oracle" + }, + { + "name": "ORACLE_DSN", + "accepted_names": [ + "ORACLE_DSN" + ], + "group": "middleware.vdb.oracle", + "type": "string | null", + "description": "Oracle database connection string. For traditional database, use format 'host:port/service_name'. For autonomous database, use the service name from tnsnames.ora in the wallet", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oracle" + }, + { + "name": "ORACLE_IS_AUTONOMOUS", + "accepted_names": [ + "ORACLE_IS_AUTONOMOUS" + ], + "group": "middleware.vdb.oracle", + "type": "boolean", + "description": "Flag indicating whether connecting to Oracle Autonomous Database", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=oracle" + }, + { + "name": "ORACLE_PASSWORD", + "accepted_names": [ + "ORACLE_PASSWORD" + ], + "group": "middleware.vdb.oracle", + "type": "string | null", + "description": "Password for authenticating with the Oracle database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oracle" + }, + { + "name": "ORACLE_USER", + "accepted_names": [ + "ORACLE_USER" + ], + "group": "middleware.vdb.oracle", + "type": "string | null", + "description": "Username for authenticating with the Oracle database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oracle" + }, + { + "name": "ORACLE_WALLET_LOCATION", + "accepted_names": [ + "ORACLE_WALLET_LOCATION" + ], + "group": "middleware.vdb.oracle", + "type": "string | null", + "description": "Oracle wallet directory path containing the wallet files for secure connection", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oracle" + }, + { + "name": "ORACLE_WALLET_PASSWORD", + "accepted_names": [ + "ORACLE_WALLET_PASSWORD" + ], + "group": "middleware.vdb.oracle", + "type": "string | null", + "description": "Password to decrypt the Oracle wallet, if it is encrypted", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=oracle" + }, + { + "name": "OTEL_BATCH_EXPORT_SCHEDULE_DELAY", + "accepted_names": [ + "OTEL_BATCH_EXPORT_SCHEDULE_DELAY" + ], + "group": "observability.otel.o-tel", + "type": "integer", + "description": "Batch export schedule delay in milliseconds", + "code_default": 5000, + "required": false, + "applies_when": null + }, + { + "name": "OTEL_BATCH_EXPORT_TIMEOUT", + "accepted_names": [ + "OTEL_BATCH_EXPORT_TIMEOUT" + ], + "group": "observability.otel.o-tel", + "type": "integer", + "description": "Batch export timeout in milliseconds", + "code_default": 10000, + "required": false, + "applies_when": null + }, + { + "name": "OTEL_EXPORTER_OTLP_PROTOCOL", + "accepted_names": [ + "OTEL_EXPORTER_OTLP_PROTOCOL" + ], + "group": "observability.otel.o-tel", + "type": "string", + "description": "OTLP exporter protocol ('grpc' or 'http')", + "code_default": "http", + "required": false, + "applies_when": null + }, + { + "name": "OTEL_EXPORTER_TYPE", + "accepted_names": [ + "OTEL_EXPORTER_TYPE" + ], + "group": "observability.otel.o-tel", + "type": "string", + "description": "OTEL exporter type", + "code_default": "otlp", + "required": false, + "applies_when": null + }, + { + "name": "OTEL_MAX_EXPORT_BATCH_SIZE", + "accepted_names": [ + "OTEL_MAX_EXPORT_BATCH_SIZE" + ], + "group": "observability.otel.o-tel", + "type": "integer", + "description": "Maximum export batch size", + "code_default": 512, + "required": false, + "applies_when": null + }, + { + "name": "OTEL_MAX_QUEUE_SIZE", + "accepted_names": [ + "OTEL_MAX_QUEUE_SIZE" + ], + "group": "observability.otel.o-tel", + "type": "integer", + "description": "Maximum queue size for the batch span processor", + "code_default": 2048, + "required": false, + "applies_when": null + }, + { + "name": "OTEL_METRIC_EXPORT_INTERVAL", + "accepted_names": [ + "OTEL_METRIC_EXPORT_INTERVAL" + ], + "group": "observability.otel.o-tel", + "type": "integer", + "description": "Metric export interval in milliseconds", + "code_default": 60000, + "required": false, + "applies_when": null + }, + { + "name": "OTEL_METRIC_EXPORT_TIMEOUT", + "accepted_names": [ + "OTEL_METRIC_EXPORT_TIMEOUT" + ], + "group": "observability.otel.o-tel", + "type": "integer", + "description": "Metric export timeout in milliseconds", + "code_default": 30000, + "required": false, + "applies_when": null + }, + { + "name": "OTEL_SAMPLING_RATE", + "accepted_names": [ + "OTEL_SAMPLING_RATE" + ], + "group": "observability.otel.o-tel", + "type": "float", + "description": "Sampling rate for traces (0.0 to 1.0)", + "code_default": 0.1, + "required": false, + "applies_when": null + }, + { + "name": "OTLP_API_KEY", + "accepted_names": [ + "OTLP_API_KEY" + ], + "group": "observability.otel.o-tel", + "type": "string", + "description": "OTLP API key", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "OTLP_BASE_ENDPOINT", + "accepted_names": [ + "OTLP_BASE_ENDPOINT" + ], + "group": "observability.otel.o-tel", + "type": "string", + "description": "OTLP base endpoint", + "code_default": "http://localhost:4318", + "required": false, + "applies_when": null + }, + { + "name": "OTLP_METRIC_ENDPOINT", + "accepted_names": [ + "OTLP_METRIC_ENDPOINT" + ], + "group": "observability.otel.o-tel", + "type": "string", + "description": "OTLP metric endpoint", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "OTLP_TRACE_ENDPOINT", + "accepted_names": [ + "OTLP_TRACE_ENDPOINT" + ], + "group": "observability.otel.o-tel", + "type": "string", + "description": "OTLP trace endpoint", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "OWNER_TRANSFER_LOCKOUT_DURATION", + "accepted_names": [ + "OWNER_TRANSFER_LOCKOUT_DURATION" + ], + "group": "feature.auth", + "type": "integer", + "description": "Time (in seconds) a user must wait before retrying owner transfer after exceeding the rate limit.", + "code_default": 86400, + "required": false, + "applies_when": null + }, + { + "name": "OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES", + "accepted_names": [ + "OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES" + ], + "group": "feature.security", + "type": "integer", + "description": "Duration in minutes for which a owner transfer token remains valid", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "PGVECTOR_DATABASE", + "accepted_names": [ + "PGVECTOR_DATABASE" + ], + "group": "middleware.vdb.p-g-vector", + "type": "string | null", + "description": "Name of the PostgreSQL database to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=pgvector" + }, + { + "name": "PGVECTOR_HOST", + "accepted_names": [ + "PGVECTOR_HOST" + ], + "group": "middleware.vdb.p-g-vector", + "type": "string | null", + "description": "Hostname or IP address of the PostgreSQL server with PGVector extension (e.g., 'localhost')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=pgvector" + }, + { + "name": "PGVECTOR_MAX_CONNECTION", + "accepted_names": [ + "PGVECTOR_MAX_CONNECTION" + ], + "group": "middleware.vdb.p-g-vector", + "type": "integer", + "description": "Max connection of the PostgreSQL database", + "code_default": 5, + "required": false, + "applies_when": "VECTOR_STORE=pgvector" + }, + { + "name": "PGVECTOR_MIN_CONNECTION", + "accepted_names": [ + "PGVECTOR_MIN_CONNECTION" + ], + "group": "middleware.vdb.p-g-vector", + "type": "integer", + "description": "Min connection of the PostgreSQL database", + "code_default": 1, + "required": false, + "applies_when": "VECTOR_STORE=pgvector" + }, + { + "name": "PGVECTOR_PASSWORD", + "accepted_names": [ + "PGVECTOR_PASSWORD" + ], + "group": "middleware.vdb.p-g-vector", + "type": "string | null", + "description": "Password for authenticating with the PostgreSQL database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=pgvector" + }, + { + "name": "PGVECTOR_PG_BIGM", + "accepted_names": [ + "PGVECTOR_PG_BIGM" + ], + "group": "middleware.vdb.p-g-vector", + "type": "boolean", + "description": "Whether to use pg_bigm module for full text search", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=pgvector" + }, + { + "name": "PGVECTOR_PORT", + "accepted_names": [ + "PGVECTOR_PORT" + ], + "group": "middleware.vdb.p-g-vector", + "type": "integer", + "description": "Port number on which the PostgreSQL server is listening (default is 5433)", + "code_default": 5433, + "required": false, + "applies_when": "VECTOR_STORE=pgvector" + }, + { + "name": "PGVECTOR_USER", + "accepted_names": [ + "PGVECTOR_USER" + ], + "group": "middleware.vdb.p-g-vector", + "type": "string | null", + "description": "Username for authenticating with the PostgreSQL database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=pgvector" + }, + { + "name": "PGVECTO_RS_DATABASE", + "accepted_names": [ + "PGVECTO_RS_DATABASE" + ], + "group": "middleware.vdb.p-g-vecto-r-s", + "type": "string | null", + "description": "Name of the PostgreSQL database with PGVecto.RS extension to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=pgvectors" + }, + { + "name": "PGVECTO_RS_HOST", + "accepted_names": [ + "PGVECTO_RS_HOST" + ], + "group": "middleware.vdb.p-g-vecto-r-s", + "type": "string | null", + "description": "Hostname or IP address of the PostgreSQL server with PGVecto.RS extension (e.g., 'localhost')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=pgvectors" + }, + { + "name": "PGVECTO_RS_PASSWORD", + "accepted_names": [ + "PGVECTO_RS_PASSWORD" + ], + "group": "middleware.vdb.p-g-vecto-r-s", + "type": "string | null", + "description": "Password for authenticating with the PostgreSQL database using PGVecto.RS", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=pgvectors" + }, + { + "name": "PGVECTO_RS_PORT", + "accepted_names": [ + "PGVECTO_RS_PORT" + ], + "group": "middleware.vdb.p-g-vecto-r-s", + "type": "integer", + "description": "Port number on which the PostgreSQL server with PGVecto.RS is listening (default is 5431)", + "code_default": 5431, + "required": false, + "applies_when": "VECTOR_STORE=pgvectors" + }, + { + "name": "PGVECTO_RS_USER", + "accepted_names": [ + "PGVECTO_RS_USER" + ], + "group": "middleware.vdb.p-g-vecto-r-s", + "type": "string | null", + "description": "Username for authenticating with the PostgreSQL database using PGVecto.RS", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=pgvectors" + }, + { + "name": "PLAN_PRO_CLEAN_DAY_SETTING", + "accepted_names": [ + "PLAN_PRO_CLEAN_DAY_SETTING" + ], + "group": "feature.data-set", + "type": "integer", + "description": "Interval in days for dataset cleanup operations - plan: pro and team", + "code_default": 7, + "required": false, + "applies_when": null + }, + { + "name": "PLAN_SANDBOX_CLEAN_DAY_SETTING", + "accepted_names": [ + "PLAN_SANDBOX_CLEAN_DAY_SETTING" + ], + "group": "feature.data-set", + "type": "integer", + "description": "Interval in days for dataset cleanup operations - plan: sandbox", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "PLAN_SANDBOX_CLEAN_MESSAGE_DAY_SETTING", + "accepted_names": [ + "PLAN_SANDBOX_CLEAN_MESSAGE_DAY_SETTING" + ], + "group": "feature.data-set", + "type": "integer", + "description": "Interval in days for message cleanup operations - plan: sandbox", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_BASED_TOKEN_COUNTING_ENABLED", + "accepted_names": [ + "PLUGIN_BASED_TOKEN_COUNTING_ENABLED" + ], + "group": "feature.model-load-balance", + "type": "boolean", + "description": "Enable or disable plugin based token counting. If disabled, token counting will return 0.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_DAEMON_KEY", + "accepted_names": [ + "PLUGIN_DAEMON_KEY" + ], + "group": "feature.plugin", + "type": "string", + "description": "Plugin API key", + "code_default": "plugin-api-key", + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_DAEMON_TIMEOUT", + "accepted_names": [ + "PLUGIN_DAEMON_TIMEOUT" + ], + "group": "feature.plugin", + "type": "typing.Annotated[float, Gt(gt=0)] | null", + "description": "Timeout in seconds for requests to the plugin daemon (set to None to disable)", + "code_default": 600.0, + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_DAEMON_URL", + "accepted_names": [ + "PLUGIN_DAEMON_URL" + ], + "group": "feature.plugin", + "type": "HttpUrl", + "description": "Plugin API URL", + "code_default": "http://localhost:5002/", + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_MAX_BUNDLE_SIZE", + "accepted_names": [ + "PLUGIN_MAX_BUNDLE_SIZE" + ], + "group": "feature.plugin", + "type": "integer", + "description": "Maximum allowed size for plugin bundles in bytes", + "code_default": 188743680, + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_MAX_FILE_SIZE", + "accepted_names": [ + "PLUGIN_MAX_FILE_SIZE" + ], + "group": "feature.plugin", + "type": "integer", + "description": "Maximum allowed size (bytes) for plugin-generated files", + "code_default": 52428800, + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_MAX_PACKAGE_SIZE", + "accepted_names": [ + "PLUGIN_MAX_PACKAGE_SIZE" + ], + "group": "feature.plugin", + "type": "integer", + "description": "Maximum allowed size for plugin packages in bytes", + "code_default": 15728640, + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_MODEL_SCHEMA_CACHE_TTL", + "accepted_names": [ + "PLUGIN_MODEL_SCHEMA_CACHE_TTL" + ], + "group": "feature.plugin", + "type": "integer", + "description": "TTL in seconds for caching plugin model schemas in Redis", + "code_default": 3600, + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_REMOTE_INSTALL_HOST", + "accepted_names": [ + "PLUGIN_REMOTE_INSTALL_HOST" + ], + "group": "feature.plugin", + "type": "string", + "description": "Plugin Remote Install Host", + "code_default": "localhost", + "required": false, + "applies_when": null + }, + { + "name": "PLUGIN_REMOTE_INSTALL_PORT", + "accepted_names": [ + "PLUGIN_REMOTE_INSTALL_PORT" + ], + "group": "feature.plugin", + "type": "integer", + "description": "Plugin Remote Install Port", + "code_default": 5003, + "required": false, + "applies_when": null + }, + { + "name": "POSITION_PROVIDER_EXCLUDES", + "accepted_names": [ + "POSITION_PROVIDER_EXCLUDES" + ], + "group": "feature.position", + "type": "string", + "description": "Comma-separated list of excluded model providers", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "POSITION_PROVIDER_INCLUDES", + "accepted_names": [ + "POSITION_PROVIDER_INCLUDES" + ], + "group": "feature.position", + "type": "string", + "description": "Comma-separated list of included model providers", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "POSITION_PROVIDER_PINS", + "accepted_names": [ + "POSITION_PROVIDER_PINS" + ], + "group": "feature.position", + "type": "string", + "description": "Comma-separated list of pinned model providers", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "POSITION_TOOL_EXCLUDES", + "accepted_names": [ + "POSITION_TOOL_EXCLUDES" + ], + "group": "feature.position", + "type": "string", + "description": "Comma-separated list of excluded tools", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "POSITION_TOOL_INCLUDES", + "accepted_names": [ + "POSITION_TOOL_INCLUDES" + ], + "group": "feature.position", + "type": "string", + "description": "Comma-separated list of included tools", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "POSITION_TOOL_PINS", + "accepted_names": [ + "POSITION_TOOL_PINS" + ], + "group": "feature.position", + "type": "string", + "description": "Comma-separated list of pinned tools", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "PUBSUB_REDIS_CHANNEL_TYPE", + "accepted_names": [ + "EVENT_BUS_REDIS_CHANNEL_TYPE", + "PUBSUB_REDIS_CHANNEL_TYPE" + ], + "group": "middleware.cache.redis-pub-sub", + "type": "literal['pubsub', 'sharded', 'streams']", + "description": "Event transport type. Options are:\n\n - pubsub: normal Pub/Sub (at-most-once)\n - sharded: sharded Pub/Sub (at-most-once)\n - streams: Redis Streams (at-least-once, recommended to avoid subscriber races)\n\nNote: Before enabling 'streams' in production, estimate your expected event volume and retention needs.\nConfigure Redis memory limits and stream trimming appropriately (e.g., MAXLEN and key expiry) to reduce\nthe risk of data loss from Redis auto-eviction under memory pressure.\nAlso accepts ENV: EVENT_BUS_REDIS_CHANNEL_TYPE.", + "code_default": "pubsub", + "required": false, + "applies_when": null + }, + { + "name": "PUBSUB_REDIS_URL", + "accepted_names": [ + "EVENT_BUS_REDIS_URL", + "PUBSUB_REDIS_URL" + ], + "group": "middleware.cache.redis-pub-sub", + "type": "string | null", + "description": "Redis connection URL for streaming events between API and celery worker; defaults to URL constructed from `REDIS_*` configurations. Also accepts ENV: EVENT_BUS_REDIS_URL.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "PUBSUB_REDIS_USE_CLUSTERS", + "accepted_names": [ + "EVENT_BUS_REDIS_USE_CLUSTERS", + "PUBSUB_REDIS_USE_CLUSTERS" + ], + "group": "middleware.cache.redis-pub-sub", + "type": "boolean", + "description": "Enable Redis Cluster mode for pub/sub or streams transport. Recommended for large deployments. Also accepts ENV: EVENT_BUS_REDIS_USE_CLUSTERS.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "PUBSUB_STREAMS_RETENTION_SECONDS", + "accepted_names": [ + "EVENT_BUS_STREAMS_RETENTION_SECONDS", + "PUBSUB_STREAMS_RETENTION_SECONDS" + ], + "group": "middleware.cache.redis-pub-sub", + "type": "integer", + "description": "When using 'streams', expire each stream key this many seconds after the last event is published. Also accepts ENV: EVENT_BUS_STREAMS_RETENTION_SECONDS.", + "code_default": 600, + "required": false, + "applies_when": null + }, + { + "name": "QDRANT_API_KEY", + "accepted_names": [ + "QDRANT_API_KEY" + ], + "group": "middleware.vdb.qdrant", + "type": "string | null", + "description": "API key for authenticating with the Qdrant server", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=qdrant" + }, + { + "name": "QDRANT_CLIENT_TIMEOUT", + "accepted_names": [ + "QDRANT_CLIENT_TIMEOUT" + ], + "group": "middleware.vdb.qdrant", + "type": "integer", + "description": "Timeout in seconds for Qdrant client operations (default is 20 seconds)", + "code_default": 20, + "required": false, + "applies_when": "VECTOR_STORE=qdrant" + }, + { + "name": "QDRANT_GRPC_ENABLED", + "accepted_names": [ + "QDRANT_GRPC_ENABLED" + ], + "group": "middleware.vdb.qdrant", + "type": "boolean", + "description": "Whether to enable gRPC support for Qdrant connection (True for gRPC, False for HTTP)", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=qdrant" + }, + { + "name": "QDRANT_GRPC_PORT", + "accepted_names": [ + "QDRANT_GRPC_PORT" + ], + "group": "middleware.vdb.qdrant", + "type": "integer", + "description": "Port number for gRPC connection to Qdrant server (default is 6334)", + "code_default": 6334, + "required": false, + "applies_when": "VECTOR_STORE=qdrant" + }, + { + "name": "QDRANT_REPLICATION_FACTOR", + "accepted_names": [ + "QDRANT_REPLICATION_FACTOR" + ], + "group": "middleware.vdb.qdrant", + "type": "integer", + "description": "Replication factor for Qdrant collections (default is 1)", + "code_default": 1, + "required": false, + "applies_when": "VECTOR_STORE=qdrant" + }, + { + "name": "QDRANT_URL", + "accepted_names": [ + "QDRANT_URL" + ], + "group": "middleware.vdb.qdrant", + "type": "string | null", + "description": "URL of the Qdrant server (e.g., 'http://localhost:6333' or 'https://qdrant.example.com')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=qdrant" + }, + { + "name": "QUEUE_MONITOR_ALERT_EMAILS", + "accepted_names": [ + "QUEUE_MONITOR_ALERT_EMAILS" + ], + "group": "middleware.dataset-queue-monitor", + "type": "string | null", + "description": "Emails for dataset queue monitor alert, separated by commas", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "QUEUE_MONITOR_INTERVAL", + "accepted_names": [ + "QUEUE_MONITOR_INTERVAL" + ], + "group": "middleware.dataset-queue-monitor", + "type": "typing.Annotated[float, Ge(ge=0)] | null", + "description": "Interval for dataset queue monitor in minutes", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "QUEUE_MONITOR_THRESHOLD", + "accepted_names": [ + "QUEUE_MONITOR_THRESHOLD" + ], + "group": "middleware.dataset-queue-monitor", + "type": "typing.Annotated[int, Ge(ge=0)] | null", + "description": "Threshold for dataset queue monitor", + "code_default": 200, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_CLUSTERS", + "accepted_names": [ + "REDIS_CLUSTERS" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Comma-separated list of Redis Clusters nodes (host:port)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_CLUSTERS_PASSWORD", + "accepted_names": [ + "REDIS_CLUSTERS_PASSWORD" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Password for Redis Clusters authentication (if required)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_DB", + "accepted_names": [ + "REDIS_DB" + ], + "group": "middleware.cache.redis", + "type": "integer", + "description": "Redis database number to use (0-15)", + "code_default": 0, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_ENABLE_CLIENT_SIDE_CACHE", + "accepted_names": [ + "REDIS_ENABLE_CLIENT_SIDE_CACHE" + ], + "group": "middleware.cache.redis", + "type": "boolean", + "description": "Enable client side cache in redis", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_HEALTH_CHECK_INTERVAL", + "accepted_names": [ + "REDIS_HEALTH_CHECK_INTERVAL" + ], + "group": "middleware.cache.redis", + "type": "integer", + "description": "Interval in seconds between Redis connection health checks (0 to disable)", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_HOST", + "accepted_names": [ + "REDIS_HOST" + ], + "group": "middleware.cache.redis", + "type": "string", + "description": "Hostname or IP address of the Redis server", + "code_default": "localhost", + "required": false, + "applies_when": null + }, + { + "name": "REDIS_KEY_PREFIX", + "accepted_names": [ + "REDIS_KEY_PREFIX" + ], + "group": "middleware.cache.redis", + "type": "string", + "description": "Optional global prefix for Redis keys, topics, and transport artifacts", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "REDIS_MAX_CONNECTIONS", + "accepted_names": [ + "REDIS_MAX_CONNECTIONS" + ], + "group": "middleware.cache.redis", + "type": "typing.Annotated[int, Gt(gt=0)] | null", + "description": "Maximum connections in the Redis connection pool (unset for library default)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_PASSWORD", + "accepted_names": [ + "REDIS_PASSWORD" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Password for Redis authentication (if required)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_PORT", + "accepted_names": [ + "REDIS_PORT" + ], + "group": "middleware.cache.redis", + "type": "integer", + "description": "Port number on which the Redis server is listening", + "code_default": 6379, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_RETRY_BACKOFF_BASE", + "accepted_names": [ + "REDIS_RETRY_BACKOFF_BASE" + ], + "group": "middleware.cache.redis", + "type": "float", + "description": "Base delay in seconds for exponential backoff between retries", + "code_default": 1.0, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_RETRY_BACKOFF_CAP", + "accepted_names": [ + "REDIS_RETRY_BACKOFF_CAP" + ], + "group": "middleware.cache.redis", + "type": "float", + "description": "Maximum backoff delay in seconds between retries", + "code_default": 10.0, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_RETRY_RETRIES", + "accepted_names": [ + "REDIS_RETRY_RETRIES" + ], + "group": "middleware.cache.redis", + "type": "integer", + "description": "Maximum number of retries per Redis command on transient failures (ConnectionError, TimeoutError, socket.timeout)", + "code_default": 3, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SENTINELS", + "accepted_names": [ + "REDIS_SENTINELS" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Comma-separated list of Redis Sentinel nodes (host:port)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SENTINEL_PASSWORD", + "accepted_names": [ + "REDIS_SENTINEL_PASSWORD" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Password for Redis Sentinel authentication (if required)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SENTINEL_SERVICE_NAME", + "accepted_names": [ + "REDIS_SENTINEL_SERVICE_NAME" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Name of the Redis Sentinel service to monitor", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SENTINEL_SOCKET_TIMEOUT", + "accepted_names": [ + "REDIS_SENTINEL_SOCKET_TIMEOUT" + ], + "group": "middleware.cache.redis", + "type": "typing.Annotated[float, Gt(gt=0)] | null", + "description": "Socket timeout in seconds for Redis Sentinel connections", + "code_default": 0.1, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SENTINEL_USERNAME", + "accepted_names": [ + "REDIS_SENTINEL_USERNAME" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Username for Redis Sentinel authentication (if required)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SERIALIZATION_PROTOCOL", + "accepted_names": [ + "REDIS_SERIALIZATION_PROTOCOL" + ], + "group": "middleware.cache.redis", + "type": "integer", + "description": "Redis serialization protocol (RESP) version", + "code_default": 3, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SOCKET_CONNECT_TIMEOUT", + "accepted_names": [ + "REDIS_SOCKET_CONNECT_TIMEOUT" + ], + "group": "middleware.cache.redis", + "type": "typing.Annotated[float, Gt(gt=0)] | null", + "description": "Socket timeout in seconds for Redis connection establishment", + "code_default": 5.0, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SOCKET_TIMEOUT", + "accepted_names": [ + "REDIS_SOCKET_TIMEOUT" + ], + "group": "middleware.cache.redis", + "type": "typing.Annotated[float, Gt(gt=0)] | null", + "description": "Socket timeout in seconds for Redis read/write operations", + "code_default": 5.0, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SSL_CA_CERTS", + "accepted_names": [ + "REDIS_SSL_CA_CERTS" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Path to the CA certificate file for SSL verification", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SSL_CERTFILE", + "accepted_names": [ + "REDIS_SSL_CERTFILE" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Path to the client certificate file for SSL authentication", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SSL_CERT_REQS", + "accepted_names": [ + "REDIS_SSL_CERT_REQS" + ], + "group": "middleware.cache.redis", + "type": "string", + "description": "SSL certificate requirements (CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED)", + "code_default": "CERT_NONE", + "required": false, + "applies_when": null + }, + { + "name": "REDIS_SSL_KEYFILE", + "accepted_names": [ + "REDIS_SSL_KEYFILE" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Path to the client private key file for SSL authentication", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_USERNAME", + "accepted_names": [ + "REDIS_USERNAME" + ], + "group": "middleware.cache.redis", + "type": "string | null", + "description": "Username for Redis authentication (if required)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_USE_CLUSTERS", + "accepted_names": [ + "REDIS_USE_CLUSTERS" + ], + "group": "middleware.cache.redis", + "type": "boolean", + "description": "Enable Redis Clusters mode for high availability", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_USE_SENTINEL", + "accepted_names": [ + "REDIS_USE_SENTINEL" + ], + "group": "middleware.cache.redis", + "type": "boolean | null", + "description": "Enable Redis Sentinel mode for high availability", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "REDIS_USE_SSL", + "accepted_names": [ + "REDIS_USE_SSL" + ], + "group": "middleware.cache.redis", + "type": "boolean", + "description": "Enable SSL/TLS for the Redis connection", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "REFRESH_TOKEN_EXPIRE_DAYS", + "accepted_names": [ + "REFRESH_TOKEN_EXPIRE_DAYS" + ], + "group": "feature.auth", + "type": "float", + "description": "Expiration time for refresh tokens in days", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "RELYT_DATABASE", + "accepted_names": [ + "RELYT_DATABASE" + ], + "group": "middleware.vdb.relyt", + "type": "string | null", + "description": "Name of the Relyt database to connect to (default is 'default')", + "code_default": "default", + "required": false, + "applies_when": "VECTOR_STORE=relyt" + }, + { + "name": "RELYT_HOST", + "accepted_names": [ + "RELYT_HOST" + ], + "group": "middleware.vdb.relyt", + "type": "string | null", + "description": "Hostname or IP address of the Relyt server (e.g., 'localhost' or 'relyt.example.com')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=relyt" + }, + { + "name": "RELYT_PASSWORD", + "accepted_names": [ + "RELYT_PASSWORD" + ], + "group": "middleware.vdb.relyt", + "type": "string | null", + "description": "Password for authenticating with the Relyt database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=relyt" + }, + { + "name": "RELYT_PORT", + "accepted_names": [ + "RELYT_PORT" + ], + "group": "middleware.vdb.relyt", + "type": "integer", + "description": "Port number on which the Relyt server is listening (default is 9200)", + "code_default": 9200, + "required": false, + "applies_when": "VECTOR_STORE=relyt" + }, + { + "name": "RELYT_USER", + "accepted_names": [ + "RELYT_USER" + ], + "group": "middleware.vdb.relyt", + "type": "string | null", + "description": "Username for authenticating with the Relyt database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=relyt" + }, + { + "name": "REMOTE_SETTINGS_SOURCE_NAME", + "accepted_names": [ + "REMOTE_SETTINGS_SOURCE_NAME" + ], + "group": "remote_settings_sources.remote-settings-source", + "type": "enum | string", + "description": "name of remote config source", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "RESEND_API_KEY", + "accepted_names": [ + "RESEND_API_KEY" + ], + "group": "feature.mail", + "type": "string | null", + "description": "API key for Resend email service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "RESEND_API_URL", + "accepted_names": [ + "RESEND_API_URL" + ], + "group": "feature.mail", + "type": "string | null", + "description": "API URL for Resend email service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "RESET_PASSWORD_TOKEN_EXPIRY_MINUTES", + "accepted_names": [ + "RESET_PASSWORD_TOKEN_EXPIRY_MINUTES" + ], + "group": "feature.security", + "type": "integer", + "description": "Duration in minutes for which a password reset token remains valid", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "RESPECT_XFORWARD_HEADERS_ENABLED", + "accepted_names": [ + "RESPECT_XFORWARD_HEADERS_ENABLED" + ], + "group": "feature.http", + "type": "boolean", + "description": "Enable handling of X-Forwarded-For, X-Forwarded-Proto, and X-Forwarded-Port headers when the app is behind a single trusted reverse proxy.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "RETRIEVAL_SERVICE_EXECUTORS", + "accepted_names": [ + "RETRIEVAL_SERVICE_EXECUTORS" + ], + "group": "middleware.database", + "type": "integer", + "description": "Number of processes for the retrieval service, default to CPU cores.", + "code_default": 10, + "required": false, + "applies_when": null + }, + { + "name": "S3_ACCESS_KEY", + "accepted_names": [ + "S3_ACCESS_KEY" + ], + "group": "middleware.storage.s3-storage", + "type": "string | null", + "description": "Access key ID for authenticating with the S3 service", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=s3" + }, + { + "name": "S3_ADDRESS_STYLE", + "accepted_names": [ + "S3_ADDRESS_STYLE" + ], + "group": "middleware.storage.s3-storage", + "type": "literal['auto', 'virtual', 'path']", + "description": "S3 addressing style: 'auto', 'path', or 'virtual'", + "code_default": "auto", + "required": false, + "applies_when": "STORAGE_TYPE=s3" + }, + { + "name": "S3_BUCKET_NAME", + "accepted_names": [ + "S3_BUCKET_NAME" + ], + "group": "middleware.storage.s3-storage", + "type": "string | null", + "description": "Name of the S3 bucket to store and retrieve objects", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=s3" + }, + { + "name": "S3_ENDPOINT", + "accepted_names": [ + "S3_ENDPOINT" + ], + "group": "middleware.storage.s3-storage", + "type": "string | null", + "description": "URL of the S3-compatible storage endpoint (e.g., 'https://s3.amazonaws.com')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=s3" + }, + { + "name": "S3_REGION", + "accepted_names": [ + "S3_REGION" + ], + "group": "middleware.storage.s3-storage", + "type": "string | null", + "description": "Region where the S3 bucket is located (e.g., 'us-east-1')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=s3" + }, + { + "name": "S3_SECRET_KEY", + "accepted_names": [ + "S3_SECRET_KEY" + ], + "group": "middleware.storage.s3-storage", + "type": "string | null", + "description": "Secret access key for authenticating with the S3 service", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=s3" + }, + { + "name": "S3_USE_AWS_MANAGED_IAM", + "accepted_names": [ + "S3_USE_AWS_MANAGED_IAM" + ], + "group": "middleware.storage.s3-storage", + "type": "boolean", + "description": "Use AWS managed IAM roles for authentication instead of access/secret keys", + "code_default": false, + "required": false, + "applies_when": "STORAGE_TYPE=s3" + }, + { + "name": "SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL", + "accepted_names": [ + "SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL" + ], + "group": "feature.sandbox-expired-records-clean", + "type": "integer", + "description": "Maximum interval in milliseconds between batches", + "code_default": 200, + "required": false, + "applies_when": null + }, + { + "name": "SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE", + "accepted_names": [ + "SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE" + ], + "group": "feature.sandbox-expired-records-clean", + "type": "integer", + "description": "Maximum number of records to process in each batch", + "code_default": 1000, + "required": false, + "applies_when": null + }, + { + "name": "SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD", + "accepted_names": [ + "SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD" + ], + "group": "feature.sandbox-expired-records-clean", + "type": "integer", + "description": "Graceful period in days for sandbox records clean after subscription expiration", + "code_default": 21, + "required": false, + "applies_when": null + }, + { + "name": "SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL", + "accepted_names": [ + "SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL" + ], + "group": "feature.sandbox-expired-records-clean", + "type": "integer", + "description": "Lock TTL for sandbox expired records clean task in seconds", + "code_default": 90000, + "required": false, + "applies_when": null + }, + { + "name": "SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS", + "accepted_names": [ + "SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS" + ], + "group": "feature.sandbox-expired-records-clean", + "type": "integer", + "description": "Retention days for sandbox expired workflow_run records and message records", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "SCARF_NO_ANALYTICS", + "accepted_names": [ + "SCARF_NO_ANALYTICS" + ], + "group": "feature.rag-etl", + "type": "string | null", + "description": "This is about whether to disable Scarf analytics in Unstructured library.", + "code_default": "false", + "required": false, + "applies_when": null + }, + { + "name": "SECRET_KEY", + "accepted_names": [ + "SECRET_KEY" + ], + "group": "feature.security", + "type": "string", + "description": "Secret key for secure session cookie signing.Make sure you are changing this key for your deployment with a strong key.Generate a strong key using `openssl rand -base64 42` or set via the `SECRET_KEY` environment variable.", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "SENDGRID_API_KEY", + "accepted_names": [ + "SENDGRID_API_KEY" + ], + "group": "feature.mail", + "type": "string | null", + "description": "API key for SendGrid service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "SENTRY_DSN", + "accepted_names": [ + "SENTRY_DSN" + ], + "group": "extra.sentry", + "type": "string | null", + "description": "Sentry Data Source Name (DSN). This is the unique identifier of your Sentry project, used to send events to the correct project.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "SENTRY_PROFILES_SAMPLE_RATE", + "accepted_names": [ + "SENTRY_PROFILES_SAMPLE_RATE" + ], + "group": "extra.sentry", + "type": "float", + "description": "Sample rate for Sentry profiling. Value between 0.0 and 1.0, where 1.0 means 100% of profiles are sent to Sentry.", + "code_default": 1.0, + "required": false, + "applies_when": null + }, + { + "name": "SENTRY_TRACES_SAMPLE_RATE", + "accepted_names": [ + "SENTRY_TRACES_SAMPLE_RATE" + ], + "group": "extra.sentry", + "type": "float", + "description": "Sample rate for Sentry performance monitoring traces. Value between 0.0 and 1.0, where 1.0 means 100% of traces are sent to Sentry.", + "code_default": 1.0, + "required": false, + "applies_when": null + }, + { + "name": "SERVICE_API_URL", + "accepted_names": [ + "SERVICE_API_URL" + ], + "group": "feature.endpoint", + "type": "string", + "description": "Base URL for the service API, displayed to users for API access", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "SINGLE_CHUNK_ATTACHMENT_LIMIT", + "accepted_names": [ + "SINGLE_CHUNK_ATTACHMENT_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of files allowed in a single chunk attachment", + "code_default": 10, + "required": false, + "applies_when": null + }, + { + "name": "SMTP_LOCAL_HOSTNAME", + "accepted_names": [ + "SMTP_LOCAL_HOSTNAME" + ], + "group": "feature.mail", + "type": "string | null", + "description": "Override the local hostname used in SMTP HELO/EHLO. Useful behind NAT or when the default hostname causes rejections.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "SMTP_OPPORTUNISTIC_TLS", + "accepted_names": [ + "SMTP_OPPORTUNISTIC_TLS" + ], + "group": "feature.mail", + "type": "boolean", + "description": "Enable opportunistic TLS for SMTP connections", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "SMTP_PASSWORD", + "accepted_names": [ + "SMTP_PASSWORD" + ], + "group": "feature.mail", + "type": "string | null", + "description": "Password for SMTP authentication", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "SMTP_PORT", + "accepted_names": [ + "SMTP_PORT" + ], + "group": "feature.mail", + "type": "integer | null", + "description": "SMTP server port number", + "code_default": 465, + "required": false, + "applies_when": null + }, + { + "name": "SMTP_SERVER", + "accepted_names": [ + "SMTP_SERVER" + ], + "group": "feature.mail", + "type": "string | null", + "description": "SMTP server hostname", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "SMTP_USERNAME", + "accepted_names": [ + "SMTP_USERNAME" + ], + "group": "feature.mail", + "type": "string | null", + "description": "Username for SMTP authentication", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "SMTP_USE_TLS", + "accepted_names": [ + "SMTP_USE_TLS" + ], + "group": "feature.mail", + "type": "boolean", + "description": "Enable TLS encryption for SMTP connections", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "SQLALCHEMY_ECHO", + "accepted_names": [ + "SQLALCHEMY_ECHO" + ], + "group": "middleware.database", + "type": "boolean | string", + "description": "If True, SQLAlchemy will log all SQL statements.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "SQLALCHEMY_MAX_OVERFLOW", + "accepted_names": [ + "SQLALCHEMY_MAX_OVERFLOW" + ], + "group": "middleware.database", + "type": "integer", + "description": "Maximum number of connections that can be created beyond the pool_size.", + "code_default": 10, + "required": false, + "applies_when": null + }, + { + "name": "SQLALCHEMY_POOL_PRE_PING", + "accepted_names": [ + "SQLALCHEMY_POOL_PRE_PING" + ], + "group": "middleware.database", + "type": "boolean", + "description": "If True, enables connection pool pre-ping feature to check connections.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "SQLALCHEMY_POOL_RECYCLE", + "accepted_names": [ + "SQLALCHEMY_POOL_RECYCLE" + ], + "group": "middleware.database", + "type": "integer", + "description": "Number of seconds after which a connection is automatically recycled.", + "code_default": 3600, + "required": false, + "applies_when": null + }, + { + "name": "SQLALCHEMY_POOL_SIZE", + "accepted_names": [ + "SQLALCHEMY_POOL_SIZE" + ], + "group": "middleware.database", + "type": "integer", + "description": "Maximum number of database connections in the pool.", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "SQLALCHEMY_POOL_TIMEOUT", + "accepted_names": [ + "SQLALCHEMY_POOL_TIMEOUT" + ], + "group": "middleware.database", + "type": "integer", + "description": "Number of seconds to wait for a connection from the pool before raising a timeout error.", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "SQLALCHEMY_POOL_USE_LIFO", + "accepted_names": [ + "SQLALCHEMY_POOL_USE_LIFO" + ], + "group": "middleware.database", + "type": "boolean", + "description": "If True, SQLAlchemy will use last-in-first-out way to retrieve connections from pool.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_DEFAULT_CONNECT_TIME_OUT", + "accepted_names": [ + "SSRF_DEFAULT_CONNECT_TIME_OUT" + ], + "group": "feature.http", + "type": "float", + "description": "The default connect timeout period used for network requests (SSRF)", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_DEFAULT_MAX_RETRIES", + "accepted_names": [ + "SSRF_DEFAULT_MAX_RETRIES" + ], + "group": "feature.http", + "type": "integer", + "description": "Maximum number of retries for network requests (SSRF)", + "code_default": 3, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_DEFAULT_READ_TIME_OUT", + "accepted_names": [ + "SSRF_DEFAULT_READ_TIME_OUT" + ], + "group": "feature.http", + "type": "float", + "description": "The default read timeout period used for network requests (SSRF)", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_DEFAULT_TIME_OUT", + "accepted_names": [ + "SSRF_DEFAULT_TIME_OUT" + ], + "group": "feature.http", + "type": "float", + "description": "The default timeout period used for network requests (SSRF)", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_DEFAULT_WRITE_TIME_OUT", + "accepted_names": [ + "SSRF_DEFAULT_WRITE_TIME_OUT" + ], + "group": "feature.http", + "type": "float", + "description": "The default write timeout period used for network requests (SSRF)", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_POOL_KEEPALIVE_EXPIRY", + "accepted_names": [ + "SSRF_POOL_KEEPALIVE_EXPIRY" + ], + "group": "feature.http", + "type": "typing.Annotated[float, Gt(gt=0)] | null", + "description": "Keep-alive expiry in seconds for idle SSRF connections (set to None to disable)", + "code_default": 5.0, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_POOL_MAX_CONNECTIONS", + "accepted_names": [ + "SSRF_POOL_MAX_CONNECTIONS" + ], + "group": "feature.http", + "type": "integer", + "description": "Maximum number of concurrent connections for the SSRF HTTP client", + "code_default": 100, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS", + "accepted_names": [ + "SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS" + ], + "group": "feature.http", + "type": "integer", + "description": "Maximum number of persistent keep-alive connections for the SSRF HTTP client", + "code_default": 20, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_PROXY_ALL_URL", + "accepted_names": [ + "SSRF_PROXY_ALL_URL" + ], + "group": "feature.http", + "type": "string | null", + "description": "Proxy URL for HTTP or HTTPS requests to prevent Server-Side Request Forgery (SSRF)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_PROXY_HTTPS_URL", + "accepted_names": [ + "SSRF_PROXY_HTTPS_URL" + ], + "group": "feature.http", + "type": "string | null", + "description": "Proxy URL for HTTPS requests to prevent Server-Side Request Forgery (SSRF)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "SSRF_PROXY_HTTP_URL", + "accepted_names": [ + "SSRF_PROXY_HTTP_URL" + ], + "group": "feature.http", + "type": "string | null", + "description": "Proxy URL for HTTP requests to prevent Server-Side Request Forgery (SSRF)", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "STORAGE_LOCAL_PATH", + "accepted_names": [ + "STORAGE_LOCAL_PATH" + ], + "group": "middleware.storage", + "type": "string", + "description": "Path for local storage when STORAGE_TYPE is set to 'local'.", + "code_default": "storage", + "required": false, + "applies_when": "STORAGE_TYPE=local" + }, + { + "name": "STORAGE_TYPE", + "accepted_names": [ + "STORAGE_TYPE" + ], + "group": "middleware.storage", + "type": "literal['opendal', 's3', 'aliyun-oss', 'azure-blob', 'baidu-obs', 'clickzetta-volume', 'google-storage', 'huawei-obs', 'oci-storage', 'tencent-cos', 'volcengine-tos', 'supabase', 'local']", + "description": "Type of storage to use. Options: 'opendal', '(deprecated) local', 's3', 'aliyun-oss', 'azure-blob', 'baidu-obs', 'clickzetta-volume', 'google-storage', 'huawei-obs', 'oci-storage', 'tencent-cos', 'volcengine-tos', 'supabase'. Default is 'opendal'.", + "code_default": "opendal", + "required": false, + "applies_when": null + }, + { + "name": "SUPABASE_API_KEY", + "accepted_names": [ + "SUPABASE_API_KEY" + ], + "group": "middleware.storage.supabase-storage", + "type": "string | null", + "description": "API KEY for authenticating with Supabase", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=supabase" + }, + { + "name": "SUPABASE_BUCKET_NAME", + "accepted_names": [ + "SUPABASE_BUCKET_NAME" + ], + "group": "middleware.storage.supabase-storage", + "type": "string | null", + "description": "Name of the Supabase bucket to store and retrieve objects (e.g., 'dify-bucket')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=supabase" + }, + { + "name": "SUPABASE_URL", + "accepted_names": [ + "SUPABASE_URL" + ], + "group": "middleware.storage.supabase-storage", + "type": "string | null", + "description": "URL of the Supabase", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=supabase" + }, + { + "name": "SWAGGER_UI_ENABLED", + "accepted_names": [ + "SWAGGER_UI_ENABLED" + ], + "group": "feature.swagger-u-i", + "type": "boolean", + "description": "Whether to enable Swagger UI in api module", + "code_default": true, + "required": false, + "applies_when": null + }, + { + "name": "SWAGGER_UI_PATH", + "accepted_names": [ + "SWAGGER_UI_PATH" + ], + "group": "feature.swagger-u-i", + "type": "string", + "description": "Swagger UI page path in api module", + "code_default": "/swagger-ui.html", + "required": false, + "applies_when": null + }, + { + "name": "TABLESTORE_ACCESS_KEY_ID", + "accepted_names": [ + "TABLESTORE_ACCESS_KEY_ID" + ], + "group": "middleware.vdb.table-store", + "type": "string | null", + "description": "AccessKey id for the instance name", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tablestore" + }, + { + "name": "TABLESTORE_ACCESS_KEY_SECRET", + "accepted_names": [ + "TABLESTORE_ACCESS_KEY_SECRET" + ], + "group": "middleware.vdb.table-store", + "type": "string | null", + "description": "AccessKey secret for the instance name", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tablestore" + }, + { + "name": "TABLESTORE_ENDPOINT", + "accepted_names": [ + "TABLESTORE_ENDPOINT" + ], + "group": "middleware.vdb.table-store", + "type": "string | null", + "description": "Endpoint address of the TableStore server (e.g. 'https://instance-name.cn-hangzhou.ots.aliyuncs.com')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tablestore" + }, + { + "name": "TABLESTORE_INSTANCE_NAME", + "accepted_names": [ + "TABLESTORE_INSTANCE_NAME" + ], + "group": "middleware.vdb.table-store", + "type": "string | null", + "description": "Instance name to access TableStore server (eg. 'instance-name')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tablestore" + }, + { + "name": "TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE", + "accepted_names": [ + "TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE" + ], + "group": "middleware.vdb.table-store", + "type": "boolean", + "description": "Whether to normalize full-text search scores to [0, 1]", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=tablestore" + }, + { + "name": "TEMPLATE_TRANSFORM_MAX_LENGTH", + "accepted_names": [ + "TEMPLATE_TRANSFORM_MAX_LENGTH" + ], + "group": "feature.workflow", + "type": "integer", + "description": "Maximum number of characters allowed in Template Transform node output", + "code_default": 400000, + "required": false, + "applies_when": null + }, + { + "name": "TENANT_ISOLATED_TASK_CONCURRENCY", + "accepted_names": [ + "TENANT_ISOLATED_TASK_CONCURRENCY" + ], + "group": "feature.tenant-isolated-task-queue", + "type": "integer", + "description": "Number of tasks allowed to be delivered concurrently from isolated queue per tenant", + "code_default": 1, + "required": false, + "applies_when": null + }, + { + "name": "TENCENT_COS_BUCKET_NAME", + "accepted_names": [ + "TENCENT_COS_BUCKET_NAME" + ], + "group": "middleware.storage.tencent-cloud-c-o-s-storage", + "type": "string | null", + "description": "Name of the Tencent Cloud COS bucket to store and retrieve objects", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=tencent-cos" + }, + { + "name": "TENCENT_COS_CUSTOM_DOMAIN", + "accepted_names": [ + "TENCENT_COS_CUSTOM_DOMAIN" + ], + "group": "middleware.storage.tencent-cloud-c-o-s-storage", + "type": "string | null", + "description": "Tencent Cloud COS custom domain setting", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=tencent-cos" + }, + { + "name": "TENCENT_COS_REGION", + "accepted_names": [ + "TENCENT_COS_REGION" + ], + "group": "middleware.storage.tencent-cloud-c-o-s-storage", + "type": "string | null", + "description": "Tencent Cloud region where the COS bucket is located (e.g., 'ap-guangzhou')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=tencent-cos" + }, + { + "name": "TENCENT_COS_SCHEME", + "accepted_names": [ + "TENCENT_COS_SCHEME" + ], + "group": "middleware.storage.tencent-cloud-c-o-s-storage", + "type": "string | null", + "description": "Protocol scheme for COS requests: 'https' (recommended) or 'http'", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=tencent-cos" + }, + { + "name": "TENCENT_COS_SECRET_ID", + "accepted_names": [ + "TENCENT_COS_SECRET_ID" + ], + "group": "middleware.storage.tencent-cloud-c-o-s-storage", + "type": "string | null", + "description": "SecretId for authenticating with Tencent Cloud COS (part of API credentials)", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=tencent-cos" + }, + { + "name": "TENCENT_COS_SECRET_KEY", + "accepted_names": [ + "TENCENT_COS_SECRET_KEY" + ], + "group": "middleware.storage.tencent-cloud-c-o-s-storage", + "type": "string | null", + "description": "SecretKey for authenticating with Tencent Cloud COS (part of API credentials)", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=tencent-cos" + }, + { + "name": "TENCENT_VECTOR_DB_API_KEY", + "accepted_names": [ + "TENCENT_VECTOR_DB_API_KEY" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "string | null", + "description": "API key for authenticating with the Tencent Vector Database service", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TENCENT_VECTOR_DB_DATABASE", + "accepted_names": [ + "TENCENT_VECTOR_DB_DATABASE" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "string | null", + "description": "Name of the specific Tencent Vector Database to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH", + "accepted_names": [ + "TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "boolean", + "description": "Enable hybrid search features", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TENCENT_VECTOR_DB_PASSWORD", + "accepted_names": [ + "TENCENT_VECTOR_DB_PASSWORD" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "string | null", + "description": "Password for authenticating with the Tencent Vector Database (if required)", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TENCENT_VECTOR_DB_REPLICAS", + "accepted_names": [ + "TENCENT_VECTOR_DB_REPLICAS" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "integer", + "description": "Number of replicas for the Tencent Vector Database (default is 2)", + "code_default": 2, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TENCENT_VECTOR_DB_SHARD", + "accepted_names": [ + "TENCENT_VECTOR_DB_SHARD" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "integer", + "description": "Number of shards for the Tencent Vector Database (default is 1)", + "code_default": 1, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TENCENT_VECTOR_DB_TIMEOUT", + "accepted_names": [ + "TENCENT_VECTOR_DB_TIMEOUT" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "integer", + "description": "Timeout in seconds for Tencent Vector Database operations (default is 30 seconds)", + "code_default": 30, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TENCENT_VECTOR_DB_URL", + "accepted_names": [ + "TENCENT_VECTOR_DB_URL" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "string | null", + "description": "URL of the Tencent Vector Database service (e.g., 'https://vectordb.tencentcloudapi.com')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TENCENT_VECTOR_DB_USERNAME", + "accepted_names": [ + "TENCENT_VECTOR_DB_USERNAME" + ], + "group": "middleware.vdb.tencent-vector-d-b", + "type": "string | null", + "description": "Username for authenticating with the Tencent Vector Database (if required)", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tencent" + }, + { + "name": "TIDB_API_URL", + "accepted_names": [ + "TIDB_API_URL" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "string | null", + "description": "Tidb API url", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_IAM_API_URL", + "accepted_names": [ + "TIDB_IAM_API_URL" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "string | null", + "description": "Tidb IAM API url", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_ON_QDRANT_API_KEY", + "accepted_names": [ + "TIDB_ON_QDRANT_API_KEY" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "string | null", + "description": "Tidb on Qdrant api key", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_ON_QDRANT_CLIENT_TIMEOUT", + "accepted_names": [ + "TIDB_ON_QDRANT_CLIENT_TIMEOUT" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "integer", + "description": "Tidb on Qdrant client timeout in seconds", + "code_default": 20, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_ON_QDRANT_GRPC_ENABLED", + "accepted_names": [ + "TIDB_ON_QDRANT_GRPC_ENABLED" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "boolean", + "description": "whether enable grpc support for Tidb on Qdrant connection", + "code_default": false, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_ON_QDRANT_GRPC_PORT", + "accepted_names": [ + "TIDB_ON_QDRANT_GRPC_PORT" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "integer", + "description": "Tidb on Qdrant grpc port", + "code_default": 6334, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_ON_QDRANT_URL", + "accepted_names": [ + "TIDB_ON_QDRANT_URL" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "string | null", + "description": "Tidb on Qdrant url", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_PRIVATE_KEY", + "accepted_names": [ + "TIDB_PRIVATE_KEY" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "string | null", + "description": "Tidb account private key", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_PROJECT_ID", + "accepted_names": [ + "TIDB_PROJECT_ID" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "string | null", + "description": "Tidb project id", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_PUBLIC_KEY", + "accepted_names": [ + "TIDB_PUBLIC_KEY" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "string | null", + "description": "Tidb account public key", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_REGION", + "accepted_names": [ + "TIDB_REGION" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "string | null", + "description": "Tidb serverless region", + "code_default": "regions/aws-us-east-1", + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_SERVERLESS_NUMBER", + "accepted_names": [ + "TIDB_SERVERLESS_NUMBER" + ], + "group": "feature.data-set", + "type": "integer", + "description": "number of tidb serverless cluster", + "code_default": 500, + "required": false, + "applies_when": null + }, + { + "name": "TIDB_SPEND_LIMIT", + "accepted_names": [ + "TIDB_SPEND_LIMIT" + ], + "group": "middleware.vdb.tidb-on-qdrant", + "type": "integer | null", + "description": "Tidb spend limit", + "code_default": 100, + "required": false, + "applies_when": "VECTOR_STORE=tidb_on_qdrant" + }, + { + "name": "TIDB_VECTOR_DATABASE", + "accepted_names": [ + "TIDB_VECTOR_DATABASE" + ], + "group": "middleware.vdb.ti-d-b-vector", + "type": "string | null", + "description": "Name of the TiDB Vector database to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_vector" + }, + { + "name": "TIDB_VECTOR_HOST", + "accepted_names": [ + "TIDB_VECTOR_HOST" + ], + "group": "middleware.vdb.ti-d-b-vector", + "type": "string | null", + "description": "Hostname or IP address of the TiDB Vector server (e.g., 'localhost' or 'tidb.example.com')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_vector" + }, + { + "name": "TIDB_VECTOR_PASSWORD", + "accepted_names": [ + "TIDB_VECTOR_PASSWORD" + ], + "group": "middleware.vdb.ti-d-b-vector", + "type": "string | null", + "description": "Password for authenticating with the TiDB Vector database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_vector" + }, + { + "name": "TIDB_VECTOR_PORT", + "accepted_names": [ + "TIDB_VECTOR_PORT" + ], + "group": "middleware.vdb.ti-d-b-vector", + "type": "typing.Annotated[int, Gt(gt=0)] | null", + "description": "Port number on which the TiDB Vector server is listening (default is 4000)", + "code_default": 4000, + "required": false, + "applies_when": "VECTOR_STORE=tidb_vector" + }, + { + "name": "TIDB_VECTOR_USER", + "accepted_names": [ + "TIDB_VECTOR_USER" + ], + "group": "middleware.vdb.ti-d-b-vector", + "type": "string | null", + "description": "Username for authenticating with the TiDB Vector database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=tidb_vector" + }, + { + "name": "TOOL_ICON_CACHE_MAX_AGE", + "accepted_names": [ + "TOOL_ICON_CACHE_MAX_AGE" + ], + "group": "feature.tool", + "type": "integer", + "description": "Maximum age in seconds for caching tool icons", + "code_default": 3600, + "required": false, + "applies_when": null + }, + { + "name": "TRIGGER_PROVIDER_CREDENTIAL_THRESHOLD_SECONDS", + "accepted_names": [ + "TRIGGER_PROVIDER_CREDENTIAL_THRESHOLD_SECONDS" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Proactive credential refresh threshold in seconds", + "code_default": 3600, + "required": false, + "applies_when": null + }, + { + "name": "TRIGGER_PROVIDER_REFRESH_BATCH_SIZE", + "accepted_names": [ + "TRIGGER_PROVIDER_REFRESH_BATCH_SIZE" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Max trigger subscriptions to process per tick", + "code_default": 200, + "required": false, + "applies_when": null + }, + { + "name": "TRIGGER_PROVIDER_REFRESH_INTERVAL", + "accepted_names": [ + "TRIGGER_PROVIDER_REFRESH_INTERVAL" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Trigger provider refresh poller interval in minutes", + "code_default": 1, + "required": false, + "applies_when": null + }, + { + "name": "TRIGGER_PROVIDER_SUBSCRIPTION_THRESHOLD_SECONDS", + "accepted_names": [ + "TRIGGER_PROVIDER_SUBSCRIPTION_THRESHOLD_SECONDS" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Proactive subscription refresh threshold in seconds", + "code_default": 3600, + "required": false, + "applies_when": null + }, + { + "name": "TRIGGER_URL", + "accepted_names": [ + "TRIGGER_URL" + ], + "group": "feature.endpoint", + "type": "string", + "description": "Template url for triggers", + "code_default": "http://localhost:5001", + "required": false, + "applies_when": null + }, + { + "name": "UNSTRUCTURED_API_KEY", + "accepted_names": [ + "UNSTRUCTURED_API_KEY" + ], + "group": "feature.rag-etl", + "type": "string | null", + "description": "API key for Unstructured.io service", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "UNSTRUCTURED_API_URL", + "accepted_names": [ + "UNSTRUCTURED_API_URL" + ], + "group": "feature.rag-etl", + "type": "string | null", + "description": "API URL for Unstructured.io service", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "UPLOAD_AUDIO_FILE_SIZE_LIMIT", + "accepted_names": [ + "UPLOAD_AUDIO_FILE_SIZE_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "audio file size limit in Megabytes for uploading files", + "code_default": 50, + "required": false, + "applies_when": null + }, + { + "name": "UPLOAD_FILE_BATCH_LIMIT", + "accepted_names": [ + "UPLOAD_FILE_BATCH_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of files allowed in a single upload batch", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "UPLOAD_FILE_SIZE_LIMIT", + "accepted_names": [ + "UPLOAD_FILE_SIZE_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum allowed file size for uploads in megabytes", + "code_default": 15, + "required": false, + "applies_when": null + }, + { + "name": "UPLOAD_IMAGE_FILE_SIZE_LIMIT", + "accepted_names": [ + "UPLOAD_IMAGE_FILE_SIZE_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum allowed image file size for uploads in megabytes", + "code_default": 10, + "required": false, + "applies_when": null + }, + { + "name": "UPLOAD_VIDEO_FILE_SIZE_LIMIT", + "accepted_names": [ + "UPLOAD_VIDEO_FILE_SIZE_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "video file size limit in Megabytes for uploading files", + "code_default": 100, + "required": false, + "applies_when": null + }, + { + "name": "UPSTASH_VECTOR_TOKEN", + "accepted_names": [ + "UPSTASH_VECTOR_TOKEN" + ], + "group": "middleware.vdb.upstash", + "type": "string | null", + "description": "Token for authenticating with the upstash server", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=upstash" + }, + { + "name": "UPSTASH_VECTOR_URL", + "accepted_names": [ + "UPSTASH_VECTOR_URL" + ], + "group": "middleware.vdb.upstash", + "type": "string | null", + "description": "URL of the upstash server (e.g., 'https://vector.upstash.io')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=upstash" + }, + { + "name": "VASTBASE_DATABASE", + "accepted_names": [ + "VASTBASE_DATABASE" + ], + "group": "middleware.vdb.vastbase-vector", + "type": "string | null", + "description": "Name of the Vastbase database to connect to", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=vastbase" + }, + { + "name": "VASTBASE_HOST", + "accepted_names": [ + "VASTBASE_HOST" + ], + "group": "middleware.vdb.vastbase-vector", + "type": "string | null", + "description": "Hostname or IP address of the Vastbase server with Vector extension (e.g., 'localhost')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=vastbase" + }, + { + "name": "VASTBASE_MAX_CONNECTION", + "accepted_names": [ + "VASTBASE_MAX_CONNECTION" + ], + "group": "middleware.vdb.vastbase-vector", + "type": "integer", + "description": "Max connection of the Vastbase database", + "code_default": 5, + "required": false, + "applies_when": "VECTOR_STORE=vastbase" + }, + { + "name": "VASTBASE_MIN_CONNECTION", + "accepted_names": [ + "VASTBASE_MIN_CONNECTION" + ], + "group": "middleware.vdb.vastbase-vector", + "type": "integer", + "description": "Min connection of the Vastbase database", + "code_default": 1, + "required": false, + "applies_when": "VECTOR_STORE=vastbase" + }, + { + "name": "VASTBASE_PASSWORD", + "accepted_names": [ + "VASTBASE_PASSWORD" + ], + "group": "middleware.vdb.vastbase-vector", + "type": "string | null", + "description": "Password for authenticating with the Vastbase database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=vastbase" + }, + { + "name": "VASTBASE_PORT", + "accepted_names": [ + "VASTBASE_PORT" + ], + "group": "middleware.vdb.vastbase-vector", + "type": "integer", + "description": "Port number on which the Vastbase server is listening (default is 5432)", + "code_default": 5432, + "required": false, + "applies_when": "VECTOR_STORE=vastbase" + }, + { + "name": "VASTBASE_USER", + "accepted_names": [ + "VASTBASE_USER" + ], + "group": "middleware.vdb.vastbase-vector", + "type": "string | null", + "description": "Username for authenticating with the Vastbase database", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=vastbase" + }, + { + "name": "VECTOR_INDEX_NAME_PREFIX", + "accepted_names": [ + "VECTOR_INDEX_NAME_PREFIX" + ], + "group": "middleware.vector-store", + "type": "string | null", + "description": "Prefix used to create collection name in vector database", + "code_default": "Vector_index", + "required": false, + "applies_when": null + }, + { + "name": "VECTOR_STORE", + "accepted_names": [ + "VECTOR_STORE" + ], + "group": "middleware.vector-store", + "type": "string | null", + "description": "Type of vector store to use for efficient similarity search. Set to None if not using a vector store.", + "code_default": null, + "required": false, + "applies_when": null + }, + { + "name": "VECTOR_STORE_WHITELIST_ENABLE", + "accepted_names": [ + "VECTOR_STORE_WHITELIST_ENABLE" + ], + "group": "middleware.vector-store", + "type": "boolean | null", + "description": "Enable whitelist for vector store.", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "VIKINGDB_ACCESS_KEY", + "accepted_names": [ + "VIKINGDB_ACCESS_KEY" + ], + "group": "middleware.vdb.viking-d-b", + "type": "string | null", + "description": "The Access Key provided by Volcengine VikingDB for API authentication.Refer to the following documentation for details on obtaining credentials:https://www.volcengine.com/docs/6291/65568", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=vikingdb" + }, + { + "name": "VIKINGDB_CONNECTION_TIMEOUT", + "accepted_names": [ + "VIKINGDB_CONNECTION_TIMEOUT" + ], + "group": "middleware.vdb.viking-d-b", + "type": "integer", + "description": "The connection timeout of the Volcengine VikingDB service.", + "code_default": 30, + "required": false, + "applies_when": "VECTOR_STORE=vikingdb" + }, + { + "name": "VIKINGDB_HOST", + "accepted_names": [ + "VIKINGDB_HOST" + ], + "group": "middleware.vdb.viking-d-b", + "type": "string", + "description": "The host of the Volcengine VikingDB service.(e.g., 'api-vikingdb.volces.com', 'api-vikingdb.mlp.cn-shanghai.volces.com')", + "code_default": "api-vikingdb.mlp.cn-shanghai.volces.com", + "required": false, + "applies_when": "VECTOR_STORE=vikingdb" + }, + { + "name": "VIKINGDB_REGION", + "accepted_names": [ + "VIKINGDB_REGION" + ], + "group": "middleware.vdb.viking-d-b", + "type": "string", + "description": "The region of the Volcengine VikingDB service.(e.g., 'cn-shanghai', 'cn-beijing').", + "code_default": "cn-shanghai", + "required": false, + "applies_when": "VECTOR_STORE=vikingdb" + }, + { + "name": "VIKINGDB_SCHEME", + "accepted_names": [ + "VIKINGDB_SCHEME" + ], + "group": "middleware.vdb.viking-d-b", + "type": "string", + "description": "The scheme of the Volcengine VikingDB service.(e.g., 'http', 'https').", + "code_default": "http", + "required": false, + "applies_when": "VECTOR_STORE=vikingdb" + }, + { + "name": "VIKINGDB_SECRET_KEY", + "accepted_names": [ + "VIKINGDB_SECRET_KEY" + ], + "group": "middleware.vdb.viking-d-b", + "type": "string | null", + "description": "The Secret Key provided by Volcengine VikingDB for API authentication.", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=vikingdb" + }, + { + "name": "VIKINGDB_SOCKET_TIMEOUT", + "accepted_names": [ + "VIKINGDB_SOCKET_TIMEOUT" + ], + "group": "middleware.vdb.viking-d-b", + "type": "integer", + "description": "The socket timeout of the Volcengine VikingDB service.", + "code_default": 30, + "required": false, + "applies_when": "VECTOR_STORE=vikingdb" + }, + { + "name": "VOLCENGINE_TOS_ACCESS_KEY", + "accepted_names": [ + "VOLCENGINE_TOS_ACCESS_KEY" + ], + "group": "middleware.storage.volcengine-t-o-s-storage", + "type": "string | null", + "description": "Access Key ID for authenticating with Volcengine TOS", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=volcengine-tos" + }, + { + "name": "VOLCENGINE_TOS_BUCKET_NAME", + "accepted_names": [ + "VOLCENGINE_TOS_BUCKET_NAME" + ], + "group": "middleware.storage.volcengine-t-o-s-storage", + "type": "string | null", + "description": "Name of the Volcengine TOS bucket to store and retrieve objects (e.g., 'my-tos-bucket')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=volcengine-tos" + }, + { + "name": "VOLCENGINE_TOS_ENDPOINT", + "accepted_names": [ + "VOLCENGINE_TOS_ENDPOINT" + ], + "group": "middleware.storage.volcengine-t-o-s-storage", + "type": "string | null", + "description": "URL of the Volcengine TOS endpoint (e.g., 'https://tos-cn-beijing.volces.com')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=volcengine-tos" + }, + { + "name": "VOLCENGINE_TOS_REGION", + "accepted_names": [ + "VOLCENGINE_TOS_REGION" + ], + "group": "middleware.storage.volcengine-t-o-s-storage", + "type": "string | null", + "description": "Volcengine region where the TOS bucket is located (e.g., 'cn-beijing')", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=volcengine-tos" + }, + { + "name": "VOLCENGINE_TOS_SECRET_KEY", + "accepted_names": [ + "VOLCENGINE_TOS_SECRET_KEY" + ], + "group": "middleware.storage.volcengine-t-o-s-storage", + "type": "string | null", + "description": "Secret Access Key for authenticating with Volcengine TOS", + "code_default": null, + "required": false, + "applies_when": "STORAGE_TYPE=volcengine-tos" + }, + { + "name": "WEAVIATE_API_KEY", + "accepted_names": [ + "WEAVIATE_API_KEY" + ], + "group": "middleware.vdb.weaviate", + "type": "string | null", + "description": "API key for authenticating with the Weaviate server", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=weaviate" + }, + { + "name": "WEAVIATE_BATCH_SIZE", + "accepted_names": [ + "WEAVIATE_BATCH_SIZE" + ], + "group": "middleware.vdb.weaviate", + "type": "integer", + "description": "Number of objects to be processed in a single batch operation (default is 100)", + "code_default": 100, + "required": false, + "applies_when": "VECTOR_STORE=weaviate" + }, + { + "name": "WEAVIATE_ENDPOINT", + "accepted_names": [ + "WEAVIATE_ENDPOINT" + ], + "group": "middleware.vdb.weaviate", + "type": "string | null", + "description": "URL of the Weaviate server (e.g., 'http://localhost:8080' or 'https://weaviate.example.com')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=weaviate" + }, + { + "name": "WEAVIATE_GRPC_ENDPOINT", + "accepted_names": [ + "WEAVIATE_GRPC_ENDPOINT" + ], + "group": "middleware.vdb.weaviate", + "type": "string | null", + "description": "URL of the Weaviate gRPC server (e.g., 'grpc://localhost:50051' or 'grpcs://weaviate.example.com:443')", + "code_default": null, + "required": false, + "applies_when": "VECTOR_STORE=weaviate" + }, + { + "name": "WEAVIATE_TOKENIZATION", + "accepted_names": [ + "WEAVIATE_TOKENIZATION" + ], + "group": "middleware.vdb.weaviate", + "type": "string | null", + "description": "Tokenization for Weaviate (default is word)", + "code_default": "word", + "required": false, + "applies_when": "VECTOR_STORE=weaviate" + }, + { + "name": "WEBHOOK_REQUEST_BODY_MAX_SIZE", + "accepted_names": [ + "WEBHOOK_REQUEST_BODY_MAX_SIZE" + ], + "group": "feature.trigger", + "type": "integer", + "description": "Maximum allowed size for webhook request bodies in bytes", + "code_default": 10485760, + "required": false, + "applies_when": null + }, + { + "name": "WEB_FORM_SUBMIT_RATE_LIMIT_MAX_ATTEMPTS", + "accepted_names": [ + "WEB_FORM_SUBMIT_RATE_LIMIT_MAX_ATTEMPTS" + ], + "group": "feature.security", + "type": "integer", + "description": "Maximum number of web form submissions allowed per IP within the rate limit window", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "WEB_FORM_SUBMIT_RATE_LIMIT_WINDOW_SECONDS", + "accepted_names": [ + "WEB_FORM_SUBMIT_RATE_LIMIT_WINDOW_SECONDS" + ], + "group": "feature.security", + "type": "integer", + "description": "Time window in seconds for web form submission rate limiting", + "code_default": 60, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_CALL_MAX_DEPTH", + "accepted_names": [ + "WORKFLOW_CALL_MAX_DEPTH" + ], + "group": "feature.workflow", + "type": "integer", + "description": "Maximum allowed depth for nested workflow calls", + "code_default": 5, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_FILE_UPLOAD_LIMIT", + "accepted_names": [ + "WORKFLOW_FILE_UPLOAD_LIMIT" + ], + "group": "feature.file-upload", + "type": "integer", + "description": "Maximum number of files allowed in a workflow upload operation", + "code_default": 10, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_LOG_CLEANUP_BATCH_SIZE", + "accepted_names": [ + "WORKFLOW_LOG_CLEANUP_BATCH_SIZE" + ], + "group": "feature.workflow-log", + "type": "integer", + "description": "Batch size for workflow run log cleanup operations", + "code_default": 100, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_LOG_CLEANUP_ENABLED", + "accepted_names": [ + "WORKFLOW_LOG_CLEANUP_ENABLED" + ], + "group": "feature.workflow-log", + "type": "boolean", + "description": "Enable workflow run log cleanup", + "code_default": false, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS", + "accepted_names": [ + "WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS" + ], + "group": "feature.workflow-log", + "type": "string", + "description": "Comma-separated list of workflow IDs to clean logs for", + "code_default": "", + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_LOG_RETENTION_DAYS", + "accepted_names": [ + "WORKFLOW_LOG_RETENTION_DAYS" + ], + "group": "feature.workflow-log", + "type": "integer", + "description": "Retention days for workflow run logs", + "code_default": 30, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_MAX_EXECUTION_STEPS", + "accepted_names": [ + "WORKFLOW_MAX_EXECUTION_STEPS" + ], + "group": "feature.workflow", + "type": "integer", + "description": "Maximum number of steps allowed in a single workflow execution", + "code_default": 500, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_MAX_EXECUTION_TIME", + "accepted_names": [ + "WORKFLOW_MAX_EXECUTION_TIME" + ], + "group": "feature.workflow", + "type": "integer", + "description": "Maximum execution time in seconds for a single workflow", + "code_default": 1200, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_NODE_EXECUTION_STORAGE", + "accepted_names": [ + "WORKFLOW_NODE_EXECUTION_STORAGE" + ], + "group": "feature.workflow-node-execution", + "type": "string", + "description": "Storage backend for WorkflowNodeExecution. Options: 'rdbms', 'hybrid'", + "code_default": "rdbms", + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK", + "accepted_names": [ + "WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Maximum schedules to dispatch per tick (0=unlimited, circuit breaker)", + "code_default": 0, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE", + "accepted_names": [ + "WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Maximum number of schedules to process in each poll batch", + "code_default": 100, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_SCHEDULE_POLLER_INTERVAL", + "accepted_names": [ + "WORKFLOW_SCHEDULE_POLLER_INTERVAL" + ], + "group": "feature.celery-schedule-tasks", + "type": "integer", + "description": "Workflow schedule poller interval in minutes", + "code_default": 1, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_VARIABLE_TRUNCATION_ARRAY_LENGTH", + "accepted_names": [ + "WORKFLOW_VARIABLE_TRUNCATION_ARRAY_LENGTH" + ], + "group": "feature.workflow-variable-truncation", + "type": "integer", + "description": "maximum length for array to trigger truncation.", + "code_default": 1000, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_VARIABLE_TRUNCATION_MAX_SIZE", + "accepted_names": [ + "WORKFLOW_VARIABLE_TRUNCATION_MAX_SIZE" + ], + "group": "feature.workflow-variable-truncation", + "type": "integer", + "description": "Maximum size for variable to trigger final truncation.", + "code_default": 1024000, + "required": false, + "applies_when": null + }, + { + "name": "WORKFLOW_VARIABLE_TRUNCATION_STRING_LENGTH", + "accepted_names": [ + "WORKFLOW_VARIABLE_TRUNCATION_STRING_LENGTH" + ], + "group": "feature.workflow-variable-truncation", + "type": "integer", + "description": "maximum length for string to trigger tuncation, measure in number of characters", + "code_default": 100000, + "required": false, + "applies_when": null + } + ] +} diff --git a/api/docs/backend-env.reference.md b/api/docs/backend-env.reference.md new file mode 100644 index 0000000000..459c295c29 --- /dev/null +++ b/api/docs/backend-env.reference.md @@ -0,0 +1,1364 @@ +# Backend Env Reference + +> Generated from `api/configs/**/*.py`. Do not edit manually. + +This reference documents backend env input semantics and code defaults only. +Deployment defaults, `.env.example`, and runtime-effective values are intentionally excluded. + +## Value Resolution Order + +```text +init_settings > process_env > remote_settings > dotenv > file_secrets > toml > code_default +``` + +Code defaults are fallback values only. Runtime process environment, remote settings, and dotenv values can override them. + +## `deploy.deployment` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `APPLICATION_NAME` | `string` | `"langgenius/dify"` | `APPLICATION_NAME` | Name of the application, used for identification and logging purposes | +| `DEBUG` | `boolean` | `false` | `DEBUG` | Enable debug mode for additional logging and development features | +| `DEPLOY_ENV` | `string` | `"PRODUCTION"` | `DEPLOY_ENV` | Deployment environment (e.g., 'PRODUCTION', 'DEVELOPMENT'), default to PRODUCTION | +| `EDITION` | `string` | `"SELF_HOSTED"` | `EDITION` | Deployment edition of the application (e.g., 'SELF_HOSTED', 'CLOUD') | +| `ENABLE_REQUEST_LOGGING` | `boolean` | `false` | `ENABLE_REQUEST_LOGGING` | Enable request and response body logging | + +## `enterprise.enterprise-feature` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CAN_REPLACE_LOGO` | `boolean` | `false` | `CAN_REPLACE_LOGO` | Allow customization of the enterprise logo. | +| `ENTERPRISE_ENABLED` | `boolean` | `false` | `ENTERPRISE_ENABLED` | Enable or disable enterprise-level features. Before using, please contact business@dify.ai by email to inquire about licensing matters. | +| `ENTERPRISE_REQUEST_TIMEOUT` | `integer` | `5` | `ENTERPRISE_REQUEST_TIMEOUT` | Maximum timeout in seconds for enterprise requests | + +## `enterprise.enterprise-telemetry` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ENTERPRISE_INCLUDE_CONTENT` | `boolean` | `false` | `ENTERPRISE_INCLUDE_CONTENT` | Include input/output content in traces (privacy toggle). | +| `ENTERPRISE_OTEL_SAMPLING_RATE` | `float` | `1.0` | `ENTERPRISE_OTEL_SAMPLING_RATE` | Sampling rate for enterprise traces (0.0 to 1.0, default 1.0 = 100%). | +| `ENTERPRISE_OTLP_API_KEY` | `string` | `""` | `ENTERPRISE_OTLP_API_KEY` | Bearer token for enterprise OTLP export authentication. | +| `ENTERPRISE_OTLP_ENDPOINT` | `string` | `""` | `ENTERPRISE_OTLP_ENDPOINT` | Enterprise OTEL collector endpoint. | +| `ENTERPRISE_OTLP_HEADERS` | `string` | `""` | `ENTERPRISE_OTLP_HEADERS` | Auth headers for OTLP export (key=value, key2=value2). | +| `ENTERPRISE_OTLP_PROTOCOL` | `string` | `"http"` | `ENTERPRISE_OTLP_PROTOCOL` | OTLP protocol: 'http' or 'grpc' (default: http). | +| `ENTERPRISE_SERVICE_NAME` | `string` | `"dify"` | `ENTERPRISE_SERVICE_NAME` | Service name for OTEL resource. | +| `ENTERPRISE_TELEMETRY_ENABLED` | `boolean` | `false` | `ENTERPRISE_TELEMETRY_ENABLED` | Enable enterprise telemetry collection (also requires ENTERPRISE_ENABLED=true). | + +## `extra.archive-storage` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ARCHIVE_STORAGE_ACCESS_KEY` | `string \| null` | `""` | `ARCHIVE_STORAGE_ACCESS_KEY` | Access key ID for authenticating with storage | +| `ARCHIVE_STORAGE_ARCHIVE_BUCKET` | `string \| null` | `""` | `ARCHIVE_STORAGE_ARCHIVE_BUCKET` | Name of the bucket to store archived workflow logs | +| `ARCHIVE_STORAGE_ENABLED` | `boolean` | `false` | `ARCHIVE_STORAGE_ENABLED` | Enable workflow run logs archiving to S3-compatible storage | +| `ARCHIVE_STORAGE_ENDPOINT` | `string \| null` | `""` | `ARCHIVE_STORAGE_ENDPOINT` | URL of the S3-compatible storage endpoint (e.g., 'https://storage.example.com') | +| `ARCHIVE_STORAGE_EXPORT_BUCKET` | `string \| null` | `""` | `ARCHIVE_STORAGE_EXPORT_BUCKET` | Name of the bucket to store exported workflow runs | +| `ARCHIVE_STORAGE_REGION` | `string` | `"auto"` | `ARCHIVE_STORAGE_REGION` | Region for storage (use 'auto' if the provider supports it) | +| `ARCHIVE_STORAGE_SECRET_KEY` | `string \| null` | `""` | `ARCHIVE_STORAGE_SECRET_KEY` | Secret access key for authenticating with storage | + +## `extra.notion` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `NOTION_CLIENT_ID` | `string \| null` | `""` | `NOTION_CLIENT_ID` | Client ID for Notion API authentication. Required for OAuth 2.0 flow. | +| `NOTION_CLIENT_SECRET` | `string \| null` | `""` | `NOTION_CLIENT_SECRET` | Client secret for Notion API authentication. Required for OAuth 2.0 flow. | +| `NOTION_INTEGRATION_TOKEN` | `string \| null` | `""` | `NOTION_INTEGRATION_TOKEN` | Integration token for Notion API access. Used for direct API calls without OAuth flow. | +| `NOTION_INTEGRATION_TYPE` | `string \| null` | `""` | `NOTION_INTEGRATION_TYPE` | Type of Notion integration. Set to 'internal' for internal integrations, or None for public integrations. | +| `NOTION_INTERNAL_SECRET` | `string \| null` | `""` | `NOTION_INTERNAL_SECRET` | Secret key for internal Notion integrations. Required when NOTION_INTEGRATION_TYPE is 'internal'. | + +## `extra.sentry` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `SENTRY_DSN` | `string \| null` | `""` | `SENTRY_DSN` | Sentry Data Source Name (DSN). This is the unique identifier of your Sentry project, used to send events to the correct project. | +| `SENTRY_PROFILES_SAMPLE_RATE` | `float` | `1.0` | `SENTRY_PROFILES_SAMPLE_RATE` | Sample rate for Sentry profiling. Value between 0.0 and 1.0, where 1.0 means 100% of profiles are sent to Sentry. | +| `SENTRY_TRACES_SAMPLE_RATE` | `float` | `1.0` | `SENTRY_TRACES_SAMPLE_RATE` | Sample rate for Sentry performance monitoring traces. Value between 0.0 and 1.0, where 1.0 means 100% of traces are sent to Sentry. | + +## `feature.account` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ACCOUNT_DELETION_TOKEN_EXPIRY_MINUTES` | `integer` | `5` | `ACCOUNT_DELETION_TOKEN_EXPIRY_MINUTES` | Duration in minutes for which an account deletion token remains valid. | +| `EDUCATION_ENABLED` | `boolean` | `false` | `EDUCATION_ENABLED` | Whether to enable education identity. | + +## `feature.app-execution` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `APP_DEFAULT_ACTIVE_REQUESTS` | `integer` | `0` | `APP_DEFAULT_ACTIVE_REQUESTS` | Default number of concurrent active requests per app (0 for unlimited) | +| `APP_MAX_ACTIVE_REQUESTS` | `integer` | `0` | `APP_MAX_ACTIVE_REQUESTS` | Maximum number of concurrent active requests per app (0 for unlimited) | +| `APP_MAX_EXECUTION_TIME` | `integer` | `1200` | `APP_MAX_EXECUTION_TIME` | Maximum allowed execution time for the application in seconds | +| `HUMAN_INPUT_GLOBAL_TIMEOUT_SECONDS` | `integer` | `604800` | `HUMAN_INPUT_GLOBAL_TIMEOUT_SECONDS` | Maximum seconds a workflow run can stay paused waiting for human input before global timeout. | + +## `feature.async-workflow` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ASYNC_WORKFLOW_SCHEDULER_GRANULARITY` | `integer` | `120` | `ASYNC_WORKFLOW_SCHEDULER_GRANULARITY` | Granularity for the async workflow scheduler. Some users could block the queue with time-consuming tasks, so workflows can be suspended when needed. A time-based checker runs every granularity seconds to inspect the queue and suspend workflows. | + +## `feature.auth` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ACCESS_TOKEN_EXPIRE_MINUTES` | `integer` | `60` | `ACCESS_TOKEN_EXPIRE_MINUTES` | Expiration time for access tokens in minutes | +| `CHANGE_EMAIL_LOCKOUT_DURATION` | `integer` | `86400` | `CHANGE_EMAIL_LOCKOUT_DURATION` | Time (in seconds) a user must wait before retrying change email after exceeding the rate limit. | +| `EMAIL_REGISTER_LOCKOUT_DURATION` | `integer` | `86400` | `EMAIL_REGISTER_LOCKOUT_DURATION` | Time (in seconds) a user must wait before retrying email register after exceeding the rate limit. | +| `FORGOT_PASSWORD_LOCKOUT_DURATION` | `integer` | `86400` | `FORGOT_PASSWORD_LOCKOUT_DURATION` | Time (in seconds) a user must wait before retrying password reset after exceeding the rate limit. | +| `GITHUB_CLIENT_ID` | `string \| null` | `""` | `GITHUB_CLIENT_ID` | GitHub OAuth client ID | +| `GITHUB_CLIENT_SECRET` | `string \| null` | `""` | `GITHUB_CLIENT_SECRET` | GitHub OAuth client secret | +| `GOOGLE_CLIENT_ID` | `string \| null` | `""` | `GOOGLE_CLIENT_ID` | Google OAuth client ID | +| `GOOGLE_CLIENT_SECRET` | `string \| null` | `""` | `GOOGLE_CLIENT_SECRET` | Google OAuth client secret | +| `LOGIN_LOCKOUT_DURATION` | `integer` | `86400` | `LOGIN_LOCKOUT_DURATION` | Time (in seconds) a user must wait before retrying login after exceeding the rate limit. | +| `OAUTH_REDIRECT_PATH` | `string` | `"/console/api/oauth/authorize"` | `OAUTH_REDIRECT_PATH` | Redirect path for OAuth authentication callbacks | +| `OWNER_TRANSFER_LOCKOUT_DURATION` | `integer` | `86400` | `OWNER_TRANSFER_LOCKOUT_DURATION` | Time (in seconds) a user must wait before retrying owner transfer after exceeding the rate limit. | +| `REFRESH_TOKEN_EXPIRE_DAYS` | `float` | `30` | `REFRESH_TOKEN_EXPIRE_DAYS` | Expiration time for refresh tokens in days | + +## `feature.billing` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `BILLING_ENABLED` | `boolean` | `false` | `BILLING_ENABLED` | Enable or disable billing functionality | + +## `feature.celery-beat` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CELERY_BEAT_SCHEDULER_TIME` | `integer` | `1` | `CELERY_BEAT_SCHEDULER_TIME` | Interval in days for Celery Beat scheduler execution, default to 1 day | + +## `feature.celery-schedule-tasks` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `API_TOKEN_LAST_USED_UPDATE_INTERVAL` | `integer` | `30` | `API_TOKEN_LAST_USED_UPDATE_INTERVAL` | Interval in minutes for batch updating API token last_used_at (default 30) | +| `ENABLE_API_TOKEN_LAST_USED_UPDATE_TASK` | `boolean` | `true` | `ENABLE_API_TOKEN_LAST_USED_UPDATE_TASK` | Enable periodic batch update of API token last_used_at timestamps | +| `ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK` | `boolean` | `true` | `ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK` | Enable check upgradable plugin task | +| `ENABLE_CLEAN_EMBEDDING_CACHE_TASK` | `boolean` | `false` | `ENABLE_CLEAN_EMBEDDING_CACHE_TASK` | Enable clean embedding cache task | +| `ENABLE_CLEAN_MESSAGES` | `boolean` | `false` | `ENABLE_CLEAN_MESSAGES` | Enable clean messages task | +| `ENABLE_CLEAN_UNUSED_DATASETS_TASK` | `boolean` | `false` | `ENABLE_CLEAN_UNUSED_DATASETS_TASK` | Enable clean unused datasets task | +| `ENABLE_CREATE_TIDB_SERVERLESS_TASK` | `boolean` | `false` | `ENABLE_CREATE_TIDB_SERVERLESS_TASK` | Enable create tidb service job task | +| `ENABLE_DATASETS_QUEUE_MONITOR` | `boolean` | `false` | `ENABLE_DATASETS_QUEUE_MONITOR` | Enable queue monitor task | +| `ENABLE_HUMAN_INPUT_TIMEOUT_TASK` | `boolean` | `true` | `ENABLE_HUMAN_INPUT_TIMEOUT_TASK` | Enable human input timeout check task | +| `ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK` | `boolean` | `false` | `ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK` | Enable mail clean document notify task | +| `ENABLE_TRIGGER_PROVIDER_REFRESH_TASK` | `boolean` | `true` | `ENABLE_TRIGGER_PROVIDER_REFRESH_TASK` | Enable trigger provider refresh poller | +| `ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK` | `boolean` | `false` | `ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK` | Enable update tidb service job status task | +| `ENABLE_WORKFLOW_RUN_CLEANUP_TASK` | `boolean` | `false` | `ENABLE_WORKFLOW_RUN_CLEANUP_TASK` | Enable scheduled workflow run cleanup task | +| `ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK` | `boolean` | `true` | `ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK` | Enable workflow schedule poller task | +| `HUMAN_INPUT_TIMEOUT_TASK_INTERVAL` | `integer` | `1` | `HUMAN_INPUT_TIMEOUT_TASK_INTERVAL` | Human input timeout check interval in minutes | +| `TRIGGER_PROVIDER_CREDENTIAL_THRESHOLD_SECONDS` | `integer` | `3600` | `TRIGGER_PROVIDER_CREDENTIAL_THRESHOLD_SECONDS` | Proactive credential refresh threshold in seconds | +| `TRIGGER_PROVIDER_REFRESH_BATCH_SIZE` | `integer` | `200` | `TRIGGER_PROVIDER_REFRESH_BATCH_SIZE` | Max trigger subscriptions to process per tick | +| `TRIGGER_PROVIDER_REFRESH_INTERVAL` | `integer` | `1` | `TRIGGER_PROVIDER_REFRESH_INTERVAL` | Trigger provider refresh poller interval in minutes | +| `TRIGGER_PROVIDER_SUBSCRIPTION_THRESHOLD_SECONDS` | `integer` | `3600` | `TRIGGER_PROVIDER_SUBSCRIPTION_THRESHOLD_SECONDS` | Proactive subscription refresh threshold in seconds | +| `WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK` | `integer` | `0` | `WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK` | Maximum schedules to dispatch per tick (0=unlimited, circuit breaker) | +| `WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE` | `integer` | `100` | `WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE` | Maximum number of schedules to process in each poll batch | +| `WORKFLOW_SCHEDULE_POLLER_INTERVAL` | `integer` | `1` | `WORKFLOW_SCHEDULE_POLLER_INTERVAL` | Workflow schedule poller interval in minutes | + +## `feature.code-execution-sandbox` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CODE_EXECUTION_API_KEY` | `string` | `"dify-sandbox"` | `CODE_EXECUTION_API_KEY` | API key for accessing the code execution service | +| `CODE_EXECUTION_CONNECT_TIMEOUT` | `float \| null` | `10.0` | `CODE_EXECUTION_CONNECT_TIMEOUT` | Connection timeout in seconds for code execution requests | +| `CODE_EXECUTION_ENDPOINT` | `HttpUrl` | `"http://sandbox:8194/"` | `CODE_EXECUTION_ENDPOINT` | URL endpoint for the code execution service | +| `CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY` | `typing.Annotated[float, Gt(gt=0)] \| null` | `5.0` | `CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY` | Keep-alive expiry in seconds for idle connections (set to None to disable) | +| `CODE_EXECUTION_POOL_MAX_CONNECTIONS` | `integer` | `100` | `CODE_EXECUTION_POOL_MAX_CONNECTIONS` | Maximum number of concurrent connections for the code execution HTTP client | +| `CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS` | `integer` | `20` | `CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS` | Maximum number of persistent keep-alive connections for the code execution HTTP client | +| `CODE_EXECUTION_READ_TIMEOUT` | `float \| null` | `60.0` | `CODE_EXECUTION_READ_TIMEOUT` | Read timeout in seconds for code execution requests | +| `CODE_EXECUTION_SSL_VERIFY` | `boolean` | `true` | `CODE_EXECUTION_SSL_VERIFY` | Enable or disable SSL verification for code execution requests | +| `CODE_EXECUTION_WRITE_TIMEOUT` | `float \| null` | `10.0` | `CODE_EXECUTION_WRITE_TIMEOUT` | Write timeout in seconds for code execution request | +| `CODE_MAX_DEPTH` | `integer` | `5` | `CODE_MAX_DEPTH` | Maximum allowed depth for nested structures in code execution | +| `CODE_MAX_NUMBER` | `integer` | `9223372036854775807` | `CODE_MAX_NUMBER` | Maximum allowed numeric value in code execution | +| `CODE_MAX_NUMBER_ARRAY_LENGTH` | `integer` | `1000` | `CODE_MAX_NUMBER_ARRAY_LENGTH` | Maximum allowed length for numeric arrays in code execution | +| `CODE_MAX_OBJECT_ARRAY_LENGTH` | `integer` | `30` | `CODE_MAX_OBJECT_ARRAY_LENGTH` | Maximum allowed length for object arrays in code execution | +| `CODE_MAX_PRECISION` | `integer` | `20` | `CODE_MAX_PRECISION` | Maximum number of decimal places for floating-point numbers in code execution | +| `CODE_MAX_STRING_ARRAY_LENGTH` | `integer` | `30` | `CODE_MAX_STRING_ARRAY_LENGTH` | Maximum allowed length for string arrays in code execution | +| `CODE_MAX_STRING_LENGTH` | `integer` | `400000` | `CODE_MAX_STRING_LENGTH` | Maximum allowed length for strings in code execution | +| `CODE_MIN_NUMBER` | `integer` | `-9223372036854775807` | `CODE_MIN_NUMBER` | Minimum allowed numeric value in code execution | + +## `feature.collaboration` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ENABLE_COLLABORATION_MODE` | `boolean` | `false` | `ENABLE_COLLABORATION_MODE` | Whether to enable collaboration mode features across the workspace | + +## `feature.data-set` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CREATE_TIDB_SERVICE_JOB_ENABLED` | `boolean` | `false` | `CREATE_TIDB_SERVICE_JOB_ENABLED` | Enable or disable create tidb service job | +| `DATASET_MAX_SEGMENTS_PER_REQUEST` | `integer` | `0` | `DATASET_MAX_SEGMENTS_PER_REQUEST` | Maximum number of segments for dataset segments API (0 for unlimited) | +| `DATASET_OPERATOR_ENABLED` | `boolean` | `false` | `DATASET_OPERATOR_ENABLED` | Enable or disable dataset operator functionality | +| `DSL_EXPORT_ENCRYPT_DATASET_ID` | `boolean` | `true` | `DSL_EXPORT_ENCRYPT_DATASET_ID` | Enable or disable dataset ID encryption when exporting DSL files | +| `PLAN_PRO_CLEAN_DAY_SETTING` | `integer` | `7` | `PLAN_PRO_CLEAN_DAY_SETTING` | Interval in days for dataset cleanup operations - plan: pro and team | +| `PLAN_SANDBOX_CLEAN_DAY_SETTING` | `integer` | `30` | `PLAN_SANDBOX_CLEAN_DAY_SETTING` | Interval in days for dataset cleanup operations - plan: sandbox | +| `PLAN_SANDBOX_CLEAN_MESSAGE_DAY_SETTING` | `integer` | `30` | `PLAN_SANDBOX_CLEAN_MESSAGE_DAY_SETTING` | Interval in days for message cleanup operations - plan: sandbox | +| `TIDB_SERVERLESS_NUMBER` | `integer` | `500` | `TIDB_SERVERLESS_NUMBER` | number of tidb serverless cluster | + +## `feature.endpoint` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `APP_WEB_URL` | `string` | `""` | `APP_WEB_URL` | Base URL for the web application, used for frontend references | +| `CONSOLE_API_URL` | `string` | `""` | `CONSOLE_API_URL` | Base URL for the console API, used for login authentication callback or notion integration callbacks | +| `CONSOLE_WEB_URL` | `string` | `""` | `CONSOLE_WEB_URL` | Base URL for the console web interface, used for frontend references and CORS configuration | +| `ENDPOINT_URL_TEMPLATE` | `string` | `"http://localhost:5002/e/{hook_id}"` | `ENDPOINT_URL_TEMPLATE` | Template url for endpoint plugin | +| `SERVICE_API_URL` | `string` | `""` | `SERVICE_API_URL` | Base URL for the service API, displayed to users for API access | +| `TRIGGER_URL` | `string` | `"http://localhost:5001"` | `TRIGGER_URL` | Template url for triggers | + +## `feature.file-access` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `FILES_ACCESS_TIMEOUT` | `integer` | `300` | `FILES_ACCESS_TIMEOUT` | Expiration time in seconds for file access URLs | +| `FILES_URL` | `string` | `""` | `FILES_URL, CONSOLE_API_URL` | Base URL for file preview or download, used for frontend display and multi-model inputs. The URL is signed and has an expiration time. | +| `INTERNAL_FILES_URL` | `string` | `""` | `INTERNAL_FILES_URL` | Internal base URL for file access within Docker network, used for plugin daemon and internal service communication. Falls back to FILES_URL if not specified. | + +## `feature.file-upload` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ANNOTATION_IMPORT_FILE_SIZE_LIMIT` | `integer` | `2` | `ANNOTATION_IMPORT_FILE_SIZE_LIMIT` | Maximum allowed CSV file size for annotation import in megabytes | +| `ANNOTATION_IMPORT_MAX_CONCURRENT` | `integer` | `2` | `ANNOTATION_IMPORT_MAX_CONCURRENT` | Maximum number of concurrent annotation import tasks per tenant | +| `ANNOTATION_IMPORT_MAX_RECORDS` | `integer` | `10000` | `ANNOTATION_IMPORT_MAX_RECORDS` | Maximum number of annotation records allowed in a single import | +| `ANNOTATION_IMPORT_MIN_RECORDS` | `integer` | `1` | `ANNOTATION_IMPORT_MIN_RECORDS` | Minimum number of annotation records required in a single import | +| `ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR` | `integer` | `20` | `ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR` | Maximum number of annotation import requests per hour per tenant | +| `ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE` | `integer` | `5` | `ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE` | Maximum number of annotation import requests per minute per tenant | +| `ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT` | `integer` | `60` | `ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT` | Timeout for downloading image attachments in seconds | +| `ATTACHMENT_IMAGE_FILE_SIZE_LIMIT` | `integer` | `2` | `ATTACHMENT_IMAGE_FILE_SIZE_LIMIT` | Maximum allowed image file size for attachments in megabytes | +| `BATCH_UPLOAD_LIMIT` | `integer` | `20` | `BATCH_UPLOAD_LIMIT` | Maximum number of files allowed in a batch upload operation | +| `IMAGE_FILE_BATCH_LIMIT` | `integer` | `10` | `IMAGE_FILE_BATCH_LIMIT` | Maximum number of files allowed in a image batch upload operation | +| `SINGLE_CHUNK_ATTACHMENT_LIMIT` | `integer` | `10` | `SINGLE_CHUNK_ATTACHMENT_LIMIT` | Maximum number of files allowed in a single chunk attachment | +| `UPLOAD_AUDIO_FILE_SIZE_LIMIT` | `integer` | `50` | `UPLOAD_AUDIO_FILE_SIZE_LIMIT` | audio file size limit in Megabytes for uploading files | +| `UPLOAD_FILE_BATCH_LIMIT` | `integer` | `5` | `UPLOAD_FILE_BATCH_LIMIT` | Maximum number of files allowed in a single upload batch | +| `UPLOAD_FILE_SIZE_LIMIT` | `integer` | `15` | `UPLOAD_FILE_SIZE_LIMIT` | Maximum allowed file size for uploads in megabytes | +| `UPLOAD_IMAGE_FILE_SIZE_LIMIT` | `integer` | `10` | `UPLOAD_IMAGE_FILE_SIZE_LIMIT` | Maximum allowed image file size for uploads in megabytes | +| `UPLOAD_VIDEO_FILE_SIZE_LIMIT` | `integer` | `100` | `UPLOAD_VIDEO_FILE_SIZE_LIMIT` | video file size limit in Megabytes for uploading files | +| `WORKFLOW_FILE_UPLOAD_LIMIT` | `integer` | `10` | `WORKFLOW_FILE_UPLOAD_LIMIT` | Maximum number of files allowed in a workflow upload operation | + +## `feature.hosted_service.hosted-anthropic` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_ANTHROPIC_API_BASE` | `string \| null` | `""` | `HOSTED_ANTHROPIC_API_BASE` | Base URL for hosted Anthropic API | +| `HOSTED_ANTHROPIC_API_KEY` | `string \| null` | `""` | `HOSTED_ANTHROPIC_API_KEY` | API key for hosted Anthropic service | +| `HOSTED_ANTHROPIC_PAID_ENABLED` | `boolean` | `false` | `HOSTED_ANTHROPIC_PAID_ENABLED` | Enable paid access to hosted Anthropic service | +| `HOSTED_ANTHROPIC_PAID_MODELS` | `string` | `"claude-opus-4-20250514,claude-sonnet-4-20250514,claude-3-5-haiku-20241022,claude-3-opus-20240229,claude-3-7-sonnet-20250219,claude-3-haiku-20240307"` | `HOSTED_ANTHROPIC_PAID_MODELS` | Comma-separated list of available models for paid access | +| `HOSTED_ANTHROPIC_TRIAL_ENABLED` | `boolean` | `false` | `HOSTED_ANTHROPIC_TRIAL_ENABLED` | Enable trial access to hosted Anthropic service | +| `HOSTED_ANTHROPIC_TRIAL_MODELS` | `string` | `"claude-opus-4-20250514,claude-sonnet-4-20250514,claude-3-5-haiku-20241022,claude-3-opus-20240229,claude-3-7-sonnet-20250219,claude-3-haiku-20240307"` | `HOSTED_ANTHROPIC_TRIAL_MODELS` | Comma-separated list of available models for paid access | + +## `feature.hosted_service.hosted-azure-open-ai` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_AZURE_OPENAI_API_BASE` | `string \| null` | `""` | `HOSTED_AZURE_OPENAI_API_BASE` | Base URL for hosted Azure OpenAI API | +| `HOSTED_AZURE_OPENAI_API_KEY` | `string \| null` | `""` | `HOSTED_AZURE_OPENAI_API_KEY` | API key for hosted Azure OpenAI service | +| `HOSTED_AZURE_OPENAI_ENABLED` | `boolean` | `false` | `HOSTED_AZURE_OPENAI_ENABLED` | Enable hosted Azure OpenAI service | +| `HOSTED_AZURE_OPENAI_QUOTA_LIMIT` | `integer` | `200` | `HOSTED_AZURE_OPENAI_QUOTA_LIMIT` | Quota limit for hosted Azure OpenAI service usage | + +## `feature.hosted_service.hosted-credit` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_MODEL_CREDIT_CONFIG` | `string` | `""` | `HOSTED_MODEL_CREDIT_CONFIG` | Model credit configuration in format 'model:credits, model:credits', e.g., 'gpt-4:20, gpt-4o:10' | +| `HOSTED_POOL_CREDITS` | `integer` | `200` | `HOSTED_POOL_CREDITS` | Pool credits for hosted service | + +## `feature.hosted_service.hosted-deepseek` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_DEEPSEEK_API_BASE` | `string \| null` | `""` | `HOSTED_DEEPSEEK_API_BASE` | Base URL for hosted Deepseek API | +| `HOSTED_DEEPSEEK_API_KEY` | `string \| null` | `""` | `HOSTED_DEEPSEEK_API_KEY` | API key for hosted Deepseek service | +| `HOSTED_DEEPSEEK_API_ORGANIZATION` | `string \| null` | `""` | `HOSTED_DEEPSEEK_API_ORGANIZATION` | Organization ID for hosted Deepseek service | +| `HOSTED_DEEPSEEK_PAID_ENABLED` | `boolean` | `false` | `HOSTED_DEEPSEEK_PAID_ENABLED` | Enable paid access to hosted Deepseek service | +| `HOSTED_DEEPSEEK_PAID_MODELS` | `string` | `"deepseek-chat,deepseek-reasoner"` | `HOSTED_DEEPSEEK_PAID_MODELS` | Comma-separated list of available models for paid access | +| `HOSTED_DEEPSEEK_TRIAL_ENABLED` | `boolean` | `false` | `HOSTED_DEEPSEEK_TRIAL_ENABLED` | Enable trial access to hosted Deepseek service | +| `HOSTED_DEEPSEEK_TRIAL_MODELS` | `string` | `"deepseek-chat,deepseek-reasoner"` | `HOSTED_DEEPSEEK_TRIAL_MODELS` | Comma-separated list of available models for trial access | + +## `feature.hosted_service.hosted-fetch-app-template` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_FETCH_APP_TEMPLATES_MODE` | `string` | `"remote"` | `HOSTED_FETCH_APP_TEMPLATES_MODE` | Mode for fetching app templates: remote, db, or builtin default to remote, | +| `HOSTED_FETCH_APP_TEMPLATES_REMOTE_DOMAIN` | `string` | `"https://tmpl.dify.ai"` | `HOSTED_FETCH_APP_TEMPLATES_REMOTE_DOMAIN` | Domain for fetching remote app templates | + +## `feature.hosted_service.hosted-fetch-pipeline-template` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_FETCH_PIPELINE_TEMPLATES_MODE` | `string` | `"remote"` | `HOSTED_FETCH_PIPELINE_TEMPLATES_MODE` | Mode for fetching pipeline templates: remote, db, or builtin default to remote, | +| `HOSTED_FETCH_PIPELINE_TEMPLATES_REMOTE_DOMAIN` | `string` | `"https://tmpl.dify.ai"` | `HOSTED_FETCH_PIPELINE_TEMPLATES_REMOTE_DOMAIN` | Domain for fetching remote pipeline templates | + +## `feature.hosted_service.hosted-gemini` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_GEMINI_API_BASE` | `string \| null` | `""` | `HOSTED_GEMINI_API_BASE` | Base URL for hosted Gemini API | +| `HOSTED_GEMINI_API_KEY` | `string \| null` | `""` | `HOSTED_GEMINI_API_KEY` | API key for hosted Gemini service | +| `HOSTED_GEMINI_API_ORGANIZATION` | `string \| null` | `""` | `HOSTED_GEMINI_API_ORGANIZATION` | Organization ID for hosted Gemini service | +| `HOSTED_GEMINI_PAID_ENABLED` | `boolean` | `false` | `HOSTED_GEMINI_PAID_ENABLED` | Enable paid access to hosted gemini service | +| `HOSTED_GEMINI_PAID_MODELS` | `string` | `"gemini-2.5-flash,gemini-2.0-flash,gemini-2.0-flash-lite,"` | `HOSTED_GEMINI_PAID_MODELS` | Comma-separated list of available models for paid access | +| `HOSTED_GEMINI_TRIAL_ENABLED` | `boolean` | `false` | `HOSTED_GEMINI_TRIAL_ENABLED` | Enable trial access to hosted Gemini service | +| `HOSTED_GEMINI_TRIAL_MODELS` | `string` | `"gemini-2.5-flash,gemini-2.0-flash,gemini-2.0-flash-lite,"` | `HOSTED_GEMINI_TRIAL_MODELS` | Comma-separated list of available models for trial access | + +## `feature.hosted_service.hosted-minmax` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_MINIMAX_ENABLED` | `boolean` | `false` | `HOSTED_MINIMAX_ENABLED` | Enable hosted Minmax service | + +## `feature.hosted_service.hosted-moderation` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_MODERATION_ENABLED` | `boolean` | `false` | `HOSTED_MODERATION_ENABLED` | Enable hosted Moderation service | +| `HOSTED_MODERATION_PROVIDERS` | `string` | `""` | `HOSTED_MODERATION_PROVIDERS` | Comma-separated list of moderation providers | + +## `feature.hosted_service.hosted-open-ai` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_OPENAI_API_BASE` | `string \| null` | `""` | `HOSTED_OPENAI_API_BASE` | Base URL for hosted OpenAI API | +| `HOSTED_OPENAI_API_KEY` | `string \| null` | `""` | `HOSTED_OPENAI_API_KEY` | API key for hosted OpenAI service | +| `HOSTED_OPENAI_API_ORGANIZATION` | `string \| null` | `""` | `HOSTED_OPENAI_API_ORGANIZATION` | Organization ID for hosted OpenAI service | +| `HOSTED_OPENAI_PAID_ENABLED` | `boolean` | `false` | `HOSTED_OPENAI_PAID_ENABLED` | Enable paid access to hosted OpenAI service | +| `HOSTED_OPENAI_PAID_MODELS` | `string` | `"gpt-4,gpt-4-turbo-preview,gpt-4-turbo-2024-04-09,gpt-4-1106-preview,gpt-4-0125-preview,gpt-4-turbo,gpt-4.1,gpt-4.1-2025-04-14,gpt-4.1-mini,gpt-4.1-mini-2025-04-14,gpt-4.1-nano,gpt-4.1-nano-2025-04-14,gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613,gpt-3.5-turbo-0125,gpt-3.5-turbo-instruct,text-davinci-003,chatgpt-4o-latest,gpt-4o,gpt-4o-2024-05-13,gpt-4o-2024-08-06,gpt-4o-2024-11-20,gpt-4o-audio-preview,gpt-4o-audio-preview-2025-06-03,gpt-4o-mini,gpt-4o-mini-2024-07-18,o3-mini,o3-mini-2025-01-31,gpt-5-mini-2025-08-07,gpt-5-mini,o4-mini,o4-mini-2025-04-16,gpt-5-chat-latest,gpt-5,gpt-5-2025-08-07,gpt-5-nano,gpt-5-nano-2025-08-07"` | `HOSTED_OPENAI_PAID_MODELS` | Comma-separated list of available models for paid access | +| `HOSTED_OPENAI_TRIAL_ENABLED` | `boolean` | `false` | `HOSTED_OPENAI_TRIAL_ENABLED` | Enable trial access to hosted OpenAI service | +| `HOSTED_OPENAI_TRIAL_MODELS` | `string` | `"gpt-4,gpt-4-turbo-preview,gpt-4-turbo-2024-04-09,gpt-4-1106-preview,gpt-4-0125-preview,gpt-4-turbo,gpt-4.1,gpt-4.1-2025-04-14,gpt-4.1-mini,gpt-4.1-mini-2025-04-14,gpt-4.1-nano,gpt-4.1-nano-2025-04-14,gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613,gpt-3.5-turbo-0125,gpt-3.5-turbo-instruct,text-davinci-003,chatgpt-4o-latest,gpt-4o,gpt-4o-2024-05-13,gpt-4o-2024-08-06,gpt-4o-2024-11-20,gpt-4o-audio-preview,gpt-4o-audio-preview-2025-06-03,gpt-4o-mini,gpt-4o-mini-2024-07-18,o3-mini,o3-mini-2025-01-31,gpt-5-mini-2025-08-07,gpt-5-mini,o4-mini,o4-mini-2025-04-16,gpt-5-chat-latest,gpt-5,gpt-5-2025-08-07,gpt-5-nano,gpt-5-nano-2025-08-07"` | `HOSTED_OPENAI_TRIAL_MODELS` | Comma-separated list of available models for trial access | + +## `feature.hosted_service.hosted-spark` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_SPARK_ENABLED` | `boolean` | `false` | `HOSTED_SPARK_ENABLED` | Enable hosted Spark service | + +## `feature.hosted_service.hosted-tongyi` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_TONGYI_API_KEY` | `string \| null` | `""` | `HOSTED_TONGYI_API_KEY` | API key for hosted Tongyi service | +| `HOSTED_TONGYI_PAID_ENABLED` | `boolean` | `false` | `HOSTED_TONGYI_PAID_ENABLED` | Enable paid access to hosted Anthropic service | +| `HOSTED_TONGYI_PAID_MODELS` | `string` | `""` | `HOSTED_TONGYI_PAID_MODELS` | Comma-separated list of available models for paid access | +| `HOSTED_TONGYI_TRIAL_ENABLED` | `boolean` | `false` | `HOSTED_TONGYI_TRIAL_ENABLED` | Enable trial access to hosted Tongyi service | +| `HOSTED_TONGYI_TRIAL_MODELS` | `string` | `""` | `HOSTED_TONGYI_TRIAL_MODELS` | Comma-separated list of available models for trial access | +| `HOSTED_TONGYI_USE_INTERNATIONAL_ENDPOINT` | `boolean` | `false` | `HOSTED_TONGYI_USE_INTERNATIONAL_ENDPOINT` | Use international endpoint for hosted Tongyi service | + +## `feature.hosted_service.hosted-x-a-i` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_XAI_API_BASE` | `string \| null` | `""` | `HOSTED_XAI_API_BASE` | Base URL for hosted XAI API | +| `HOSTED_XAI_API_KEY` | `string \| null` | `""` | `HOSTED_XAI_API_KEY` | API key for hosted XAI service | +| `HOSTED_XAI_API_ORGANIZATION` | `string \| null` | `""` | `HOSTED_XAI_API_ORGANIZATION` | Organization ID for hosted XAI service | +| `HOSTED_XAI_PAID_ENABLED` | `boolean` | `false` | `HOSTED_XAI_PAID_ENABLED` | Enable paid access to hosted XAI service | +| `HOSTED_XAI_PAID_MODELS` | `string` | `"grok-3,grok-3-mini,grok-3-mini-fast"` | `HOSTED_XAI_PAID_MODELS` | Comma-separated list of available models for paid access | +| `HOSTED_XAI_TRIAL_ENABLED` | `boolean` | `false` | `HOSTED_XAI_TRIAL_ENABLED` | Enable trial access to hosted XAI service | +| `HOSTED_XAI_TRIAL_MODELS` | `string` | `"grok-3,grok-3-mini,grok-3-mini-fast"` | `HOSTED_XAI_TRIAL_MODELS` | Comma-separated list of available models for trial access | + +## `feature.hosted_service.hosted-zhipu-a-i` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOSTED_ZHIPUAI_ENABLED` | `boolean` | `false` | `HOSTED_ZHIPUAI_ENABLED` | Enable hosted ZhipuAI service | + +## `feature.http` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `API_COMPRESSION_ENABLED` | `boolean` | `false` | `API_COMPRESSION_ENABLED` | Enable or disable gzip compression for HTTP responses | +| `COOKIE_DOMAIN` | `string` | `""` | `COOKIE_DOMAIN` | Explicit cookie domain for console/service cookies when sharing across subdomains | +| `HTTP_REQUEST_MAX_CONNECT_TIMEOUT` | `integer` | `10` | `HTTP_REQUEST_MAX_CONNECT_TIMEOUT` | Maximum connection timeout in seconds for HTTP requests | +| `HTTP_REQUEST_MAX_READ_TIMEOUT` | `integer` | `600` | `HTTP_REQUEST_MAX_READ_TIMEOUT` | Maximum read timeout in seconds for HTTP requests | +| `HTTP_REQUEST_MAX_WRITE_TIMEOUT` | `integer` | `600` | `HTTP_REQUEST_MAX_WRITE_TIMEOUT` | Maximum write timeout in seconds for HTTP requests | +| `HTTP_REQUEST_NODE_MAX_BINARY_SIZE` | `integer` | `10485760` | `HTTP_REQUEST_NODE_MAX_BINARY_SIZE` | Maximum allowed size in bytes for binary data in HTTP requests | +| `HTTP_REQUEST_NODE_MAX_TEXT_SIZE` | `integer` | `1048576` | `HTTP_REQUEST_NODE_MAX_TEXT_SIZE` | Maximum allowed size in bytes for text data in HTTP requests | +| `HTTP_REQUEST_NODE_SSL_VERIFY` | `boolean` | `true` | `HTTP_REQUEST_NODE_SSL_VERIFY` | Enable or disable SSL verification for HTTP requests | +| `RESPECT_XFORWARD_HEADERS_ENABLED` | `boolean` | `false` | `RESPECT_XFORWARD_HEADERS_ENABLED` | Enable handling of X-Forwarded-For, X-Forwarded-Proto, and X-Forwarded-Port headers when the app is behind a single trusted reverse proxy. | +| `SSRF_DEFAULT_CONNECT_TIME_OUT` | `float` | `5` | `SSRF_DEFAULT_CONNECT_TIME_OUT` | The default connect timeout period used for network requests (SSRF) | +| `SSRF_DEFAULT_MAX_RETRIES` | `integer` | `3` | `SSRF_DEFAULT_MAX_RETRIES` | Maximum number of retries for network requests (SSRF) | +| `SSRF_DEFAULT_READ_TIME_OUT` | `float` | `5` | `SSRF_DEFAULT_READ_TIME_OUT` | The default read timeout period used for network requests (SSRF) | +| `SSRF_DEFAULT_TIME_OUT` | `float` | `5` | `SSRF_DEFAULT_TIME_OUT` | The default timeout period used for network requests (SSRF) | +| `SSRF_DEFAULT_WRITE_TIME_OUT` | `float` | `5` | `SSRF_DEFAULT_WRITE_TIME_OUT` | The default write timeout period used for network requests (SSRF) | +| `SSRF_POOL_KEEPALIVE_EXPIRY` | `typing.Annotated[float, Gt(gt=0)] \| null` | `5.0` | `SSRF_POOL_KEEPALIVE_EXPIRY` | Keep-alive expiry in seconds for idle SSRF connections (set to None to disable) | +| `SSRF_POOL_MAX_CONNECTIONS` | `integer` | `100` | `SSRF_POOL_MAX_CONNECTIONS` | Maximum number of concurrent connections for the SSRF HTTP client | +| `SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS` | `integer` | `20` | `SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS` | Maximum number of persistent keep-alive connections for the SSRF HTTP client | +| `SSRF_PROXY_ALL_URL` | `string \| null` | `""` | `SSRF_PROXY_ALL_URL` | Proxy URL for HTTP or HTTPS requests to prevent Server-Side Request Forgery (SSRF) | +| `SSRF_PROXY_HTTPS_URL` | `string \| null` | `""` | `SSRF_PROXY_HTTPS_URL` | Proxy URL for HTTPS requests to prevent Server-Side Request Forgery (SSRF) | +| `SSRF_PROXY_HTTP_URL` | `string \| null` | `""` | `SSRF_PROXY_HTTP_URL` | Proxy URL for HTTP requests to prevent Server-Side Request Forgery (SSRF) | + +## `feature.indexing` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CHILD_CHUNKS_PREVIEW_NUMBER` | `integer` | `50` | `CHILD_CHUNKS_PREVIEW_NUMBER` | Maximum number of child chunks to preview | +| `INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH` | `integer` | `4000` | `INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH` | Maximum token length for text segmentation during indexing | + +## `feature.inner-a-p-i` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `INNER_API` | `boolean` | `false` | `INNER_API` | Enable or disable the internal API | +| `INNER_API_KEY` | `string \| null` | `""` | `INNER_API_KEY` | API key for accessing the internal API | + +## `feature.logging` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `LOG_DATEFORMAT` | `string \| null` | `""` | `LOG_DATEFORMAT` | Date format string for log timestamps | +| `LOG_FILE` | `string \| null` | `""` | `LOG_FILE` | File path for log output. | +| `LOG_FILE_BACKUP_COUNT` | `integer` | `5` | `LOG_FILE_BACKUP_COUNT` | Maximum file backup count file rotation retention | +| `LOG_FILE_MAX_SIZE` | `integer` | `20` | `LOG_FILE_MAX_SIZE` | Maximum file size for file rotation retention, the unit is megabytes (MB) | +| `LOG_FORMAT` | `string` | `"%(asctime)s.%(msecs)03d %(levelname)s [%(threadName)s] [%(filename)s:%(lineno)d] %(trace_id)s - %(message)s"` | `LOG_FORMAT` | Format string for log messages | +| `LOG_LEVEL` | `string` | `"INFO"` | `LOG_LEVEL` | Logging level, default to INFO. Set to ERROR for production environments. | +| `LOG_OUTPUT_FORMAT` | `literal['text', 'json']` | `"text"` | `LOG_OUTPUT_FORMAT` | Log output format: 'text' for human-readable, 'json' for structured JSON logs. | +| `LOG_TZ` | `string \| null` | `"UTC"` | `LOG_TZ` | Timezone for log timestamps (e.g., 'America/New_York') | + +## `feature.login` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ALLOW_CREATE_WORKSPACE` | `boolean` | `false` | `ALLOW_CREATE_WORKSPACE` | whether to enable create workspace | +| `ALLOW_REGISTER` | `boolean` | `false` | `ALLOW_REGISTER` | whether to enable register | +| `EMAIL_CODE_LOGIN_TOKEN_EXPIRY_MINUTES` | `integer` | `5` | `EMAIL_CODE_LOGIN_TOKEN_EXPIRY_MINUTES` | expiry time in minutes for email code login token | +| `ENABLE_EMAIL_CODE_LOGIN` | `boolean` | `false` | `ENABLE_EMAIL_CODE_LOGIN` | whether to enable email code login | +| `ENABLE_EMAIL_PASSWORD_LOGIN` | `boolean` | `true` | `ENABLE_EMAIL_PASSWORD_LOGIN` | whether to enable email password login | +| `ENABLE_SOCIAL_OAUTH_LOGIN` | `boolean` | `false` | `ENABLE_SOCIAL_OAUTH_LOGIN` | whether to enable github/google oauth login | + +## `feature.mail` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `EMAIL_SEND_IP_LIMIT_PER_MINUTE` | `integer` | `50` | `EMAIL_SEND_IP_LIMIT_PER_MINUTE` | Maximum number of emails allowed to be sent from the same IP address in a minute | +| `ENABLE_EXPLORE_BANNER` | `boolean` | `false` | `ENABLE_EXPLORE_BANNER` | Enable explore banner | +| `ENABLE_TRIAL_APP` | `boolean` | `false` | `ENABLE_TRIAL_APP` | Enable trial app | +| `MAIL_DEFAULT_SEND_FROM` | `string \| null` | `""` | `MAIL_DEFAULT_SEND_FROM` | Default email address to use as the sender | +| `MAIL_TEMPLATING_MODE` | `enum` | `"sandbox"` | `MAIL_TEMPLATING_MODE` | Template mode for email services | +| `MAIL_TEMPLATING_TIMEOUT` | `integer` | `3` | `MAIL_TEMPLATING_TIMEOUT` | Timeout for email templating in seconds. Used to prevent infinite loops in malicious templates. Only available in sandbox mode. | +| `MAIL_TYPE` | `string \| null` | `""` | `MAIL_TYPE` | Email service provider type ('smtp' or 'resend' or 'sendGrid), default to None. | +| `RESEND_API_KEY` | `string \| null` | `""` | `RESEND_API_KEY` | API key for Resend email service | +| `RESEND_API_URL` | `string \| null` | `""` | `RESEND_API_URL` | API URL for Resend email service | +| `SENDGRID_API_KEY` | `string \| null` | `""` | `SENDGRID_API_KEY` | API key for SendGrid service | +| `SMTP_LOCAL_HOSTNAME` | `string \| null` | `""` | `SMTP_LOCAL_HOSTNAME` | Override the local hostname used in SMTP HELO/EHLO. Useful behind NAT or when the default hostname causes rejections. | +| `SMTP_OPPORTUNISTIC_TLS` | `boolean` | `false` | `SMTP_OPPORTUNISTIC_TLS` | Enable opportunistic TLS for SMTP connections | +| `SMTP_PASSWORD` | `string \| null` | `""` | `SMTP_PASSWORD` | Password for SMTP authentication | +| `SMTP_PORT` | `integer \| null` | `465` | `SMTP_PORT` | SMTP server port number | +| `SMTP_SERVER` | `string \| null` | `""` | `SMTP_SERVER` | SMTP server hostname | +| `SMTP_USERNAME` | `string \| null` | `""` | `SMTP_USERNAME` | Username for SMTP authentication | +| `SMTP_USE_TLS` | `boolean` | `false` | `SMTP_USE_TLS` | Enable TLS encryption for SMTP connections | + +## `feature.marketplace` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `MARKETPLACE_API_URL` | `HttpUrl` | `"https://marketplace.dify.ai/"` | `MARKETPLACE_API_URL` | Marketplace API URL | +| `MARKETPLACE_ENABLED` | `boolean` | `true` | `MARKETPLACE_ENABLED` | Enable or disable marketplace | + +## `feature.model-load-balance` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `MODEL_LB_ENABLED` | `boolean` | `false` | `MODEL_LB_ENABLED` | Enable or disable load balancing for models | +| `PLUGIN_BASED_TOKEN_COUNTING_ENABLED` | `boolean` | `false` | `PLUGIN_BASED_TOKEN_COUNTING_ENABLED` | Enable or disable plugin based token counting. If disabled, token counting will return 0. | + +## `feature.moderation` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `MODERATION_BUFFER_SIZE` | `integer` | `300` | `MODERATION_BUFFER_SIZE` | Size of the buffer for content moderation processing | + +## `feature.multi-modal-transfer` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `MULTIMODAL_SEND_FORMAT` | `literal['base64', 'url']` | `"base64"` | `MULTIMODAL_SEND_FORMAT` | Format for sending files in multimodal contexts ('base64' or 'url'), default is base64 | + +## `feature.plugin` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `INNER_API_KEY_FOR_PLUGIN` | `string` | `"inner-api-key"` | `INNER_API_KEY_FOR_PLUGIN` | Inner api key for plugin | +| `PLUGIN_DAEMON_KEY` | `string` | `"plugin-api-key"` | `PLUGIN_DAEMON_KEY` | Plugin API key | +| `PLUGIN_DAEMON_TIMEOUT` | `typing.Annotated[float, Gt(gt=0)] \| null` | `600.0` | `PLUGIN_DAEMON_TIMEOUT` | Timeout in seconds for requests to the plugin daemon (set to None to disable) | +| `PLUGIN_DAEMON_URL` | `HttpUrl` | `"http://localhost:5002/"` | `PLUGIN_DAEMON_URL` | Plugin API URL | +| `PLUGIN_MAX_BUNDLE_SIZE` | `integer` | `188743680` | `PLUGIN_MAX_BUNDLE_SIZE` | Maximum allowed size for plugin bundles in bytes | +| `PLUGIN_MAX_FILE_SIZE` | `integer` | `52428800` | `PLUGIN_MAX_FILE_SIZE` | Maximum allowed size (bytes) for plugin-generated files | +| `PLUGIN_MAX_PACKAGE_SIZE` | `integer` | `15728640` | `PLUGIN_MAX_PACKAGE_SIZE` | Maximum allowed size for plugin packages in bytes | +| `PLUGIN_MODEL_SCHEMA_CACHE_TTL` | `integer` | `3600` | `PLUGIN_MODEL_SCHEMA_CACHE_TTL` | TTL in seconds for caching plugin model schemas in Redis | +| `PLUGIN_REMOTE_INSTALL_HOST` | `string` | `"localhost"` | `PLUGIN_REMOTE_INSTALL_HOST` | Plugin Remote Install Host | +| `PLUGIN_REMOTE_INSTALL_PORT` | `integer` | `5003` | `PLUGIN_REMOTE_INSTALL_PORT` | Plugin Remote Install Port | + +## `feature.position` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `POSITION_PROVIDER_EXCLUDES` | `string` | `""` | `POSITION_PROVIDER_EXCLUDES` | Comma-separated list of excluded model providers | +| `POSITION_PROVIDER_INCLUDES` | `string` | `""` | `POSITION_PROVIDER_INCLUDES` | Comma-separated list of included model providers | +| `POSITION_PROVIDER_PINS` | `string` | `""` | `POSITION_PROVIDER_PINS` | Comma-separated list of pinned model providers | +| `POSITION_TOOL_EXCLUDES` | `string` | `""` | `POSITION_TOOL_EXCLUDES` | Comma-separated list of excluded tools | +| `POSITION_TOOL_INCLUDES` | `string` | `""` | `POSITION_TOOL_INCLUDES` | Comma-separated list of included tools | +| `POSITION_TOOL_PINS` | `string` | `""` | `POSITION_TOOL_PINS` | Comma-separated list of pinned tools | + +## `feature.rag-etl` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ETL_TYPE` | `string` | `"dify"` | `ETL_TYPE` | RAG ETL type ('dify' or 'Unstructured'), default to 'dify' | +| `KEYWORD_DATA_SOURCE_TYPE` | `string` | `"database"` | `KEYWORD_DATA_SOURCE_TYPE` | Data source type for keyword extraction ('database' or other supported types), default to 'database' | +| `SCARF_NO_ANALYTICS` | `string \| null` | `"false"` | `SCARF_NO_ANALYTICS` | This is about whether to disable Scarf analytics in Unstructured library. | +| `UNSTRUCTURED_API_KEY` | `string \| null` | `""` | `UNSTRUCTURED_API_KEY` | API key for Unstructured.io service | +| `UNSTRUCTURED_API_URL` | `string \| null` | `""` | `UNSTRUCTURED_API_URL` | API URL for Unstructured.io service | + +## `feature.repository` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `API_WORKFLOW_NODE_EXECUTION_REPOSITORY` | `string` | `"repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository"` | `API_WORKFLOW_NODE_EXECUTION_REPOSITORY` | Service-layer repository implementation for WorkflowNodeExecutionModel operations. Specify as a module path | +| `API_WORKFLOW_RUN_REPOSITORY` | `string` | `"repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository"` | `API_WORKFLOW_RUN_REPOSITORY` | Service-layer repository implementation for WorkflowRun operations. Specify as a module path | +| `CORE_WORKFLOW_EXECUTION_REPOSITORY` | `string` | `"core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository"` | `CORE_WORKFLOW_EXECUTION_REPOSITORY` | Repository implementation for WorkflowExecution. Options: 'core.repositories.sqlalchemy_workflow_execution_repository. SQLAlchemyWorkflowExecutionRepository' (default), 'core.repositories.celery_workflow_execution_repository. CeleryWorkflowExecutionRepository' | +| `CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY` | `string` | `"core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository"` | `CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY` | Repository implementation for WorkflowNodeExecution. Options: 'core.repositories.sqlalchemy_workflow_node_execution_repository. SQLAlchemyWorkflowNodeExecutionRepository' (default), 'core.repositories.celery_workflow_node_execution_repository. CeleryWorkflowNodeExecutionRepository' | + +## `feature.sandbox-expired-records-clean` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL` | `integer` | `200` | `SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL` | Maximum interval in milliseconds between batches | +| `SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE` | `integer` | `1000` | `SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE` | Maximum number of records to process in each batch | +| `SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD` | `integer` | `21` | `SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD` | Graceful period in days for sandbox records clean after subscription expiration | +| `SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL` | `integer` | `90000` | `SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL` | Lock TTL for sandbox expired records clean task in seconds | +| `SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS` | `integer` | `30` | `SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS` | Retention days for sandbox expired workflow_run records and message records | + +## `feature.security` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ADMIN_API_KEY` | `string \| null` | `""` | `ADMIN_API_KEY` | admin api key for authentication | +| `ADMIN_API_KEY_ENABLE` | `boolean` | `false` | `ADMIN_API_KEY_ENABLE` | Whether to enable admin api key for authentication | +| `CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES` | `integer` | `5` | `CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES` | Duration in minutes for which a change email token remains valid | +| `EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES` | `integer` | `5` | `EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES` | Duration in minutes for which a email register token remains valid | +| `LOGIN_DISABLED` | `boolean` | `false` | `LOGIN_DISABLED` | Whether to disable login checks | +| `OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES` | `integer` | `5` | `OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES` | Duration in minutes for which a owner transfer token remains valid | +| `RESET_PASSWORD_TOKEN_EXPIRY_MINUTES` | `integer` | `5` | `RESET_PASSWORD_TOKEN_EXPIRY_MINUTES` | Duration in minutes for which a password reset token remains valid | +| `SECRET_KEY` | `string` | `""` | `SECRET_KEY` | Secret key for secure session cookie signing. Make sure you are changing this key for your deployment with a strong key. Generate a strong key using `openssl rand -base64 42` or set via the `SECRET_KEY` environment variable. | +| `WEB_FORM_SUBMIT_RATE_LIMIT_MAX_ATTEMPTS` | `integer` | `30` | `WEB_FORM_SUBMIT_RATE_LIMIT_MAX_ATTEMPTS` | Maximum number of web form submissions allowed per IP within the rate limit window | +| `WEB_FORM_SUBMIT_RATE_LIMIT_WINDOW_SECONDS` | `integer` | `60` | `WEB_FORM_SUBMIT_RATE_LIMIT_WINDOW_SECONDS` | Time window in seconds for web form submission rate limiting | + +## `feature.swagger-u-i` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `SWAGGER_UI_ENABLED` | `boolean` | `true` | `SWAGGER_UI_ENABLED` | Whether to enable Swagger UI in api module | +| `SWAGGER_UI_PATH` | `string` | `"/swagger-ui.html"` | `SWAGGER_UI_PATH` | Swagger UI page path in api module | + +## `feature.tenant-isolated-task-queue` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `TENANT_ISOLATED_TASK_CONCURRENCY` | `integer` | `1` | `TENANT_ISOLATED_TASK_CONCURRENCY` | Number of tasks allowed to be delivered concurrently from isolated queue per tenant | + +## `feature.tool` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `TOOL_ICON_CACHE_MAX_AGE` | `integer` | `3600` | `TOOL_ICON_CACHE_MAX_AGE` | Maximum age in seconds for caching tool icons | + +## `feature.trigger` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `WEBHOOK_REQUEST_BODY_MAX_SIZE` | `integer` | `10485760` | `WEBHOOK_REQUEST_BODY_MAX_SIZE` | Maximum allowed size for webhook request bodies in bytes | + +## `feature.update` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CHECK_UPDATE_URL` | `string` | `"https://updates.dify.ai"` | `CHECK_UPDATE_URL` | URL to check for application updates | + +## `feature.workflow` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `GRAPH_ENGINE_MAX_WORKERS` | `integer` | `10` | `GRAPH_ENGINE_MAX_WORKERS` | Maximum number of workers per GraphEngine instance | +| `GRAPH_ENGINE_MIN_WORKERS` | `integer` | `1` | `GRAPH_ENGINE_MIN_WORKERS` | Minimum number of workers per GraphEngine instance | +| `GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME` | `float` | `5.0` | `GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME` | Seconds of idle time before scaling down workers | +| `GRAPH_ENGINE_SCALE_UP_THRESHOLD` | `integer` | `3` | `GRAPH_ENGINE_SCALE_UP_THRESHOLD` | Queue depth threshold that triggers worker scale up | +| `MAX_VARIABLE_SIZE` | `integer` | `204800` | `MAX_VARIABLE_SIZE` | Maximum size in bytes for a single variable in workflows. Default to 200 KB. | +| `TEMPLATE_TRANSFORM_MAX_LENGTH` | `integer` | `400000` | `TEMPLATE_TRANSFORM_MAX_LENGTH` | Maximum number of characters allowed in Template Transform node output | +| `WORKFLOW_CALL_MAX_DEPTH` | `integer` | `5` | `WORKFLOW_CALL_MAX_DEPTH` | Maximum allowed depth for nested workflow calls | +| `WORKFLOW_MAX_EXECUTION_STEPS` | `integer` | `500` | `WORKFLOW_MAX_EXECUTION_STEPS` | Maximum number of steps allowed in a single workflow execution | +| `WORKFLOW_MAX_EXECUTION_TIME` | `integer` | `1200` | `WORKFLOW_MAX_EXECUTION_TIME` | Maximum execution time in seconds for a single workflow | + +## `feature.workflow-log` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `WORKFLOW_LOG_CLEANUP_BATCH_SIZE` | `integer` | `100` | `WORKFLOW_LOG_CLEANUP_BATCH_SIZE` | Batch size for workflow run log cleanup operations | +| `WORKFLOW_LOG_CLEANUP_ENABLED` | `boolean` | `false` | `WORKFLOW_LOG_CLEANUP_ENABLED` | Enable workflow run log cleanup | +| `WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS` | `string` | `""` | `WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS` | Comma-separated list of workflow IDs to clean logs for | +| `WORKFLOW_LOG_RETENTION_DAYS` | `integer` | `30` | `WORKFLOW_LOG_RETENTION_DAYS` | Retention days for workflow run logs | + +## `feature.workflow-node-execution` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `MAX_SUBMIT_COUNT` | `integer` | `100` | `MAX_SUBMIT_COUNT` | Maximum number of submitted thread count in a ThreadPool for parallel node execution | +| `WORKFLOW_NODE_EXECUTION_STORAGE` | `string` | `"rdbms"` | `WORKFLOW_NODE_EXECUTION_STORAGE` | Storage backend for WorkflowNodeExecution. Options: 'rdbms', 'hybrid' | + +## `feature.workflow-variable-truncation` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `WORKFLOW_VARIABLE_TRUNCATION_ARRAY_LENGTH` | `integer` | `1000` | `WORKFLOW_VARIABLE_TRUNCATION_ARRAY_LENGTH` | maximum length for array to trigger truncation. | +| `WORKFLOW_VARIABLE_TRUNCATION_MAX_SIZE` | `integer` | `1024000` | `WORKFLOW_VARIABLE_TRUNCATION_MAX_SIZE` | Maximum size for variable to trigger final truncation. | +| `WORKFLOW_VARIABLE_TRUNCATION_STRING_LENGTH` | `integer` | `100000` | `WORKFLOW_VARIABLE_TRUNCATION_STRING_LENGTH` | maximum length for string to trigger tuncation, measure in number of characters | + +## `feature.workspace` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `INVITE_EXPIRY_HOURS` | `integer` | `72` | `INVITE_EXPIRY_HOURS` | Expiration time in hours for workspace invitation links | + +## `middleware.cache.redis` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `REDIS_CLUSTERS` | `string \| null` | `""` | `REDIS_CLUSTERS` | Comma-separated list of Redis Clusters nodes (host:port) | +| `REDIS_CLUSTERS_PASSWORD` | `string \| null` | `""` | `REDIS_CLUSTERS_PASSWORD` | Password for Redis Clusters authentication (if required) | +| `REDIS_DB` | `integer` | `0` | `REDIS_DB` | Redis database number to use (0-15) | +| `REDIS_ENABLE_CLIENT_SIDE_CACHE` | `boolean` | `false` | `REDIS_ENABLE_CLIENT_SIDE_CACHE` | Enable client side cache in redis | +| `REDIS_HEALTH_CHECK_INTERVAL` | `integer` | `30` | `REDIS_HEALTH_CHECK_INTERVAL` | Interval in seconds between Redis connection health checks (0 to disable) | +| `REDIS_HOST` | `string` | `"localhost"` | `REDIS_HOST` | Hostname or IP address of the Redis server | +| `REDIS_KEY_PREFIX` | `string` | `""` | `REDIS_KEY_PREFIX` | Optional global prefix for Redis keys, topics, and transport artifacts | +| `REDIS_MAX_CONNECTIONS` | `typing.Annotated[int, Gt(gt=0)] \| null` | `""` | `REDIS_MAX_CONNECTIONS` | Maximum connections in the Redis connection pool (unset for library default) | +| `REDIS_PASSWORD` | `string \| null` | `""` | `REDIS_PASSWORD` | Password for Redis authentication (if required) | +| `REDIS_PORT` | `integer` | `6379` | `REDIS_PORT` | Port number on which the Redis server is listening | +| `REDIS_RETRY_BACKOFF_BASE` | `float` | `1.0` | `REDIS_RETRY_BACKOFF_BASE` | Base delay in seconds for exponential backoff between retries | +| `REDIS_RETRY_BACKOFF_CAP` | `float` | `10.0` | `REDIS_RETRY_BACKOFF_CAP` | Maximum backoff delay in seconds between retries | +| `REDIS_RETRY_RETRIES` | `integer` | `3` | `REDIS_RETRY_RETRIES` | Maximum number of retries per Redis command on transient failures (ConnectionError, TimeoutError, socket.timeout) | +| `REDIS_SENTINELS` | `string \| null` | `""` | `REDIS_SENTINELS` | Comma-separated list of Redis Sentinel nodes (host:port) | +| `REDIS_SENTINEL_PASSWORD` | `string \| null` | `""` | `REDIS_SENTINEL_PASSWORD` | Password for Redis Sentinel authentication (if required) | +| `REDIS_SENTINEL_SERVICE_NAME` | `string \| null` | `""` | `REDIS_SENTINEL_SERVICE_NAME` | Name of the Redis Sentinel service to monitor | +| `REDIS_SENTINEL_SOCKET_TIMEOUT` | `typing.Annotated[float, Gt(gt=0)] \| null` | `0.1` | `REDIS_SENTINEL_SOCKET_TIMEOUT` | Socket timeout in seconds for Redis Sentinel connections | +| `REDIS_SENTINEL_USERNAME` | `string \| null` | `""` | `REDIS_SENTINEL_USERNAME` | Username for Redis Sentinel authentication (if required) | +| `REDIS_SERIALIZATION_PROTOCOL` | `integer` | `3` | `REDIS_SERIALIZATION_PROTOCOL` | Redis serialization protocol (RESP) version | +| `REDIS_SOCKET_CONNECT_TIMEOUT` | `typing.Annotated[float, Gt(gt=0)] \| null` | `5.0` | `REDIS_SOCKET_CONNECT_TIMEOUT` | Socket timeout in seconds for Redis connection establishment | +| `REDIS_SOCKET_TIMEOUT` | `typing.Annotated[float, Gt(gt=0)] \| null` | `5.0` | `REDIS_SOCKET_TIMEOUT` | Socket timeout in seconds for Redis read/write operations | +| `REDIS_SSL_CA_CERTS` | `string \| null` | `""` | `REDIS_SSL_CA_CERTS` | Path to the CA certificate file for SSL verification | +| `REDIS_SSL_CERTFILE` | `string \| null` | `""` | `REDIS_SSL_CERTFILE` | Path to the client certificate file for SSL authentication | +| `REDIS_SSL_CERT_REQS` | `string` | `"CERT_NONE"` | `REDIS_SSL_CERT_REQS` | SSL certificate requirements (CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED) | +| `REDIS_SSL_KEYFILE` | `string \| null` | `""` | `REDIS_SSL_KEYFILE` | Path to the client private key file for SSL authentication | +| `REDIS_USERNAME` | `string \| null` | `""` | `REDIS_USERNAME` | Username for Redis authentication (if required) | +| `REDIS_USE_CLUSTERS` | `boolean` | `false` | `REDIS_USE_CLUSTERS` | Enable Redis Clusters mode for high availability | +| `REDIS_USE_SENTINEL` | `boolean \| null` | `false` | `REDIS_USE_SENTINEL` | Enable Redis Sentinel mode for high availability | +| `REDIS_USE_SSL` | `boolean` | `false` | `REDIS_USE_SSL` | Enable SSL/TLS for the Redis connection | + +## `middleware.cache.redis-pub-sub` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `PUBSUB_REDIS_CHANNEL_TYPE` | `literal['pubsub', 'sharded', 'streams']` | `"pubsub"` | `EVENT_BUS_REDIS_CHANNEL_TYPE, PUBSUB_REDIS_CHANNEL_TYPE` | Event transport type. Options are: - pubsub: normal Pub/Sub (at-most-once) - sharded: sharded Pub/Sub (at-most-once) - streams: Redis Streams (at-least-once, recommended to avoid subscriber races) Note: Before enabling 'streams' in production, estimate your expected event volume and retention needs. Configure Redis memory limits and stream trimming appropriately (e.g., MAXLEN and key expiry) to reduce the risk of data loss from Redis auto-eviction under memory pressure. Also accepts ENV: EVENT_BUS_REDIS_CHANNEL_TYPE. | +| `PUBSUB_REDIS_URL` | `string \| null` | `""` | `EVENT_BUS_REDIS_URL, PUBSUB_REDIS_URL` | Redis connection URL for streaming events between API and celery worker; defaults to URL constructed from `REDIS_*` configurations. Also accepts ENV: EVENT_BUS_REDIS_URL. | +| `PUBSUB_REDIS_USE_CLUSTERS` | `boolean` | `false` | `EVENT_BUS_REDIS_USE_CLUSTERS, PUBSUB_REDIS_USE_CLUSTERS` | Enable Redis Cluster mode for pub/sub or streams transport. Recommended for large deployments. Also accepts ENV: EVENT_BUS_REDIS_USE_CLUSTERS. | +| `PUBSUB_STREAMS_RETENTION_SECONDS` | `integer` | `600` | `EVENT_BUS_STREAMS_RETENTION_SECONDS, PUBSUB_STREAMS_RETENTION_SECONDS` | When using 'streams', expire each stream key this many seconds after the last event is published. Also accepts ENV: EVENT_BUS_STREAMS_RETENTION_SECONDS. | + +## `middleware.celery` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CELERY_BACKEND` | `string` | `"redis"` | `CELERY_BACKEND` | Backend for Celery task results. Options: 'database', 'redis', 'rabbitmq'. | +| `CELERY_BROKER_URL` | `string \| null` | `""` | `CELERY_BROKER_URL` | URL of the message broker for Celery tasks. | +| `CELERY_SENTINEL_MASTER_NAME` | `string \| null` | `""` | `CELERY_SENTINEL_MASTER_NAME` | Name of the Redis Sentinel master. | +| `CELERY_SENTINEL_PASSWORD` | `string \| null` | `""` | `CELERY_SENTINEL_PASSWORD` | Password of the Redis Sentinel master. | +| `CELERY_SENTINEL_SOCKET_TIMEOUT` | `typing.Annotated[float, Gt(gt=0)] \| null` | `0.1` | `CELERY_SENTINEL_SOCKET_TIMEOUT` | Timeout for Redis Sentinel socket operations in seconds. | +| `CELERY_TASK_ANNOTATIONS` | `dict[str, typing.Any] \| null` | `""` | `CELERY_TASK_ANNOTATIONS` | Annotations for Celery tasks as a JSON mapping of task name -> options (for example, rate limits or other task-specific settings). | +| `CELERY_USE_SENTINEL` | `boolean \| null` | `false` | `CELERY_USE_SENTINEL` | Whether to use Redis Sentinel for high availability. | + +## `middleware.database` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `DB_CHARSET` | `string` | `""` | `DB_CHARSET` | Character set for database connection. | +| `DB_DATABASE` | `string` | `"dify"` | `DB_DATABASE` | Name of the database to connect to. | +| `DB_EXTRAS` | `string` | `""` | `DB_EXTRAS` | Additional database connection parameters. Example: 'keepalives_idle=60&keepalives=1' | +| `DB_HOST` | `string` | `"localhost"` | `DB_HOST` | Hostname or IP address of the database server. | +| `DB_PASSWORD` | `string` | `""` | `DB_PASSWORD` | Password for database authentication. | +| `DB_PORT` | `integer` | `5432` | `DB_PORT` | Port number for database connection. | +| `DB_SESSION_TIMEZONE_OVERRIDE` | `string` | `"UTC"` | `DB_SESSION_TIMEZONE_OVERRIDE` | PostgreSQL session timezone override injected via startup options. Default is 'UTC' for out-of-the-box consistency. Set to empty string to disable app-level timezone injection, for example when using RDS Proxy together with a database-side default timezone. | +| `DB_TYPE` | `literal['postgresql', 'mysql', 'oceanbase', 'seekdb']` | `"postgresql"` | `DB_TYPE` | Database type to use. OceanBase is MySQL-compatible. | +| `DB_USERNAME` | `string` | `"postgres"` | `DB_USERNAME` | Username for database authentication. | +| `RETRIEVAL_SERVICE_EXECUTORS` | `integer` | `10` | `RETRIEVAL_SERVICE_EXECUTORS` | Number of processes for the retrieval service, default to CPU cores. | +| `SQLALCHEMY_ECHO` | `boolean \| string` | `false` | `SQLALCHEMY_ECHO` | If True, SQLAlchemy will log all SQL statements. | +| `SQLALCHEMY_MAX_OVERFLOW` | `integer` | `10` | `SQLALCHEMY_MAX_OVERFLOW` | Maximum number of connections that can be created beyond the pool_size. | +| `SQLALCHEMY_POOL_PRE_PING` | `boolean` | `false` | `SQLALCHEMY_POOL_PRE_PING` | If True, enables connection pool pre-ping feature to check connections. | +| `SQLALCHEMY_POOL_RECYCLE` | `integer` | `3600` | `SQLALCHEMY_POOL_RECYCLE` | Number of seconds after which a connection is automatically recycled. | +| `SQLALCHEMY_POOL_SIZE` | `integer` | `30` | `SQLALCHEMY_POOL_SIZE` | Maximum number of database connections in the pool. | +| `SQLALCHEMY_POOL_TIMEOUT` | `integer` | `30` | `SQLALCHEMY_POOL_TIMEOUT` | Number of seconds to wait for a connection from the pool before raising a timeout error. | +| `SQLALCHEMY_POOL_USE_LIFO` | `boolean` | `false` | `SQLALCHEMY_POOL_USE_LIFO` | If True, SQLAlchemy will use last-in-first-out way to retrieve connections from pool. | + +## `middleware.dataset-queue-monitor` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `QUEUE_MONITOR_ALERT_EMAILS` | `string \| null` | `""` | `QUEUE_MONITOR_ALERT_EMAILS` | Emails for dataset queue monitor alert, separated by commas | +| `QUEUE_MONITOR_INTERVAL` | `typing.Annotated[float, Ge(ge=0)] \| null` | `30` | `QUEUE_MONITOR_INTERVAL` | Interval for dataset queue monitor in minutes | +| `QUEUE_MONITOR_THRESHOLD` | `typing.Annotated[int, Ge(ge=0)] \| null` | `200` | `QUEUE_MONITOR_THRESHOLD` | Threshold for dataset queue monitor | + +## `middleware.internal-test` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `AWS_ACCESS_KEY_ID` | `string \| null` | `""` | `AWS_ACCESS_KEY_ID` | Internal test AWS access key ID | +| `AWS_SECRET_ACCESS_KEY` | `string \| null` | `""` | `AWS_SECRET_ACCESS_KEY` | Internal test AWS secret access key | + +## `middleware.keyword-store` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `KEYWORD_STORE` | `string` | `"jieba"` | `KEYWORD_STORE` | Method for keyword extraction and storage. Default is 'jieba', a Chinese text segmentation library. | + +## `middleware.storage` + +Applies when: +- `STORAGE_LOCAL_PATH`: `STORAGE_TYPE=local` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `STORAGE_LOCAL_PATH` | `string` | `"storage"` | `STORAGE_LOCAL_PATH` | Path for local storage when STORAGE_TYPE is set to 'local'. | +| `STORAGE_TYPE` | `literal['opendal', 's3', 'aliyun-oss', 'azure-blob', 'baidu-obs', 'clickzetta-volume', 'google-storage', 'huawei-obs', 'oci-storage', 'tencent-cos', 'volcengine-tos', 'supabase', 'local']` | `"opendal"` | `STORAGE_TYPE` | Type of storage to use. Options: 'opendal', '(deprecated) local', 's3', 'aliyun-oss', 'azure-blob', 'baidu-obs', 'clickzetta-volume', 'google-storage', 'huawei-obs', 'oci-storage', 'tencent-cos', 'volcengine-tos', 'supabase'. Default is 'opendal'. | + +## `middleware.storage.aliyun-o-s-s-storage` + +> Applies when: `STORAGE_TYPE=aliyun-oss` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ALIYUN_CLOUDBOX_ID` | `string \| null` | `""` | `ALIYUN_CLOUDBOX_ID` | Cloudbox id for aliyun cloudbox service | +| `ALIYUN_OSS_ACCESS_KEY` | `string \| null` | `""` | `ALIYUN_OSS_ACCESS_KEY` | Access key ID for authenticating with Aliyun OSS | +| `ALIYUN_OSS_AUTH_VERSION` | `string \| null` | `""` | `ALIYUN_OSS_AUTH_VERSION` | Version of the authentication protocol to use with Aliyun OSS (e.g., 'v4') | +| `ALIYUN_OSS_BUCKET_NAME` | `string \| null` | `""` | `ALIYUN_OSS_BUCKET_NAME` | Name of the Aliyun OSS bucket to store and retrieve objects | +| `ALIYUN_OSS_ENDPOINT` | `string \| null` | `""` | `ALIYUN_OSS_ENDPOINT` | URL of the Aliyun OSS endpoint for your chosen region | +| `ALIYUN_OSS_PATH` | `string \| null` | `""` | `ALIYUN_OSS_PATH` | Base path within the bucket to store objects (e.g., 'my-app-data/') | +| `ALIYUN_OSS_REGION` | `string \| null` | `""` | `ALIYUN_OSS_REGION` | Aliyun OSS region where your bucket is located (e.g., 'oss-cn-hangzhou') | +| `ALIYUN_OSS_SECRET_KEY` | `string \| null` | `""` | `ALIYUN_OSS_SECRET_KEY` | Secret access key for authenticating with Aliyun OSS | + +## `middleware.storage.azure-blob-storage` + +> Applies when: `STORAGE_TYPE=azure-blob` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `AZURE_BLOB_ACCOUNT_KEY` | `string \| null` | `""` | `AZURE_BLOB_ACCOUNT_KEY` | Access key for authenticating with the Azure Storage account | +| `AZURE_BLOB_ACCOUNT_NAME` | `string \| null` | `""` | `AZURE_BLOB_ACCOUNT_NAME` | Name of the Azure Storage account (e.g., 'mystorageaccount') | +| `AZURE_BLOB_ACCOUNT_URL` | `string \| null` | `""` | `AZURE_BLOB_ACCOUNT_URL` | URL of the Azure Blob storage endpoint (e.g., 'https://mystorageaccount.blob.core.windows.net') | +| `AZURE_BLOB_CONTAINER_NAME` | `string \| null` | `""` | `AZURE_BLOB_CONTAINER_NAME` | Name of the Azure Blob container to store and retrieve objects | + +## `middleware.storage.baidu-o-b-s-storage` + +> Applies when: `STORAGE_TYPE=baidu-obs` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `BAIDU_OBS_ACCESS_KEY` | `string \| null` | `""` | `BAIDU_OBS_ACCESS_KEY` | Access Key ID for authenticating with Baidu OBS | +| `BAIDU_OBS_BUCKET_NAME` | `string \| null` | `""` | `BAIDU_OBS_BUCKET_NAME` | Name of the Baidu OBS bucket to store and retrieve objects (e.g., 'my-obs-bucket') | +| `BAIDU_OBS_ENDPOINT` | `string \| null` | `""` | `BAIDU_OBS_ENDPOINT` | URL of the Baidu OSS endpoint for your chosen region (e.g., 'https://.bj.bcebos.com') | +| `BAIDU_OBS_SECRET_KEY` | `string \| null` | `""` | `BAIDU_OBS_SECRET_KEY` | Secret Access Key for authenticating with Baidu OBS | + +## `middleware.storage.click-zetta-volume-storage` + +> Applies when: `STORAGE_TYPE=clickzetta-volume` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CLICKZETTA_VOLUME_DIFY_PREFIX` | `string` | `"dify_km"` | `CLICKZETTA_VOLUME_DIFY_PREFIX` | Directory prefix for User Volume to organize Dify files | +| `CLICKZETTA_VOLUME_INSTANCE` | `string \| null` | `""` | `CLICKZETTA_VOLUME_INSTANCE` | ClickZetta instance identifier | +| `CLICKZETTA_VOLUME_NAME` | `string \| null` | `""` | `CLICKZETTA_VOLUME_NAME` | ClickZetta volume name for external volumes | +| `CLICKZETTA_VOLUME_PASSWORD` | `string \| null` | `""` | `CLICKZETTA_VOLUME_PASSWORD` | Password for ClickZetta Volume authentication | +| `CLICKZETTA_VOLUME_SCHEMA` | `string` | `"dify"` | `CLICKZETTA_VOLUME_SCHEMA` | ClickZetta schema name | +| `CLICKZETTA_VOLUME_SERVICE` | `string` | `"api.clickzetta.com"` | `CLICKZETTA_VOLUME_SERVICE` | ClickZetta service endpoint | +| `CLICKZETTA_VOLUME_TABLE_PREFIX` | `string` | `"dataset_"` | `CLICKZETTA_VOLUME_TABLE_PREFIX` | Prefix for ClickZetta volume table names | +| `CLICKZETTA_VOLUME_TYPE` | `string` | `"user"` | `CLICKZETTA_VOLUME_TYPE` | ClickZetta volume type (table\|user\|external) | +| `CLICKZETTA_VOLUME_USERNAME` | `string \| null` | `""` | `CLICKZETTA_VOLUME_USERNAME` | Username for ClickZetta Volume authentication | +| `CLICKZETTA_VOLUME_VCLUSTER` | `string` | `"default_ap"` | `CLICKZETTA_VOLUME_VCLUSTER` | ClickZetta virtual cluster name | +| `CLICKZETTA_VOLUME_WORKSPACE` | `string` | `"quick_start"` | `CLICKZETTA_VOLUME_WORKSPACE` | ClickZetta workspace name | + +## `middleware.storage.google-cloud-storage` + +> Applies when: `STORAGE_TYPE=google-storage` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `GOOGLE_STORAGE_BUCKET_NAME` | `string \| null` | `""` | `GOOGLE_STORAGE_BUCKET_NAME` | Name of the Google Cloud Storage bucket to store and retrieve objects (e.g., 'my-gcs-bucket') | +| `GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64` | `string \| null` | `""` | `GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64` | Base64-encoded JSON key file for Google Cloud service account authentication | + +## `middleware.storage.huawei-cloud-o-b-s-storage` + +> Applies when: `STORAGE_TYPE=huawei-obs` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HUAWEI_OBS_ACCESS_KEY` | `string \| null` | `""` | `HUAWEI_OBS_ACCESS_KEY` | Access Key ID for authenticating with Huawei Cloud OBS | +| `HUAWEI_OBS_BUCKET_NAME` | `string \| null` | `""` | `HUAWEI_OBS_BUCKET_NAME` | Name of the Huawei Cloud OBS bucket to store and retrieve objects (e.g., 'my-obs-bucket') | +| `HUAWEI_OBS_PATH_STYLE` | `boolean` | `false` | `HUAWEI_OBS_PATH_STYLE` | Flag to indicate whether to use path-style URLs for OBS requests | +| `HUAWEI_OBS_SECRET_KEY` | `string \| null` | `""` | `HUAWEI_OBS_SECRET_KEY` | Secret Access Key for authenticating with Huawei Cloud OBS | +| `HUAWEI_OBS_SERVER` | `string \| null` | `""` | `HUAWEI_OBS_SERVER` | Endpoint URL for Huawei Cloud OBS (e.g., 'https://obs.cn-north-4.myhuaweicloud.com') | + +## `middleware.storage.o-c-i-storage` + +> Applies when: `STORAGE_TYPE=oci-storage` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `OCI_ACCESS_KEY` | `string \| null` | `""` | `OCI_ACCESS_KEY` | Access key (also known as API key) for authenticating with OCI Object Storage | +| `OCI_BUCKET_NAME` | `string \| null` | `""` | `OCI_BUCKET_NAME` | Name of the OCI Object Storage bucket to store and retrieve objects (e.g., 'my-oci-bucket') | +| `OCI_ENDPOINT` | `string \| null` | `""` | `OCI_ENDPOINT` | URL of the OCI Object Storage endpoint (e.g., 'https://objectstorage.us-phoenix-1.oraclecloud.com') | +| `OCI_REGION` | `string \| null` | `""` | `OCI_REGION` | OCI region where the bucket is located (e.g., 'us-phoenix-1') | +| `OCI_SECRET_KEY` | `string \| null` | `""` | `OCI_SECRET_KEY` | Secret key associated with the access key for authenticating with OCI Object Storage | + +## `middleware.storage.open-d-a-l-storage` + +> Applies when: `STORAGE_TYPE=opendal` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `OPENDAL_SCHEME` | `string` | `"fs"` | `OPENDAL_SCHEME` | OpenDAL scheme. | + +## `middleware.storage.s3-storage` + +> Applies when: `STORAGE_TYPE=s3` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `S3_ACCESS_KEY` | `string \| null` | `""` | `S3_ACCESS_KEY` | Access key ID for authenticating with the S3 service | +| `S3_ADDRESS_STYLE` | `literal['auto', 'virtual', 'path']` | `"auto"` | `S3_ADDRESS_STYLE` | S3 addressing style: 'auto', 'path', or 'virtual' | +| `S3_BUCKET_NAME` | `string \| null` | `""` | `S3_BUCKET_NAME` | Name of the S3 bucket to store and retrieve objects | +| `S3_ENDPOINT` | `string \| null` | `""` | `S3_ENDPOINT` | URL of the S3-compatible storage endpoint (e.g., 'https://s3.amazonaws.com') | +| `S3_REGION` | `string \| null` | `""` | `S3_REGION` | Region where the S3 bucket is located (e.g., 'us-east-1') | +| `S3_SECRET_KEY` | `string \| null` | `""` | `S3_SECRET_KEY` | Secret access key for authenticating with the S3 service | +| `S3_USE_AWS_MANAGED_IAM` | `boolean` | `false` | `S3_USE_AWS_MANAGED_IAM` | Use AWS managed IAM roles for authentication instead of access/secret keys | + +## `middleware.storage.supabase-storage` + +> Applies when: `STORAGE_TYPE=supabase` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `SUPABASE_API_KEY` | `string \| null` | `""` | `SUPABASE_API_KEY` | API KEY for authenticating with Supabase | +| `SUPABASE_BUCKET_NAME` | `string \| null` | `""` | `SUPABASE_BUCKET_NAME` | Name of the Supabase bucket to store and retrieve objects (e.g., 'dify-bucket') | +| `SUPABASE_URL` | `string \| null` | `""` | `SUPABASE_URL` | URL of the Supabase | + +## `middleware.storage.tencent-cloud-c-o-s-storage` + +> Applies when: `STORAGE_TYPE=tencent-cos` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `TENCENT_COS_BUCKET_NAME` | `string \| null` | `""` | `TENCENT_COS_BUCKET_NAME` | Name of the Tencent Cloud COS bucket to store and retrieve objects | +| `TENCENT_COS_CUSTOM_DOMAIN` | `string \| null` | `""` | `TENCENT_COS_CUSTOM_DOMAIN` | Tencent Cloud COS custom domain setting | +| `TENCENT_COS_REGION` | `string \| null` | `""` | `TENCENT_COS_REGION` | Tencent Cloud region where the COS bucket is located (e.g., 'ap-guangzhou') | +| `TENCENT_COS_SCHEME` | `string \| null` | `""` | `TENCENT_COS_SCHEME` | Protocol scheme for COS requests: 'https' (recommended) or 'http' | +| `TENCENT_COS_SECRET_ID` | `string \| null` | `""` | `TENCENT_COS_SECRET_ID` | SecretId for authenticating with Tencent Cloud COS (part of API credentials) | +| `TENCENT_COS_SECRET_KEY` | `string \| null` | `""` | `TENCENT_COS_SECRET_KEY` | SecretKey for authenticating with Tencent Cloud COS (part of API credentials) | + +## `middleware.storage.volcengine-t-o-s-storage` + +> Applies when: `STORAGE_TYPE=volcengine-tos` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `VOLCENGINE_TOS_ACCESS_KEY` | `string \| null` | `""` | `VOLCENGINE_TOS_ACCESS_KEY` | Access Key ID for authenticating with Volcengine TOS | +| `VOLCENGINE_TOS_BUCKET_NAME` | `string \| null` | `""` | `VOLCENGINE_TOS_BUCKET_NAME` | Name of the Volcengine TOS bucket to store and retrieve objects (e.g., 'my-tos-bucket') | +| `VOLCENGINE_TOS_ENDPOINT` | `string \| null` | `""` | `VOLCENGINE_TOS_ENDPOINT` | URL of the Volcengine TOS endpoint (e.g., 'https://tos-cn-beijing.volces.com') | +| `VOLCENGINE_TOS_REGION` | `string \| null` | `""` | `VOLCENGINE_TOS_REGION` | Volcengine region where the TOS bucket is located (e.g., 'cn-beijing') | +| `VOLCENGINE_TOS_SECRET_KEY` | `string \| null` | `""` | `VOLCENGINE_TOS_SECRET_KEY` | Secret Access Key for authenticating with Volcengine TOS | + +## `middleware.vdb.alibaba-cloud-my-s-q-l` + +> Applies when: `VECTOR_STORE=alibabacloud-mysql` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ALIBABACLOUD_MYSQL_CHARSET` | `string` | `"utf8mb4"` | `ALIBABACLOUD_MYSQL_CHARSET` | Character set for AlibabaCloud MySQL connection (default is 'utf8mb4') | +| `ALIBABACLOUD_MYSQL_DATABASE` | `string` | `"dify"` | `ALIBABACLOUD_MYSQL_DATABASE` | Name of the AlibabaCloud MySQL database to connect to (default is 'dify') | +| `ALIBABACLOUD_MYSQL_DISTANCE_FUNCTION` | `string` | `"cosine"` | `ALIBABACLOUD_MYSQL_DISTANCE_FUNCTION` | Distance function used for vector similarity search in AlibabaCloud MySQL (e.g., 'cosine', 'euclidean') | +| `ALIBABACLOUD_MYSQL_HNSW_M` | `integer` | `6` | `ALIBABACLOUD_MYSQL_HNSW_M` | Maximum number of connections per layer for HNSW vector index (default is 6, range: 3-200) | +| `ALIBABACLOUD_MYSQL_HOST` | `string` | `"localhost"` | `ALIBABACLOUD_MYSQL_HOST` | Hostname or IP address of the AlibabaCloud MySQL server (e.g., 'localhost' or 'mysql.aliyun.com') | +| `ALIBABACLOUD_MYSQL_MAX_CONNECTION` | `integer` | `5` | `ALIBABACLOUD_MYSQL_MAX_CONNECTION` | Maximum number of connections in the connection pool | +| `ALIBABACLOUD_MYSQL_PASSWORD` | `string` | `""` | `ALIBABACLOUD_MYSQL_PASSWORD` | Password for authenticating with AlibabaCloud MySQL (default is an empty string) | +| `ALIBABACLOUD_MYSQL_PORT` | `integer` | `3306` | `ALIBABACLOUD_MYSQL_PORT` | Port number on which the AlibabaCloud MySQL server is listening (default is 3306) | +| `ALIBABACLOUD_MYSQL_USER` | `string` | `"root"` | `ALIBABACLOUD_MYSQL_USER` | Username for authenticating with AlibabaCloud MySQL (default is 'root') | + +## `middleware.vdb.analyticdb` + +> Applies when: `VECTOR_STORE=analyticdb` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ANALYTICDB_ACCOUNT` | `string \| null` | `""` | `ANALYTICDB_ACCOUNT` | The account name used to log in to the AnalyticDB instance (usually the initial account created with the instance). | +| `ANALYTICDB_HOST` | `string \| null` | `""` | `ANALYTICDB_HOST` | The host of the AnalyticDB instance you want to connect to. | +| `ANALYTICDB_INSTANCE_ID` | `string \| null` | `""` | `ANALYTICDB_INSTANCE_ID` | The unique identifier of the AnalyticDB instance you want to connect to. | +| `ANALYTICDB_KEY_ID` | `string \| null` | `""` | `ANALYTICDB_KEY_ID` | The Access Key ID provided by Alibaba Cloud for API authentication. | +| `ANALYTICDB_KEY_SECRET` | `string \| null` | `""` | `ANALYTICDB_KEY_SECRET` | The Secret Access Key corresponding to the Access Key ID for secure API access. | +| `ANALYTICDB_MAX_CONNECTION` | `integer` | `5` | `ANALYTICDB_MAX_CONNECTION` | Max connection of the AnalyticDB database. | +| `ANALYTICDB_MIN_CONNECTION` | `integer` | `1` | `ANALYTICDB_MIN_CONNECTION` | Min connection of the AnalyticDB database. | +| `ANALYTICDB_NAMESPACE` | `string \| null` | `""` | `ANALYTICDB_NAMESPACE` | The namespace within AnalyticDB for schema isolation (if using namespace feature). | +| `ANALYTICDB_NAMESPACE_PASSWORD` | `string \| null` | `""` | `ANALYTICDB_NAMESPACE_PASSWORD` | The password for accessing the specified namespace within the AnalyticDB instance (if namespace feature is enabled). | +| `ANALYTICDB_PASSWORD` | `string \| null` | `""` | `ANALYTICDB_PASSWORD` | The password associated with the AnalyticDB account for database authentication. | +| `ANALYTICDB_PORT` | `integer` | `5432` | `ANALYTICDB_PORT` | The port of the AnalyticDB instance you want to connect to. | +| `ANALYTICDB_REGION_ID` | `string \| null` | `""` | `ANALYTICDB_REGION_ID` | The region where the AnalyticDB instance is deployed (e.g., 'cn-hangzhou', 'ap-southeast-1'). | + +## `middleware.vdb.baidu-vector-d-b` + +> Applies when: `VECTOR_STORE=baidu_vector` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `BAIDU_VECTOR_DB_ACCOUNT` | `string \| null` | `""` | `BAIDU_VECTOR_DB_ACCOUNT` | Account for authenticating with the Baidu Vector Database | +| `BAIDU_VECTOR_DB_API_KEY` | `string \| null` | `""` | `BAIDU_VECTOR_DB_API_KEY` | API key for authenticating with the Baidu Vector Database service | +| `BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT` | `integer` | `500` | `BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT` | Auto build row count increment threshold (default is 500) | +| `BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO` | `float` | `0.05` | `BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO` | Auto build row count increment ratio threshold (default is 0.05) | +| `BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS` | `integer` | `30000` | `BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS` | Timeout in milliseconds for Baidu Vector Database operations (default is 30000 milliseconds) | +| `BAIDU_VECTOR_DB_DATABASE` | `string \| null` | `""` | `BAIDU_VECTOR_DB_DATABASE` | Name of the specific Baidu Vector Database to connect to | +| `BAIDU_VECTOR_DB_ENDPOINT` | `string \| null` | `""` | `BAIDU_VECTOR_DB_ENDPOINT` | URL of the Baidu Vector Database service (e.g., 'http://vdb.bj.baidubce.com') | +| `BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER` | `string` | `"DEFAULT_ANALYZER"` | `BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER` | Analyzer type for inverted index in Baidu Vector Database (default is DEFAULT_ANALYZER) | +| `BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE` | `string` | `"COARSE_MODE"` | `BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE` | Parser mode for inverted index in Baidu Vector Database (default is COARSE_MODE) | +| `BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS` | `integer` | `300` | `BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS` | Timeout in seconds for rebuilding the index in Baidu Vector Database (default is 3600 seconds) | +| `BAIDU_VECTOR_DB_REPLICAS` | `integer` | `3` | `BAIDU_VECTOR_DB_REPLICAS` | Number of replicas for the Baidu Vector Database (default is 3) | +| `BAIDU_VECTOR_DB_SHARD` | `integer` | `1` | `BAIDU_VECTOR_DB_SHARD` | Number of shards for the Baidu Vector Database (default is 1) | + +## `middleware.vdb.chroma` + +> Applies when: `VECTOR_STORE=chroma` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CHROMA_AUTH_CREDENTIALS` | `string \| null` | `""` | `CHROMA_AUTH_CREDENTIALS` | Authentication credentials for Chroma (format depends on the auth provider) | +| `CHROMA_AUTH_PROVIDER` | `string \| null` | `""` | `CHROMA_AUTH_PROVIDER` | Authentication provider for Chroma (e.g., 'basic', 'token', or a custom provider) | +| `CHROMA_DATABASE` | `string \| null` | `""` | `CHROMA_DATABASE` | Name of the Chroma database to connect to | +| `CHROMA_HOST` | `string \| null` | `""` | `CHROMA_HOST` | Hostname or IP address of the Chroma server (e.g., 'localhost' or '192.168.1.100') | +| `CHROMA_PORT` | `integer` | `8000` | `CHROMA_PORT` | Port number on which the Chroma server is listening (default is 8000) | +| `CHROMA_TENANT` | `string \| null` | `""` | `CHROMA_TENANT` | Tenant identifier for multi-tenancy support in Chroma | + +## `middleware.vdb.clickzetta` + +> Applies when: `VECTOR_STORE=clickzetta` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `CLICKZETTA_ANALYZER_MODE` | `string \| null` | `"smart"` | `CLICKZETTA_ANALYZER_MODE` | Analyzer mode for tokenization: max_word (fine-grained) or smart (intelligent) | +| `CLICKZETTA_ANALYZER_TYPE` | `string \| null` | `"chinese"` | `CLICKZETTA_ANALYZER_TYPE` | Analyzer type for full-text search: keyword, english, chinese, unicode | +| `CLICKZETTA_BATCH_SIZE` | `integer \| null` | `100` | `CLICKZETTA_BATCH_SIZE` | Batch size for bulk insert operations | +| `CLICKZETTA_ENABLE_INVERTED_INDEX` | `boolean \| null` | `true` | `CLICKZETTA_ENABLE_INVERTED_INDEX` | Enable inverted index for full-text search capabilities | +| `CLICKZETTA_INSTANCE` | `string \| null` | `""` | `CLICKZETTA_INSTANCE` | Clickzetta Lakehouse instance ID | +| `CLICKZETTA_PASSWORD` | `string \| null` | `""` | `CLICKZETTA_PASSWORD` | Password for authenticating with Clickzetta Lakehouse | +| `CLICKZETTA_SCHEMA` | `string \| null` | `"public"` | `CLICKZETTA_SCHEMA` | Database schema name in Clickzetta | +| `CLICKZETTA_SERVICE` | `string \| null` | `"api.clickzetta.com"` | `CLICKZETTA_SERVICE` | Clickzetta API service endpoint (e.g., 'api.clickzetta.com') | +| `CLICKZETTA_USERNAME` | `string \| null` | `""` | `CLICKZETTA_USERNAME` | Username for authenticating with Clickzetta Lakehouse | +| `CLICKZETTA_VCLUSTER` | `string \| null` | `"default_ap"` | `CLICKZETTA_VCLUSTER` | Clickzetta virtual cluster name | +| `CLICKZETTA_VECTOR_DISTANCE_FUNCTION` | `string \| null` | `"cosine_distance"` | `CLICKZETTA_VECTOR_DISTANCE_FUNCTION` | Distance function for vector similarity: l2_distance or cosine_distance | +| `CLICKZETTA_WORKSPACE` | `string \| null` | `"default"` | `CLICKZETTA_WORKSPACE` | Clickzetta workspace name | + +## `middleware.vdb.couchbase` + +> Applies when: `VECTOR_STORE=couchbase` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `COUCHBASE_BUCKET_NAME` | `string \| null` | `""` | `COUCHBASE_BUCKET_NAME` | COUCHBASE bucket name | +| `COUCHBASE_CONNECTION_STRING` | `string \| null` | `""` | `COUCHBASE_CONNECTION_STRING` | COUCHBASE connection string | +| `COUCHBASE_PASSWORD` | `string \| null` | `""` | `COUCHBASE_PASSWORD` | COUCHBASE password | +| `COUCHBASE_SCOPE_NAME` | `string \| null` | `""` | `COUCHBASE_SCOPE_NAME` | COUCHBASE scope name | +| `COUCHBASE_USER` | `string \| null` | `""` | `COUCHBASE_USER` | COUCHBASE user | + +## `middleware.vdb.elasticsearch` + +Applies when: +- `ELASTICSEARCH_HOST`, `ELASTICSEARCH_MAX_RETRIES`, `ELASTICSEARCH_PASSWORD`, `ELASTICSEARCH_PORT`, `ELASTICSEARCH_REQUEST_TIMEOUT`, `ELASTICSEARCH_RETRY_ON_TIMEOUT`, `ELASTICSEARCH_USERNAME`, `ELASTICSEARCH_VERIFY_CERTS`: `VECTOR_STORE=elasticsearch` +- `ELASTICSEARCH_API_KEY`, `ELASTICSEARCH_CA_CERTS`, `ELASTICSEARCH_CLOUD_URL`, `ELASTICSEARCH_USE_CLOUD`: `VECTOR_STORE=elasticsearch; ELASTICSEARCH_USE_CLOUD=true` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ELASTICSEARCH_API_KEY` | `string \| null` | `""` | `ELASTICSEARCH_API_KEY` | API key for authenticating with Elastic Cloud | +| `ELASTICSEARCH_CA_CERTS` | `string \| null` | `""` | `ELASTICSEARCH_CA_CERTS` | Path to CA certificate file for SSL verification | +| `ELASTICSEARCH_CLOUD_URL` | `string \| null` | `""` | `ELASTICSEARCH_CLOUD_URL` | Full URL for Elastic Cloud deployment (e.g., 'https://example.es.region.aws.found.io:443') | +| `ELASTICSEARCH_HOST` | `string \| null` | `"127.0.0.1"` | `ELASTICSEARCH_HOST` | Hostname or IP address of the Elasticsearch server (e.g., 'localhost' or '192.168.1.100') | +| `ELASTICSEARCH_MAX_RETRIES` | `integer` | `10000` | `ELASTICSEARCH_MAX_RETRIES` | Maximum number of retry attempts (default is 10000) | +| `ELASTICSEARCH_PASSWORD` | `string \| null` | `"elastic"` | `ELASTICSEARCH_PASSWORD` | Password for authenticating with Elasticsearch (default is 'elastic') | +| `ELASTICSEARCH_PORT` | `integer` | `9200` | `ELASTICSEARCH_PORT` | Port number on which the Elasticsearch server is listening (default is 9200) | +| `ELASTICSEARCH_REQUEST_TIMEOUT` | `integer` | `100000` | `ELASTICSEARCH_REQUEST_TIMEOUT` | Request timeout in milliseconds (default is 100000) | +| `ELASTICSEARCH_RETRY_ON_TIMEOUT` | `boolean` | `true` | `ELASTICSEARCH_RETRY_ON_TIMEOUT` | Whether to retry requests on timeout (default is True) | +| `ELASTICSEARCH_USERNAME` | `string \| null` | `"elastic"` | `ELASTICSEARCH_USERNAME` | Username for authenticating with Elasticsearch (default is 'elastic') | +| `ELASTICSEARCH_USE_CLOUD` | `boolean \| null` | `false` | `ELASTICSEARCH_USE_CLOUD` | Set to True to use Elastic Cloud instead of self-hosted Elasticsearch | +| `ELASTICSEARCH_VERIFY_CERTS` | `boolean` | `false` | `ELASTICSEARCH_VERIFY_CERTS` | Whether to verify SSL certificates (default is False) | + +## `middleware.vdb.hologres` + +> Applies when: `VECTOR_STORE=hologres` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HOLOGRES_ACCESS_KEY_ID` | `string \| null` | `""` | `HOLOGRES_ACCESS_KEY_ID` | Alibaba Cloud AccessKey ID, also used as the PostgreSQL username. | +| `HOLOGRES_ACCESS_KEY_SECRET` | `string \| null` | `""` | `HOLOGRES_ACCESS_KEY_SECRET` | Alibaba Cloud AccessKey Secret, also used as the PostgreSQL password. | +| `HOLOGRES_BASE_QUANTIZATION_TYPE` | `string` | `"rabitq"` | `HOLOGRES_BASE_QUANTIZATION_TYPE` | Base quantization type for vector index (e.g., 'rabitq', 'sq8', 'fp16', 'fp32'). | +| `HOLOGRES_DATABASE` | `string \| null` | `""` | `HOLOGRES_DATABASE` | Name of the Hologres database to connect to. | +| `HOLOGRES_DISTANCE_METHOD` | `string` | `"Cosine"` | `HOLOGRES_DISTANCE_METHOD` | Distance method for vector index (e.g., 'Cosine', 'Euclidean', 'InnerProduct'). | +| `HOLOGRES_EF_CONSTRUCTION` | `integer` | `400` | `HOLOGRES_EF_CONSTRUCTION` | ef_construction parameter for HNSW vector index. | +| `HOLOGRES_HOST` | `string \| null` | `""` | `HOLOGRES_HOST` | Hostname or IP address of the Hologres instance. | +| `HOLOGRES_MAX_DEGREE` | `integer` | `64` | `HOLOGRES_MAX_DEGREE` | Max degree (M) parameter for HNSW vector index. | +| `HOLOGRES_PORT` | `integer` | `80` | `HOLOGRES_PORT` | Port number for connecting to the Hologres instance. | +| `HOLOGRES_SCHEMA` | `string` | `"public"` | `HOLOGRES_SCHEMA` | Schema name in the Hologres database. | +| `HOLOGRES_TOKENIZER` | `string` | `"jieba"` | `HOLOGRES_TOKENIZER` | Tokenizer for full-text search index (e.g., 'jieba', 'ik', 'standard', 'simple'). | + +## `middleware.vdb.huawei-cloud` + +> Applies when: `VECTOR_STORE=huawei-cloud` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `HUAWEI_CLOUD_HOSTS` | `string \| null` | `""` | `HUAWEI_CLOUD_HOSTS` | Hostname or IP address of the Huawei cloud search service instance | +| `HUAWEI_CLOUD_PASSWORD` | `string \| null` | `""` | `HUAWEI_CLOUD_PASSWORD` | Password for authenticating with Huawei cloud search service | +| `HUAWEI_CLOUD_USER` | `string \| null` | `""` | `HUAWEI_CLOUD_USER` | Username for authenticating with Huawei cloud search service | + +## `middleware.vdb.iris-vector` + +> Applies when: `VECTOR_STORE=iris` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `IRIS_CONNECTION_URL` | `string \| null` | `""` | `IRIS_CONNECTION_URL` | Full connection URL for IRIS (overrides individual fields if provided). | +| `IRIS_DATABASE` | `string \| null` | `"USER"` | `IRIS_DATABASE` | Database namespace for IRIS connection. | +| `IRIS_HOST` | `string \| null` | `"localhost"` | `IRIS_HOST` | Hostname or IP address of the IRIS server. | +| `IRIS_MAX_CONNECTION` | `integer` | `3` | `IRIS_MAX_CONNECTION` | Maximum number of connections in the pool. | +| `IRIS_MIN_CONNECTION` | `integer` | `1` | `IRIS_MIN_CONNECTION` | Minimum number of connections in the pool. | +| `IRIS_PASSWORD` | `string \| null` | `"Dify@1234"` | `IRIS_PASSWORD` | Password for IRIS authentication. | +| `IRIS_SCHEMA` | `string \| null` | `"dify"` | `IRIS_SCHEMA` | Schema name for IRIS tables. | +| `IRIS_SUPER_SERVER_PORT` | `typing.Annotated[int, Gt(gt=0)] \| null` | `1972` | `IRIS_SUPER_SERVER_PORT` | Port number for IRIS connection. | +| `IRIS_TEXT_INDEX` | `boolean` | `true` | `IRIS_TEXT_INDEX` | Enable full-text search index using %iFind. Index. Basic. | +| `IRIS_TEXT_INDEX_LANGUAGE` | `string` | `"en"` | `IRIS_TEXT_INDEX_LANGUAGE` | Language for full-text search index (e.g., 'en', 'ja', 'zh', 'de'). | +| `IRIS_USER` | `string \| null` | `"_SYSTEM"` | `IRIS_USER` | Username for IRIS authentication. | + +## `middleware.vdb.lindorm` + +> Applies when: `VECTOR_STORE=lindorm` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `LINDORM_DISTANCE_TYPE` | `string \| null` | `"l2"` | `LINDORM_DISTANCE_TYPE` | Vector Distance Type, support l2, cosinesimil, innerproduct | +| `LINDORM_INDEX_TYPE` | `string \| null` | `"hnsw"` | `LINDORM_INDEX_TYPE` | Lindorm Vector Index Type, hnsw or flat is available in dify | +| `LINDORM_PASSWORD` | `string \| null` | `""` | `LINDORM_PASSWORD` | Lindorm password | +| `LINDORM_QUERY_TIMEOUT` | `float \| null` | `2.0` | `LINDORM_QUERY_TIMEOUT` | The lindorm search request timeout (s) | +| `LINDORM_URL` | `string \| null` | `""` | `LINDORM_URL` | Lindorm url | +| `LINDORM_USERNAME` | `string \| null` | `""` | `LINDORM_USERNAME` | Lindorm user | +| `LINDORM_USING_UGC` | `boolean \| null` | `true` | `LINDORM_USING_UGC` | Using UGC index will store indexes with the same IndexType/Dimension in a single big index. | + +## `middleware.vdb.matrixone` + +> Applies when: `VECTOR_STORE=matrixone` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `MATRIXONE_DATABASE` | `string` | `"dify"` | `MATRIXONE_DATABASE` | Name of the Matrixone database to connect to | +| `MATRIXONE_HOST` | `string` | `"localhost"` | `MATRIXONE_HOST` | Host address of the Matrixone server | +| `MATRIXONE_METRIC` | `string` | `"l2"` | `MATRIXONE_METRIC` | Distance metric type for vector similarity search (cosine or l2) | +| `MATRIXONE_PASSWORD` | `string` | `"111"` | `MATRIXONE_PASSWORD` | Password for authenticating with Matrixone | +| `MATRIXONE_PORT` | `integer` | `6001` | `MATRIXONE_PORT` | Port number of the Matrixone server | +| `MATRIXONE_USER` | `string` | `"dump"` | `MATRIXONE_USER` | Username for authenticating with Matrixone | + +## `middleware.vdb.milvus` + +> Applies when: `VECTOR_STORE=milvus` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `MILVUS_ANALYZER_PARAMS` | `string \| null` | `""` | `MILVUS_ANALYZER_PARAMS` | Milvus text analyzer parameters, e.g., {"type": "chinese"} for Chinese segmentation support. | +| `MILVUS_DATABASE` | `string` | `"default"` | `MILVUS_DATABASE` | Name of the Milvus database to connect to (default is 'default') | +| `MILVUS_ENABLE_HYBRID_SEARCH` | `boolean` | `true` | `MILVUS_ENABLE_HYBRID_SEARCH` | Enable hybrid search features (requires Milvus >= 2.5.0). Set to false for compatibility with older versions | +| `MILVUS_PASSWORD` | `string \| null` | `""` | `MILVUS_PASSWORD` | Password for authenticating with Milvus, if username/password authentication is enabled | +| `MILVUS_TOKEN` | `string \| null` | `""` | `MILVUS_TOKEN` | Authentication token for Milvus, if token-based authentication is enabled | +| `MILVUS_URI` | `string \| null` | `"http://127.0.0.1:19530"` | `MILVUS_URI` | URI for connecting to the Milvus server (e.g., 'http://localhost:19530' or 'https://milvus-instance.example.com:19530') | +| `MILVUS_USER` | `string \| null` | `""` | `MILVUS_USER` | Username for authenticating with Milvus, if username/password authentication is enabled | + +## `middleware.vdb.my-scale` + +> Applies when: `VECTOR_STORE=myscale` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `MYSCALE_DATABASE` | `string` | `"default"` | `MYSCALE_DATABASE` | Name of the MyScale database to connect to (default is 'default') | +| `MYSCALE_FTS_PARAMS` | `string` | `""` | `MYSCALE_FTS_PARAMS` | Additional parameters for MyScale Full Text Search index) | +| `MYSCALE_HOST` | `string` | `"localhost"` | `MYSCALE_HOST` | Hostname or IP address of the MyScale server (e.g., 'localhost' or 'myscale.example.com') | +| `MYSCALE_PASSWORD` | `string` | `""` | `MYSCALE_PASSWORD` | Password for authenticating with MyScale (default is an empty string) | +| `MYSCALE_PORT` | `integer` | `8123` | `MYSCALE_PORT` | Port number on which the MyScale server is listening (default is 8123) | +| `MYSCALE_USER` | `string` | `"default"` | `MYSCALE_USER` | Username for authenticating with MyScale (default is 'default') | + +## `middleware.vdb.ocean-base-vector` + +> Applies when: `VECTOR_STORE=oceanbase` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `OCEANBASE_ENABLE_HYBRID_SEARCH` | `boolean` | `false` | `OCEANBASE_ENABLE_HYBRID_SEARCH` | Enable hybrid search features (requires OceanBase >= 4.3.5.1). Set to false for compatibility with older versions | +| `OCEANBASE_FULLTEXT_PARSER` | `string \| null` | `"ik"` | `OCEANBASE_FULLTEXT_PARSER` | Fulltext parser to use for text indexing. Built-in options: 'ngram' (N-gram tokenizer for English/numbers), 'beng' (Basic English tokenizer), 'space' (Space-based tokenizer), 'ngram2' (Improved N-gram tokenizer), 'ik' (Chinese tokenizer). External plugins (require installation): 'japanese_ftparser' (Japanese tokenizer), 'thai_ftparser' (Thai tokenizer). Default is 'ik' | +| `OCEANBASE_HNSW_EF_CONSTRUCTION` | `integer` | `256` | `OCEANBASE_HNSW_EF_CONSTRUCTION` | HNSW efConstruction parameter (index build-time search width) | +| `OCEANBASE_HNSW_EF_SEARCH` | `integer` | `-1` | `OCEANBASE_HNSW_EF_SEARCH` | HNSW efSearch parameter (query-time search width, -1 uses server default) | +| `OCEANBASE_HNSW_M` | `integer` | `16` | `OCEANBASE_HNSW_M` | HNSW M parameter (max number of connections per node) | +| `OCEANBASE_HNSW_REFRESH_THRESHOLD` | `integer` | `1000` | `OCEANBASE_HNSW_REFRESH_THRESHOLD` | Minimum number of inserted documents to trigger an automatic HNSW index refresh (0 to disable) | +| `OCEANBASE_VECTOR_BATCH_SIZE` | `integer` | `100` | `OCEANBASE_VECTOR_BATCH_SIZE` | Number of documents to insert per batch | +| `OCEANBASE_VECTOR_DATABASE` | `string \| null` | `""` | `OCEANBASE_VECTOR_DATABASE` | Name of the OceanBase Vector database to connect to | +| `OCEANBASE_VECTOR_HOST` | `string \| null` | `""` | `OCEANBASE_VECTOR_HOST` | Hostname or IP address of the OceanBase Vector server (e.g. 'localhost') | +| `OCEANBASE_VECTOR_MAX_OVERFLOW` | `integer` | `10` | `OCEANBASE_VECTOR_MAX_OVERFLOW` | SQLAlchemy connection pool max overflow connections | +| `OCEANBASE_VECTOR_METRIC_TYPE` | `literal['l2', 'cosine', 'inner_product']` | `"l2"` | `OCEANBASE_VECTOR_METRIC_TYPE` | Distance metric type for vector index: l2, cosine, or inner_product | +| `OCEANBASE_VECTOR_PASSWORD` | `string \| null` | `""` | `OCEANBASE_VECTOR_PASSWORD` | Password for authenticating with the OceanBase Vector database | +| `OCEANBASE_VECTOR_POOL_SIZE` | `integer` | `5` | `OCEANBASE_VECTOR_POOL_SIZE` | SQLAlchemy connection pool size | +| `OCEANBASE_VECTOR_PORT` | `typing.Annotated[int, Gt(gt=0)] \| null` | `2881` | `OCEANBASE_VECTOR_PORT` | Port number on which the OceanBase Vector server is listening (default is 2881) | +| `OCEANBASE_VECTOR_USER` | `string \| null` | `""` | `OCEANBASE_VECTOR_USER` | Username for authenticating with the OceanBase Vector database | + +## `middleware.vdb.open-gauss` + +> Applies when: `VECTOR_STORE=opengauss` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `OPENGAUSS_DATABASE` | `string \| null` | `""` | `OPENGAUSS_DATABASE` | Name of the OpenGauss database to connect to | +| `OPENGAUSS_ENABLE_PQ` | `boolean` | `false` | `OPENGAUSS_ENABLE_PQ` | Enable openGauss PQ acceleration feature | +| `OPENGAUSS_HOST` | `string \| null` | `""` | `OPENGAUSS_HOST` | Hostname or IP address of the OpenGauss server (e.g., 'localhost') | +| `OPENGAUSS_MAX_CONNECTION` | `integer` | `5` | `OPENGAUSS_MAX_CONNECTION` | Max connection of the OpenGauss database | +| `OPENGAUSS_MIN_CONNECTION` | `integer` | `1` | `OPENGAUSS_MIN_CONNECTION` | Min connection of the OpenGauss database | +| `OPENGAUSS_PASSWORD` | `string \| null` | `""` | `OPENGAUSS_PASSWORD` | Password for authenticating with the OpenGauss database | +| `OPENGAUSS_PORT` | `integer` | `6600` | `OPENGAUSS_PORT` | Port number on which the OpenGauss server is listening (default is 6600) | +| `OPENGAUSS_USER` | `string \| null` | `""` | `OPENGAUSS_USER` | Username for authenticating with the OpenGauss database | + +## `middleware.vdb.open-search` + +> Applies when: `VECTOR_STORE=opensearch` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `OPENSEARCH_AUTH_METHOD` | `enum` | `"basic"` | `OPENSEARCH_AUTH_METHOD` | Authentication method for OpenSearch connection (default is 'basic') | +| `OPENSEARCH_AWS_REGION` | `string \| null` | `""` | `OPENSEARCH_AWS_REGION` | AWS region for OpenSearch (e.g. 'us-west-2') | +| `OPENSEARCH_AWS_SERVICE` | `literal['es', 'aoss'] \| null` | `""` | `OPENSEARCH_AWS_SERVICE` | AWS service for OpenSearch (e.g. 'aoss' for OpenSearch Serverless) | +| `OPENSEARCH_HOST` | `string \| null` | `""` | `OPENSEARCH_HOST` | Hostname or IP address of the OpenSearch server (e.g., 'localhost' or 'opensearch.example.com') | +| `OPENSEARCH_PASSWORD` | `string \| null` | `""` | `OPENSEARCH_PASSWORD` | Password for authenticating with OpenSearch | +| `OPENSEARCH_PORT` | `integer` | `9200` | `OPENSEARCH_PORT` | Port number on which the OpenSearch server is listening (default is 9200) | +| `OPENSEARCH_SECURE` | `boolean` | `false` | `OPENSEARCH_SECURE` | Whether to use SSL/TLS encrypted connection for OpenSearch (True for HTTPS, False for HTTP) | +| `OPENSEARCH_USER` | `string \| null` | `""` | `OPENSEARCH_USER` | Username for authenticating with OpenSearch | +| `OPENSEARCH_VERIFY_CERTS` | `boolean` | `true` | `OPENSEARCH_VERIFY_CERTS` | Whether to verify SSL certificates for HTTPS connections (recommended to set True in production) | + +## `middleware.vdb.oracle` + +> Applies when: `VECTOR_STORE=oracle` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ORACLE_CONFIG_DIR` | `string \| null` | `""` | `ORACLE_CONFIG_DIR` | Directory containing the tnsnames.ora configuration file. Only used in thin mode connection | +| `ORACLE_DSN` | `string \| null` | `""` | `ORACLE_DSN` | Oracle database connection string. For traditional database, use format 'host:port/service_name'. For autonomous database, use the service name from tnsnames.ora in the wallet | +| `ORACLE_IS_AUTONOMOUS` | `boolean` | `false` | `ORACLE_IS_AUTONOMOUS` | Flag indicating whether connecting to Oracle Autonomous Database | +| `ORACLE_PASSWORD` | `string \| null` | `""` | `ORACLE_PASSWORD` | Password for authenticating with the Oracle database | +| `ORACLE_USER` | `string \| null` | `""` | `ORACLE_USER` | Username for authenticating with the Oracle database | +| `ORACLE_WALLET_LOCATION` | `string \| null` | `""` | `ORACLE_WALLET_LOCATION` | Oracle wallet directory path containing the wallet files for secure connection | +| `ORACLE_WALLET_PASSWORD` | `string \| null` | `""` | `ORACLE_WALLET_PASSWORD` | Password to decrypt the Oracle wallet, if it is encrypted | + +## `middleware.vdb.p-g-vecto-r-s` + +> Applies when: `VECTOR_STORE=pgvectors` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `PGVECTO_RS_DATABASE` | `string \| null` | `""` | `PGVECTO_RS_DATABASE` | Name of the PostgreSQL database with PGVecto. RS extension to connect to | +| `PGVECTO_RS_HOST` | `string \| null` | `""` | `PGVECTO_RS_HOST` | Hostname or IP address of the PostgreSQL server with PGVecto. RS extension (e.g., 'localhost') | +| `PGVECTO_RS_PASSWORD` | `string \| null` | `""` | `PGVECTO_RS_PASSWORD` | Password for authenticating with the PostgreSQL database using PGVecto. RS | +| `PGVECTO_RS_PORT` | `integer` | `5431` | `PGVECTO_RS_PORT` | Port number on which the PostgreSQL server with PGVecto. RS is listening (default is 5431) | +| `PGVECTO_RS_USER` | `string \| null` | `""` | `PGVECTO_RS_USER` | Username for authenticating with the PostgreSQL database using PGVecto. RS | + +## `middleware.vdb.p-g-vector` + +> Applies when: `VECTOR_STORE=pgvector` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `PGVECTOR_DATABASE` | `string \| null` | `""` | `PGVECTOR_DATABASE` | Name of the PostgreSQL database to connect to | +| `PGVECTOR_HOST` | `string \| null` | `""` | `PGVECTOR_HOST` | Hostname or IP address of the PostgreSQL server with PGVector extension (e.g., 'localhost') | +| `PGVECTOR_MAX_CONNECTION` | `integer` | `5` | `PGVECTOR_MAX_CONNECTION` | Max connection of the PostgreSQL database | +| `PGVECTOR_MIN_CONNECTION` | `integer` | `1` | `PGVECTOR_MIN_CONNECTION` | Min connection of the PostgreSQL database | +| `PGVECTOR_PASSWORD` | `string \| null` | `""` | `PGVECTOR_PASSWORD` | Password for authenticating with the PostgreSQL database | +| `PGVECTOR_PG_BIGM` | `boolean` | `false` | `PGVECTOR_PG_BIGM` | Whether to use pg_bigm module for full text search | +| `PGVECTOR_PORT` | `integer` | `5433` | `PGVECTOR_PORT` | Port number on which the PostgreSQL server is listening (default is 5433) | +| `PGVECTOR_USER` | `string \| null` | `""` | `PGVECTOR_USER` | Username for authenticating with the PostgreSQL database | + +## `middleware.vdb.qdrant` + +> Applies when: `VECTOR_STORE=qdrant` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `QDRANT_API_KEY` | `string \| null` | `""` | `QDRANT_API_KEY` | API key for authenticating with the Qdrant server | +| `QDRANT_CLIENT_TIMEOUT` | `integer` | `20` | `QDRANT_CLIENT_TIMEOUT` | Timeout in seconds for Qdrant client operations (default is 20 seconds) | +| `QDRANT_GRPC_ENABLED` | `boolean` | `false` | `QDRANT_GRPC_ENABLED` | Whether to enable gRPC support for Qdrant connection (True for gRPC, False for HTTP) | +| `QDRANT_GRPC_PORT` | `integer` | `6334` | `QDRANT_GRPC_PORT` | Port number for gRPC connection to Qdrant server (default is 6334) | +| `QDRANT_REPLICATION_FACTOR` | `integer` | `1` | `QDRANT_REPLICATION_FACTOR` | Replication factor for Qdrant collections (default is 1) | +| `QDRANT_URL` | `string \| null` | `""` | `QDRANT_URL` | URL of the Qdrant server (e.g., 'http://localhost:6333' or 'https://qdrant.example.com') | + +## `middleware.vdb.relyt` + +> Applies when: `VECTOR_STORE=relyt` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `RELYT_DATABASE` | `string \| null` | `"default"` | `RELYT_DATABASE` | Name of the Relyt database to connect to (default is 'default') | +| `RELYT_HOST` | `string \| null` | `""` | `RELYT_HOST` | Hostname or IP address of the Relyt server (e.g., 'localhost' or 'relyt.example.com') | +| `RELYT_PASSWORD` | `string \| null` | `""` | `RELYT_PASSWORD` | Password for authenticating with the Relyt database | +| `RELYT_PORT` | `integer` | `9200` | `RELYT_PORT` | Port number on which the Relyt server is listening (default is 9200) | +| `RELYT_USER` | `string \| null` | `""` | `RELYT_USER` | Username for authenticating with the Relyt database | + +## `middleware.vdb.table-store` + +> Applies when: `VECTOR_STORE=tablestore` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `TABLESTORE_ACCESS_KEY_ID` | `string \| null` | `""` | `TABLESTORE_ACCESS_KEY_ID` | AccessKey id for the instance name | +| `TABLESTORE_ACCESS_KEY_SECRET` | `string \| null` | `""` | `TABLESTORE_ACCESS_KEY_SECRET` | AccessKey secret for the instance name | +| `TABLESTORE_ENDPOINT` | `string \| null` | `""` | `TABLESTORE_ENDPOINT` | Endpoint address of the TableStore server (e.g. 'https://instance-name.cn-hangzhou.ots.aliyuncs.com') | +| `TABLESTORE_INSTANCE_NAME` | `string \| null` | `""` | `TABLESTORE_INSTANCE_NAME` | Instance name to access TableStore server (eg. 'instance-name') | +| `TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE` | `boolean` | `false` | `TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE` | Whether to normalize full-text search scores to [0, 1] | + +## `middleware.vdb.tencent-vector-d-b` + +> Applies when: `VECTOR_STORE=tencent` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `TENCENT_VECTOR_DB_API_KEY` | `string \| null` | `""` | `TENCENT_VECTOR_DB_API_KEY` | API key for authenticating with the Tencent Vector Database service | +| `TENCENT_VECTOR_DB_DATABASE` | `string \| null` | `""` | `TENCENT_VECTOR_DB_DATABASE` | Name of the specific Tencent Vector Database to connect to | +| `TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH` | `boolean` | `false` | `TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH` | Enable hybrid search features | +| `TENCENT_VECTOR_DB_PASSWORD` | `string \| null` | `""` | `TENCENT_VECTOR_DB_PASSWORD` | Password for authenticating with the Tencent Vector Database (if required) | +| `TENCENT_VECTOR_DB_REPLICAS` | `integer` | `2` | `TENCENT_VECTOR_DB_REPLICAS` | Number of replicas for the Tencent Vector Database (default is 2) | +| `TENCENT_VECTOR_DB_SHARD` | `integer` | `1` | `TENCENT_VECTOR_DB_SHARD` | Number of shards for the Tencent Vector Database (default is 1) | +| `TENCENT_VECTOR_DB_TIMEOUT` | `integer` | `30` | `TENCENT_VECTOR_DB_TIMEOUT` | Timeout in seconds for Tencent Vector Database operations (default is 30 seconds) | +| `TENCENT_VECTOR_DB_URL` | `string \| null` | `""` | `TENCENT_VECTOR_DB_URL` | URL of the Tencent Vector Database service (e.g., 'https://vectordb.tencentcloudapi.com') | +| `TENCENT_VECTOR_DB_USERNAME` | `string \| null` | `""` | `TENCENT_VECTOR_DB_USERNAME` | Username for authenticating with the Tencent Vector Database (if required) | + +## `middleware.vdb.ti-d-b-vector` + +> Applies when: `VECTOR_STORE=tidb_vector` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `TIDB_VECTOR_DATABASE` | `string \| null` | `""` | `TIDB_VECTOR_DATABASE` | Name of the TiDB Vector database to connect to | +| `TIDB_VECTOR_HOST` | `string \| null` | `""` | `TIDB_VECTOR_HOST` | Hostname or IP address of the TiDB Vector server (e.g., 'localhost' or 'tidb.example.com') | +| `TIDB_VECTOR_PASSWORD` | `string \| null` | `""` | `TIDB_VECTOR_PASSWORD` | Password for authenticating with the TiDB Vector database | +| `TIDB_VECTOR_PORT` | `typing.Annotated[int, Gt(gt=0)] \| null` | `4000` | `TIDB_VECTOR_PORT` | Port number on which the TiDB Vector server is listening (default is 4000) | +| `TIDB_VECTOR_USER` | `string \| null` | `""` | `TIDB_VECTOR_USER` | Username for authenticating with the TiDB Vector database | + +## `middleware.vdb.tidb-on-qdrant` + +> Applies when: `VECTOR_STORE=tidb_on_qdrant` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `TIDB_API_URL` | `string \| null` | `""` | `TIDB_API_URL` | Tidb API url | +| `TIDB_IAM_API_URL` | `string \| null` | `""` | `TIDB_IAM_API_URL` | Tidb IAM API url | +| `TIDB_ON_QDRANT_API_KEY` | `string \| null` | `""` | `TIDB_ON_QDRANT_API_KEY` | Tidb on Qdrant api key | +| `TIDB_ON_QDRANT_CLIENT_TIMEOUT` | `integer` | `20` | `TIDB_ON_QDRANT_CLIENT_TIMEOUT` | Tidb on Qdrant client timeout in seconds | +| `TIDB_ON_QDRANT_GRPC_ENABLED` | `boolean` | `false` | `TIDB_ON_QDRANT_GRPC_ENABLED` | whether enable grpc support for Tidb on Qdrant connection | +| `TIDB_ON_QDRANT_GRPC_PORT` | `integer` | `6334` | `TIDB_ON_QDRANT_GRPC_PORT` | Tidb on Qdrant grpc port | +| `TIDB_ON_QDRANT_URL` | `string \| null` | `""` | `TIDB_ON_QDRANT_URL` | Tidb on Qdrant url | +| `TIDB_PRIVATE_KEY` | `string \| null` | `""` | `TIDB_PRIVATE_KEY` | Tidb account private key | +| `TIDB_PROJECT_ID` | `string \| null` | `""` | `TIDB_PROJECT_ID` | Tidb project id | +| `TIDB_PUBLIC_KEY` | `string \| null` | `""` | `TIDB_PUBLIC_KEY` | Tidb account public key | +| `TIDB_REGION` | `string \| null` | `"regions/aws-us-east-1"` | `TIDB_REGION` | Tidb serverless region | +| `TIDB_SPEND_LIMIT` | `integer \| null` | `100` | `TIDB_SPEND_LIMIT` | Tidb spend limit | + +## `middleware.vdb.upstash` + +> Applies when: `VECTOR_STORE=upstash` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `UPSTASH_VECTOR_TOKEN` | `string \| null` | `""` | `UPSTASH_VECTOR_TOKEN` | Token for authenticating with the upstash server | +| `UPSTASH_VECTOR_URL` | `string \| null` | `""` | `UPSTASH_VECTOR_URL` | URL of the upstash server (e.g., 'https://vector.upstash.io') | + +## `middleware.vdb.vastbase-vector` + +> Applies when: `VECTOR_STORE=vastbase` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `VASTBASE_DATABASE` | `string \| null` | `""` | `VASTBASE_DATABASE` | Name of the Vastbase database to connect to | +| `VASTBASE_HOST` | `string \| null` | `""` | `VASTBASE_HOST` | Hostname or IP address of the Vastbase server with Vector extension (e.g., 'localhost') | +| `VASTBASE_MAX_CONNECTION` | `integer` | `5` | `VASTBASE_MAX_CONNECTION` | Max connection of the Vastbase database | +| `VASTBASE_MIN_CONNECTION` | `integer` | `1` | `VASTBASE_MIN_CONNECTION` | Min connection of the Vastbase database | +| `VASTBASE_PASSWORD` | `string \| null` | `""` | `VASTBASE_PASSWORD` | Password for authenticating with the Vastbase database | +| `VASTBASE_PORT` | `integer` | `5432` | `VASTBASE_PORT` | Port number on which the Vastbase server is listening (default is 5432) | +| `VASTBASE_USER` | `string \| null` | `""` | `VASTBASE_USER` | Username for authenticating with the Vastbase database | + +## `middleware.vdb.viking-d-b` + +> Applies when: `VECTOR_STORE=vikingdb` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `VIKINGDB_ACCESS_KEY` | `string \| null` | `""` | `VIKINGDB_ACCESS_KEY` | The Access Key provided by Volcengine VikingDB for API authentication. Refer to the following documentation for details on obtaining credentials: https://www.volcengine.com/docs/6291/65568 | +| `VIKINGDB_CONNECTION_TIMEOUT` | `integer` | `30` | `VIKINGDB_CONNECTION_TIMEOUT` | The connection timeout of the Volcengine VikingDB service. | +| `VIKINGDB_HOST` | `string` | `"api-vikingdb.mlp.cn-shanghai.volces.com"` | `VIKINGDB_HOST` | The host of the Volcengine VikingDB service.(e.g., 'api-vikingdb.volces.com', 'api-vikingdb.mlp.cn-shanghai.volces.com') | +| `VIKINGDB_REGION` | `string` | `"cn-shanghai"` | `VIKINGDB_REGION` | The region of the Volcengine VikingDB service.(e.g., 'cn-shanghai', 'cn-beijing'). | +| `VIKINGDB_SCHEME` | `string` | `"http"` | `VIKINGDB_SCHEME` | The scheme of the Volcengine VikingDB service.(e.g., 'http', 'https'). | +| `VIKINGDB_SECRET_KEY` | `string \| null` | `""` | `VIKINGDB_SECRET_KEY` | The Secret Key provided by Volcengine VikingDB for API authentication. | +| `VIKINGDB_SOCKET_TIMEOUT` | `integer` | `30` | `VIKINGDB_SOCKET_TIMEOUT` | The socket timeout of the Volcengine VikingDB service. | + +## `middleware.vdb.weaviate` + +> Applies when: `VECTOR_STORE=weaviate` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `WEAVIATE_API_KEY` | `string \| null` | `""` | `WEAVIATE_API_KEY` | API key for authenticating with the Weaviate server | +| `WEAVIATE_BATCH_SIZE` | `integer` | `100` | `WEAVIATE_BATCH_SIZE` | Number of objects to be processed in a single batch operation (default is 100) | +| `WEAVIATE_ENDPOINT` | `string \| null` | `""` | `WEAVIATE_ENDPOINT` | URL of the Weaviate server (e.g., 'http://localhost:8080' or 'https://weaviate.example.com') | +| `WEAVIATE_GRPC_ENDPOINT` | `string \| null` | `""` | `WEAVIATE_GRPC_ENDPOINT` | URL of the Weaviate gRPC server (e.g., 'grpc://localhost:50051' or 'grpcs://weaviate.example.com:443') | +| `WEAVIATE_TOKENIZATION` | `string \| null` | `"word"` | `WEAVIATE_TOKENIZATION` | Tokenization for Weaviate (default is word) | + +## `middleware.vector-store` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `VECTOR_INDEX_NAME_PREFIX` | `string \| null` | `"Vector_index"` | `VECTOR_INDEX_NAME_PREFIX` | Prefix used to create collection name in vector database | +| `VECTOR_STORE` | `string \| null` | `""` | `VECTOR_STORE` | Type of vector store to use for efficient similarity search. Set to None if not using a vector store. | +| `VECTOR_STORE_WHITELIST_ENABLE` | `boolean \| null` | `false` | `VECTOR_STORE_WHITELIST_ENABLE` | Enable whitelist for vector store. | + +## `observability.otel.o-tel` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `ENABLE_OTEL` | `boolean` | `false` | `ENABLE_OTEL` | Whether to enable OpenTelemetry | +| `OTEL_BATCH_EXPORT_SCHEDULE_DELAY` | `integer` | `5000` | `OTEL_BATCH_EXPORT_SCHEDULE_DELAY` | Batch export schedule delay in milliseconds | +| `OTEL_BATCH_EXPORT_TIMEOUT` | `integer` | `10000` | `OTEL_BATCH_EXPORT_TIMEOUT` | Batch export timeout in milliseconds | +| `OTEL_EXPORTER_OTLP_PROTOCOL` | `string` | `"http"` | `OTEL_EXPORTER_OTLP_PROTOCOL` | OTLP exporter protocol ('grpc' or 'http') | +| `OTEL_EXPORTER_TYPE` | `string` | `"otlp"` | `OTEL_EXPORTER_TYPE` | OTEL exporter type | +| `OTEL_MAX_EXPORT_BATCH_SIZE` | `integer` | `512` | `OTEL_MAX_EXPORT_BATCH_SIZE` | Maximum export batch size | +| `OTEL_MAX_QUEUE_SIZE` | `integer` | `2048` | `OTEL_MAX_QUEUE_SIZE` | Maximum queue size for the batch span processor | +| `OTEL_METRIC_EXPORT_INTERVAL` | `integer` | `60000` | `OTEL_METRIC_EXPORT_INTERVAL` | Metric export interval in milliseconds | +| `OTEL_METRIC_EXPORT_TIMEOUT` | `integer` | `30000` | `OTEL_METRIC_EXPORT_TIMEOUT` | Metric export timeout in milliseconds | +| `OTEL_SAMPLING_RATE` | `float` | `0.1` | `OTEL_SAMPLING_RATE` | Sampling rate for traces (0.0 to 1.0) | +| `OTLP_API_KEY` | `string` | `""` | `OTLP_API_KEY` | OTLP API key | +| `OTLP_BASE_ENDPOINT` | `string` | `"http://localhost:4318"` | `OTLP_BASE_ENDPOINT` | OTLP base endpoint | +| `OTLP_METRIC_ENDPOINT` | `string` | `""` | `OTLP_METRIC_ENDPOINT` | OTLP metric endpoint | +| `OTLP_TRACE_ENDPOINT` | `string` | `""` | `OTLP_TRACE_ENDPOINT` | OTLP trace endpoint | + +## `packaging.packaging-info` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `COMMIT_SHA` | `string` | `""` | `COMMIT_SHA` | SHA-1 checksum of the git commit used to build the app | + +## `remote_settings_sources.apollo.apollo-settings-source-info` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `APOLLO_APP_ID` | `string \| null` | `""` | `APOLLO_APP_ID` | apollo app_id | +| `APOLLO_CLUSTER` | `string \| null` | `""` | `APOLLO_CLUSTER` | apollo cluster | +| `APOLLO_CONFIG_URL` | `string \| null` | `""` | `APOLLO_CONFIG_URL` | apollo config url | +| `APOLLO_NAMESPACE` | `string \| null` | `""` | `APOLLO_NAMESPACE` | apollo namespace | + +## `remote_settings_sources.remote-settings-source` + +| Name | Type | Default | Accepted Env Names | Description | +| --- | --- | --- | --- | --- | +| `REMOTE_SETTINGS_SOURCE_NAME` | `enum \| string` | `""` | `REMOTE_SETTINGS_SOURCE_NAME` | name of remote config source | + diff --git a/api/tests/unit_tests/configs/test_env_reference.py b/api/tests/unit_tests/configs/test_env_reference.py new file mode 100644 index 0000000000..ae75b8c58a --- /dev/null +++ b/api/tests/unit_tests/configs/test_env_reference.py @@ -0,0 +1,251 @@ +import json + +from configs.env_reference import ( + build_backend_env_reference, + render_backend_env_reference_markdown, +) + + +def test_backend_env_reference_uses_backend_authority() -> None: + reference = build_backend_env_reference() + + assert reference["authority"]["source_root"] == "api/configs" + assert reference["authority"]["model"] == "configs.app_config.DifyConfig" + assert reference["resolution"]["precedence"][-1] == "code_default" + + +def test_backend_env_reference_includes_aliases_and_defaults() -> None: + reference = build_backend_env_reference() + variables = {variable["name"]: variable for variable in reference["variables"]} + + files_url = variables["FILES_URL"] + redis_host = variables["REDIS_HOST"] + + assert "CONSOLE_API_URL" in files_url["accepted_names"] + assert redis_host["code_default"] == "localhost" + assert redis_host["group"] == "middleware.cache.redis" + assert "source_location" not in redis_host + assert "sensitive" not in redis_host + + +def test_backend_env_reference_excludes_computed_and_nested_fields() -> None: + reference = build_backend_env_reference() + names = {variable["name"] for variable in reference["variables"]} + + assert "SQLALCHEMY_DATABASE_URI" not in names + assert "normalized_pubsub_redis_url" not in names + assert "project" not in names + + +def test_backend_env_reference_marks_provider_applicability() -> None: + reference = build_backend_env_reference() + variables = {variable["name"]: variable for variable in reference["variables"]} + + assert variables["S3_ACCESS_KEY"]["applies_when"] == "STORAGE_TYPE=s3" + assert variables["STORAGE_LOCAL_PATH"]["applies_when"] == "STORAGE_TYPE=local" + + +def test_backend_env_reference_markdown_explains_code_default_scope() -> None: + reference = build_backend_env_reference() + markdown = render_backend_env_reference_markdown(reference) + + assert "Deployment defaults, `.env.example`, and runtime-effective values are intentionally excluded." in markdown + assert "Code defaults are fallback values only." in markdown + assert "`REDIS_HOST`" in markdown + assert "| Name | Type | Default | Accepted Env Names | Description |" in markdown + assert "Code Default" not in markdown + assert "Required |" not in markdown + assert "Applies When |" not in markdown + assert "Source |" not in markdown + + +def test_backend_env_reference_markdown_normalizes_multiline_cells() -> None: + markdown = render_backend_env_reference_markdown( + { + "schema_version": "1", + "artifact_policy": "committed-generated-artifact", + "authority": {"kind": "backend-code-defaults", "source_root": "api/configs", "model": "configs.app_config.DifyConfig"}, + "resolution": {"precedence": ["process_env", "code_default"]}, + "variables": [ + { + "name": "EXAMPLE_ENV", + "accepted_names": ["EXAMPLE_ENV", "EXAMPLE_ALIAS"], + "group": "test.group", + "type": "string | null", + "description": "line one\nline two | extra", + "code_default": "value\nwith newline", + "applies_when": "MODE=demo\nENABLED=true", + "required": False, + } + ], + } + ) + + assert "line one line two \\| extra" in markdown + assert "> Applies when: `MODE=demo ENABLED=true`" in markdown + assert "`string \\| null`" in markdown + assert '`"value with newline"`' in markdown + assert "\nline two" not in markdown + + +def test_backend_env_reference_markdown_groups_partial_applicability_notes() -> None: + markdown = render_backend_env_reference_markdown( + { + "schema_version": "1", + "artifact_policy": "committed-generated-artifact", + "authority": {"kind": "backend-code-defaults", "source_root": "api/configs", "model": "configs.app_config.DifyConfig"}, + "resolution": {"precedence": ["process_env", "code_default"]}, + "variables": [ + { + "name": "S3_ACCESS_KEY", + "accepted_names": ["S3_ACCESS_KEY"], + "group": "storage.s3", + "type": "string", + "description": "Access key", + "code_default": None, + "required": False, + "applies_when": "STORAGE_TYPE=s3", + }, + { + "name": "S3_SECRET_KEY", + "accepted_names": ["S3_SECRET_KEY"], + "group": "storage.s3", + "type": "string", + "description": "Secret key", + "code_default": None, + "required": False, + "applies_when": "STORAGE_TYPE=s3", + }, + { + "name": "STORAGE_ENDPOINT", + "accepted_names": ["STORAGE_ENDPOINT"], + "group": "storage.s3", + "type": "string | null", + "description": "Endpoint override", + "code_default": None, + "required": False, + "applies_when": None, + }, + ], + } + ) + + assert "Applies when:" in markdown + assert "- `S3_ACCESS_KEY`, `S3_SECRET_KEY`: `STORAGE_TYPE=s3`" in markdown + assert "Applies When |" not in markdown + + +def test_backend_env_reference_markdown_normalizes_awkward_descriptions() -> None: + markdown = render_backend_env_reference_markdown( + { + "schema_version": "1", + "artifact_policy": "committed-generated-artifact", + "authority": {"kind": "backend-code-defaults", "source_root": "api/configs", "model": "configs.app_config.DifyConfig"}, + "resolution": {"precedence": ["process_env", "code_default"]}, + "variables": [ + { + "name": "ENTERPRISE_ENABLED", + "accepted_names": ["ENTERPRISE_ENABLED"], + "group": "enterprise.feature", + "type": "boolean", + "description": ( + "Enable or disable enterprise-level features.Before using, please contact " + "business@dify.ai by email to inquire about licensing matters." + ), + "code_default": False, + "required": False, + "applies_when": None, + }, + { + "name": "FILES_URL", + "accepted_names": ["FILES_URL", "CONSOLE_API_URL"], + "group": "feature.file-access", + "type": "string", + "description": ( + "Base URL for file preview or download, used for frontend display and " + "multi-model inputsUrl is signed and has expiration time." + ), + "code_default": "", + "required": False, + "applies_when": None, + }, + ], + } + ) + + assert "features. Before using, please contact business@dify.ai" in markdown + assert "multi-model inputs. The URL is signed and has an expiration time." in markdown + + +def test_backend_env_reference_markdown_renders_missing_defaults_explicitly() -> None: + markdown = render_backend_env_reference_markdown( + { + "schema_version": "1", + "artifact_policy": "committed-generated-artifact", + "authority": {"kind": "backend-code-defaults", "source_root": "api/configs", "model": "configs.app_config.DifyConfig"}, + "resolution": {"precedence": ["process_env", "code_default"]}, + "variables": [ + { + "name": "SENTRY_DSN", + "accepted_names": ["SENTRY_DSN"], + "group": "extra.sentry", + "type": "string | null", + "description": "Sentry DSN", + "code_default": None, + "required": False, + "applies_when": None, + } + ], + } + ) + + row = '| `SENTRY_DSN` | `string \\| null` | `""` | `SENTRY_DSN` | Sentry DSN |' + + assert row in markdown + assert row.count(" | ") == 4 + + +def test_backend_env_reference_markdown_keeps_code_default_column_styling_consistent() -> None: + markdown = render_backend_env_reference_markdown( + { + "schema_version": "1", + "artifact_policy": "committed-generated-artifact", + "authority": {"kind": "backend-code-defaults", "source_root": "api/configs", "model": "configs.app_config.DifyConfig"}, + "resolution": {"precedence": ["process_env", "code_default"]}, + "variables": [ + { + "name": "EMPTY_DEFAULT", + "accepted_names": ["EMPTY_DEFAULT"], + "group": "test.group", + "type": "string | null", + "description": "Empty default placeholder", + "code_default": None, + "required": False, + "applies_when": None, + }, + { + "name": "STRING_DEFAULT", + "accepted_names": ["STRING_DEFAULT"], + "group": "test.group", + "type": "string", + "description": "Concrete string default", + "code_default": "value", + "required": False, + "applies_when": None, + }, + ], + } + ) + + assert '| `EMPTY_DEFAULT` | `string \\| null` | `""` | `EMPTY_DEFAULT` | Empty default placeholder |' in markdown + assert '| `STRING_DEFAULT` | `string` | `"value"` | `STRING_DEFAULT` | Concrete string default |' in markdown + + +def test_backend_env_reference_is_json_serializable() -> None: + reference = build_backend_env_reference() + rendered = json.dumps(reference) + + assert '"schema_version": "1"' in rendered + assert '"resolution"' in rendered + assert '"source_location"' not in rendered + assert '"sensitive"' not in rendered diff --git a/docker/docker-compose-demo.yaml b/docker/docker-compose-demo.yaml deleted file mode 100644 index 9fde621092..0000000000 --- a/docker/docker-compose-demo.yaml +++ /dev/null @@ -1,4038 +0,0 @@ -name: docker -services: - api: - depends_on: - db_mysql: - condition: service_healthy - required: false - db_postgres: - condition: service_healthy - required: false - init_permissions: - condition: service_completed_successfully - required: true - oceanbase: - condition: service_healthy - required: false - redis: - condition: service_started - required: true - seekdb: - condition: service_healthy - required: false - environment: - ACCESS_TOKEN_EXPIRE_MINUTES: "600" - ALIBABACLOUD_MYSQL_DATABASE: dify - ALIBABACLOUD_MYSQL_HNSW_M: "6" - ALIBABACLOUD_MYSQL_HOST: 127.0.0.1 - ALIBABACLOUD_MYSQL_MAX_CONNECTION: "5" - ALIBABACLOUD_MYSQL_PASSWORD: difyai123456 - ALIBABACLOUD_MYSQL_PORT: "3306" - ALIBABACLOUD_MYSQL_USER: root - ALIYUN_OSS_ACCESS_KEY: your-access-key - ALIYUN_OSS_AUTH_VERSION: v4 - ALIYUN_OSS_BUCKET_NAME: your-bucket-name - ALIYUN_OSS_ENDPOINT: https://oss-ap-southeast-1-internal.aliyuncs.com - ALIYUN_OSS_PATH: your-path - ALIYUN_OSS_REGION: ap-southeast-1 - ALIYUN_OSS_SECRET_KEY: your-secret-key - ALIYUN_SLS_ACCESS_KEY_ID: "" - ALIYUN_SLS_ACCESS_KEY_SECRET: "" - ALIYUN_SLS_ENDPOINT: "" - ALIYUN_SLS_LOGSTORE_TTL: "365" - ALIYUN_SLS_PROJECT_NAME: "" - ALIYUN_SLS_REGION: "" - ALLOW_EMBED: "false" - ALLOW_INLINE_STYLES: "false" - ALLOW_UNSAFE_DATA_SCHEME: "false" - AMPLITUDE_API_KEY: "" - ANALYTICDB_ACCOUNT: testaccount - ANALYTICDB_HOST: gp-test.aliyuncs.com - ANALYTICDB_INSTANCE_ID: gp-ab123456 - ANALYTICDB_KEY_ID: your-ak - ANALYTICDB_KEY_SECRET: your-sk - ANALYTICDB_MAX_CONNECTION: "5" - ANALYTICDB_MIN_CONNECTION: "1" - ANALYTICDB_NAMESPACE: dify - ANALYTICDB_NAMESPACE_PASSWORD: difypassword - ANALYTICDB_PASSWORD: testpassword - ANALYTICDB_PORT: "5432" - ANALYTICDB_REGION_ID: cn-hangzhou - ANNOTATION_IMPORT_FILE_SIZE_LIMIT: "2" - ANNOTATION_IMPORT_MAX_CONCURRENT: "5" - ANNOTATION_IMPORT_MAX_RECORDS: "10000" - ANNOTATION_IMPORT_MIN_RECORDS: "1" - ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR: "20" - ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE: "5" - API_SENTRY_DSN: "" - API_SENTRY_PROFILES_SAMPLE_RATE: "1.0" - API_SENTRY_TRACES_SAMPLE_RATE: "1.0" - API_TOOL_DEFAULT_CONNECT_TIMEOUT: "10" - API_TOOL_DEFAULT_READ_TIMEOUT: "60" - API_WORKFLOW_NODE_EXECUTION_REPOSITORY: repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository - API_WORKFLOW_RUN_REPOSITORY: repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository - APP_API_URL: "" - APP_DEFAULT_ACTIVE_REQUESTS: "0" - APP_MAX_ACTIVE_REQUESTS: "0" - APP_MAX_EXECUTION_TIME: "1200" - APP_WEB_URL: "" - ARCHIVE_STORAGE_ACCESS_KEY: "" - ARCHIVE_STORAGE_ARCHIVE_BUCKET: "" - ARCHIVE_STORAGE_ENABLED: "false" - ARCHIVE_STORAGE_ENDPOINT: "" - ARCHIVE_STORAGE_EXPORT_BUCKET: "" - ARCHIVE_STORAGE_REGION: auto - ARCHIVE_STORAGE_SECRET_KEY: "" - ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT: "60" - ATTACHMENT_IMAGE_FILE_SIZE_LIMIT: "2" - AZURE_BLOB_ACCOUNT_KEY: difyai - AZURE_BLOB_ACCOUNT_NAME: difyai - AZURE_BLOB_ACCOUNT_URL: https://.blob.core.windows.net - AZURE_BLOB_CONTAINER_NAME: difyai-container - BAIDU_OBS_ACCESS_KEY: your-access-key - BAIDU_OBS_BUCKET_NAME: your-bucket-name - BAIDU_OBS_ENDPOINT: your-server-url - BAIDU_OBS_SECRET_KEY: your-secret-key - BAIDU_VECTOR_DB_ACCOUNT: root - BAIDU_VECTOR_DB_API_KEY: dify - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT: "500" - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO: "0.05" - BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS: "30000" - BAIDU_VECTOR_DB_DATABASE: dify - BAIDU_VECTOR_DB_ENDPOINT: http://127.0.0.1:5287 - BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER: DEFAULT_ANALYZER - BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE: COARSE_MODE - BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS: "300" - BAIDU_VECTOR_DB_REPLICAS: "3" - BAIDU_VECTOR_DB_SHARD: "1" - BROKER_USE_SSL: "false" - CELERY_AUTO_SCALE: "false" - CELERY_BACKEND: redis - CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1 - CELERY_MAX_WORKERS: "" - CELERY_MIN_WORKERS: "" - CELERY_SENTINEL_MASTER_NAME: "" - CELERY_SENTINEL_PASSWORD: "" - CELERY_SENTINEL_SOCKET_TIMEOUT: "0.1" - CELERY_TASK_ANNOTATIONS: "null" - CELERY_USE_SENTINEL: "false" - CELERY_WORKER_AMOUNT: "4" - CELERY_WORKER_CLASS: "" - CERTBOT_DOMAIN: your_domain.com - CERTBOT_EMAIL: your_email@example.com - CERTBOT_OPTIONS: "" - CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES: "5" - CHECK_UPDATE_URL: https://updates.dify.ai - CHROMA_AUTH_CREDENTIALS: "" - CHROMA_AUTH_PROVIDER: chromadb.auth.token_authn.TokenAuthClientProvider - CHROMA_DATABASE: default_database - CHROMA_HOST: 127.0.0.1 - CHROMA_IS_PERSISTENT: "TRUE" - CHROMA_PORT: "8000" - CHROMA_SERVER_AUTHN_CREDENTIALS: difyai123456 - CHROMA_SERVER_AUTHN_PROVIDER: chromadb.auth.token_authn.TokenAuthenticationServerProvider - CHROMA_TENANT: default_tenant - CLICKZETTA_ANALYZER_MODE: smart - CLICKZETTA_ANALYZER_TYPE: chinese - CLICKZETTA_BATCH_SIZE: "100" - CLICKZETTA_ENABLE_INVERTED_INDEX: "true" - CLICKZETTA_INSTANCE: "" - CLICKZETTA_PASSWORD: "" - CLICKZETTA_SCHEMA: dify - CLICKZETTA_SERVICE: api.clickzetta.com - CLICKZETTA_USERNAME: "" - CLICKZETTA_VCLUSTER: default_ap - CLICKZETTA_VECTOR_DISTANCE_FUNCTION: cosine_distance - CLICKZETTA_VOLUME_DIFY_PREFIX: dify_km - CLICKZETTA_VOLUME_NAME: "" - CLICKZETTA_VOLUME_TABLE_PREFIX: dataset_ - CLICKZETTA_VOLUME_TYPE: user - CLICKZETTA_WORKSPACE: quick_start - CODE_EXECUTION_API_KEY: dify-sandbox - CODE_EXECUTION_CONNECT_TIMEOUT: "10" - CODE_EXECUTION_ENDPOINT: http://sandbox:8194 - CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY: "5.0" - CODE_EXECUTION_POOL_MAX_CONNECTIONS: "100" - CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - CODE_EXECUTION_READ_TIMEOUT: "60" - CODE_EXECUTION_SSL_VERIFY: "True" - CODE_EXECUTION_WRITE_TIMEOUT: "10" - CODE_GENERATION_MAX_TOKENS: "1024" - CODE_MAX_DEPTH: "5" - CODE_MAX_NUMBER: "9223372036854775807" - CODE_MAX_NUMBER_ARRAY_LENGTH: "1000" - CODE_MAX_OBJECT_ARRAY_LENGTH: "30" - CODE_MAX_PRECISION: "20" - CODE_MAX_STRING_ARRAY_LENGTH: "30" - CODE_MAX_STRING_LENGTH: "400000" - CODE_MIN_NUMBER: "-9223372036854775808" - CONSOLE_API_URL: "" - CONSOLE_API_URL_NEW: "" - CONSOLE_CORS_ALLOW_ORIGINS: '*' - CONSOLE_WEB_URL: "" - COOKIE_DOMAIN: "" - CORE_WORKFLOW_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository - CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository - COUCHBASE_BUCKET_NAME: Embeddings - COUCHBASE_CONNECTION_STRING: couchbase://couchbase-server - COUCHBASE_PASSWORD: password - COUCHBASE_SCOPE_NAME: _default - COUCHBASE_USER: Administrator - CREATE_TIDB_SERVICE_JOB_ENABLED: "false" - CSP_WHITELIST: "" - DATASET_MAX_SEGMENTS_PER_REQUEST: "0" - DB_DATABASE: dify - DB_HOST: db_postgres - DB_PASSWORD: difyai123456 - DB_PLUGIN_DATABASE: dify_plugin - DB_PORT: "5432" - DB_TYPE: postgresql - DB_USERNAME: postgres - DEBUG: "false" - DEPLOY_ENV: PRODUCTION - DIFY_BIND_ADDRESS: 0.0.0.0 - DIFY_PORT: "5001" - DSL_EXPORT_ENCRYPT_DATASET_ID: "true" - ELASTICSEARCH_API_KEY: YOUR-ELASTICSEARCH_API_KEY - ELASTICSEARCH_CA_CERTS: "" - ELASTICSEARCH_CLOUD_URL: YOUR-ELASTICSEARCH_CLOUD_URL - ELASTICSEARCH_HOST: 0.0.0.0 - ELASTICSEARCH_MAX_RETRIES: "10" - ELASTICSEARCH_PASSWORD: elastic - ELASTICSEARCH_PORT: "9200" - ELASTICSEARCH_REQUEST_TIMEOUT: "100000" - ELASTICSEARCH_RETRY_ON_TIMEOUT: "True" - ELASTICSEARCH_USE_CLOUD: "false" - ELASTICSEARCH_USERNAME: elastic - ELASTICSEARCH_VERIFY_CERTS: "False" - EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES: "5" - ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK: "true" - ENABLE_CLEAN_EMBEDDING_CACHE_TASK: "false" - ENABLE_CLEAN_MESSAGES: "false" - ENABLE_CLEAN_UNUSED_DATASETS_TASK: "false" - ENABLE_COLLABORATION_MODE: "false" - ENABLE_CREATE_TIDB_SERVERLESS_TASK: "false" - ENABLE_DATASETS_QUEUE_MONITOR: "false" - ENABLE_HUMAN_INPUT_TIMEOUT_TASK: "true" - ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK: "false" - ENABLE_OTEL: "false" - ENABLE_REQUEST_LOGGING: "False" - ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK: "false" - ENABLE_WEBSITE_FIRECRAWL: "true" - ENABLE_WEBSITE_JINAREADER: "true" - ENABLE_WEBSITE_WATERCRAWL: "true" - ENABLE_WORKFLOW_RUN_CLEANUP_TASK: "false" - ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK: "true" - ENDPOINT_URL_TEMPLATE: http://localhost/e/{hook_id} - ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES: "true" - ETCD_AUTO_COMPACTION_MODE: revision - ETCD_AUTO_COMPACTION_RETENTION: "1000" - ETCD_ENDPOINTS: etcd:2379 - ETCD_QUOTA_BACKEND_BYTES: "4294967296" - ETCD_SNAPSHOT_COUNT: "50000" - ETL_TYPE: dify - EVENT_BUS_REDIS_CHANNEL_TYPE: pubsub - EVENT_BUS_REDIS_URL: "" - EVENT_BUS_REDIS_USE_CLUSTERS: "false" - EXPERIMENTAL_ENABLE_VINEXT: "false" - EXPOSE_NGINX_PORT: "80" - EXPOSE_NGINX_SSL_PORT: "443" - EXPOSE_PLUGIN_DAEMON_PORT: "5002" - EXPOSE_PLUGIN_DEBUGGING_HOST: localhost - EXPOSE_PLUGIN_DEBUGGING_PORT: "5003" - FILES_ACCESS_TIMEOUT: "300" - FILES_URL: "" - FLASK_DEBUG: "false" - FORCE_VERIFYING_SIGNATURE: "true" - GOOGLE_STORAGE_BUCKET_NAME: your-bucket-name - GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: "" - GRAPH_ENGINE_MAX_WORKERS: "10" - GRAPH_ENGINE_MIN_WORKERS: "1" - GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME: "5.0" - GRAPH_ENGINE_SCALE_UP_THRESHOLD: "3" - GUNICORN_TIMEOUT: "360" - HOLOGRES_ACCESS_KEY_ID: "" - HOLOGRES_ACCESS_KEY_SECRET: "" - HOLOGRES_BASE_QUANTIZATION_TYPE: rabitq - HOLOGRES_DATABASE: "" - HOLOGRES_DISTANCE_METHOD: Cosine - HOLOGRES_EF_CONSTRUCTION: "400" - HOLOGRES_HOST: "" - HOLOGRES_MAX_DEGREE: "64" - HOLOGRES_PORT: "80" - HOLOGRES_SCHEMA: public - HOLOGRES_TOKENIZER: jieba - HTTP_REQUEST_MAX_CONNECT_TIMEOUT: "10" - HTTP_REQUEST_MAX_READ_TIMEOUT: "600" - HTTP_REQUEST_MAX_WRITE_TIMEOUT: "600" - HTTP_REQUEST_NODE_MAX_BINARY_SIZE: "10485760" - HTTP_REQUEST_NODE_MAX_TEXT_SIZE: "1048576" - HTTP_REQUEST_NODE_SSL_VERIFY: "True" - HUAWEI_CLOUD_HOSTS: https://127.0.0.1:9200 - HUAWEI_CLOUD_PASSWORD: admin - HUAWEI_CLOUD_USER: admin - HUAWEI_OBS_ACCESS_KEY: your-access-key - HUAWEI_OBS_BUCKET_NAME: your-bucket-name - HUAWEI_OBS_PATH_STYLE: "false" - HUAWEI_OBS_SECRET_KEY: your-secret-key - HUAWEI_OBS_SERVER: your-server-url - HUMAN_INPUT_TIMEOUT_TASK_INTERVAL: "1" - IMAGE_FILE_BATCH_LIMIT: "10" - INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: "4000" - INIT_PASSWORD: "" - INNER_API_KEY_FOR_PLUGIN: QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 - INTERNAL_FILES_URL: "" - INVITE_EXPIRY_HOURS: "72" - IRIS_CONNECTION_URL: "" - IRIS_DATABASE: USER - IRIS_HOST: iris - IRIS_MAX_CONNECTION: "3" - IRIS_MIN_CONNECTION: "1" - IRIS_PASSWORD: Dify@1234 - IRIS_SCHEMA: dify - IRIS_SUPER_SERVER_PORT: "1972" - IRIS_TEXT_INDEX: "true" - IRIS_TEXT_INDEX_LANGUAGE: en - IRIS_TIMEZONE: UTC - IRIS_USER: _SYSTEM - IRIS_WEB_SERVER_PORT: "52773" - KIBANA_PORT: "5601" - LANG: C.UTF-8 - LC_ALL: C.UTF-8 - LINDORM_PASSWORD: admin - LINDORM_QUERY_TIMEOUT: "1" - LINDORM_URL: http://localhost:30070 - LINDORM_USERNAME: admin - LINDORM_USING_UGC: "True" - LOG_DATEFORMAT: '%Y-%m-%d %H:%M:%S' - LOG_FILE: /app/logs/server.log - LOG_FILE_BACKUP_COUNT: "5" - LOG_FILE_MAX_SIZE: "20" - LOG_LEVEL: INFO - LOG_OUTPUT_FORMAT: text - LOG_TZ: UTC - LOGSTORE_DUAL_READ_ENABLED: "true" - LOGSTORE_DUAL_WRITE_ENABLED: "false" - LOGSTORE_ENABLE_PUT_GRAPH_FIELD: "true" - LOOP_NODE_MAX_COUNT: "100" - MAIL_DEFAULT_SEND_FROM: "" - MAIL_TYPE: resend - MARKETPLACE_API_URL: https://marketplace.dify.ai - MARKETPLACE_ENABLED: "true" - MATRIXONE_DATABASE: dify - MATRIXONE_HOST: matrixone - MATRIXONE_PASSWORD: "111" - MATRIXONE_PORT: "6001" - MATRIXONE_USER: dump - MAX_ITERATIONS_NUM: "99" - MAX_PARALLEL_LIMIT: "10" - MAX_SUBMIT_COUNT: "100" - MAX_TOOLS_NUM: "10" - MAX_TREE_DEPTH: "50" - MAX_VARIABLE_SIZE: "204800" - MIGRATION_ENABLED: "true" - MILVUS_ANALYZER_PARAMS: "" - MILVUS_AUTHORIZATION_ENABLED: "true" - MILVUS_DATABASE: "" - MILVUS_ENABLE_HYBRID_SEARCH: "False" - MILVUS_PASSWORD: "" - MILVUS_TOKEN: "" - MILVUS_URI: http://host.docker.internal:19530 - MILVUS_USER: "" - MINIO_ACCESS_KEY: minioadmin - MINIO_ADDRESS: minio:9000 - MINIO_SECRET_KEY: minioadmin - MODE: api - MULTIMODAL_SEND_FORMAT: base64 - MYSCALE_DATABASE: dify - MYSCALE_FTS_PARAMS: "" - MYSCALE_HOST: myscale - MYSCALE_PASSWORD: "" - MYSCALE_PORT: "8123" - MYSCALE_USER: default - MYSQL_HOST_VOLUME: ./volumes/mysql/data - MYSQL_INNODB_BUFFER_POOL_SIZE: 512M - MYSQL_INNODB_FLUSH_LOG_AT_TRX_COMMIT: "2" - MYSQL_INNODB_LOG_FILE_SIZE: 128M - MYSQL_MAX_CONNECTIONS: "1000" - NEXT_PUBLIC_BATCH_CONCURRENCY: "5" - NEXT_PUBLIC_COOKIE_DOMAIN: "" - NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX: "false" - NEXT_PUBLIC_SOCKET_URL: ws://localhost - NGINX_CLIENT_MAX_BODY_SIZE: 100M - NGINX_ENABLE_CERTBOT_CHALLENGE: "false" - NGINX_HTTPS_ENABLED: "false" - NGINX_KEEPALIVE_TIMEOUT: "65" - NGINX_PORT: "80" - NGINX_PROXY_READ_TIMEOUT: 3600s - NGINX_PROXY_SEND_TIMEOUT: 3600s - NGINX_SERVER_NAME: _ - NGINX_SSL_CERT_FILENAME: dify.crt - NGINX_SSL_CERT_KEY_FILENAME: dify.key - NGINX_SSL_PORT: "443" - NGINX_SSL_PROTOCOLS: TLSv1.2 TLSv1.3 - NGINX_WORKER_PROCESSES: auto - NOTION_CLIENT_ID: "" - NOTION_CLIENT_SECRET: "" - NOTION_INTEGRATION_TYPE: public - NOTION_INTERNAL_SECRET: "" - OCEANBASE_CLUSTER_NAME: difyai - OCEANBASE_ENABLE_HYBRID_SEARCH: "false" - OCEANBASE_FULLTEXT_PARSER: ik - OCEANBASE_MEMORY_LIMIT: 6G - OCEANBASE_VECTOR_DATABASE: test - OCEANBASE_VECTOR_HOST: oceanbase - OCEANBASE_VECTOR_PASSWORD: difyai123456 - OCEANBASE_VECTOR_PORT: "2881" - OCEANBASE_VECTOR_USER: root@test - OCI_ACCESS_KEY: your-access-key - OCI_BUCKET_NAME: your-bucket-name - OCI_ENDPOINT: https://your-object-storage-namespace.compat.objectstorage.us-ashburn-1.oraclecloud.com - OCI_REGION: us-ashburn-1 - OCI_SECRET_KEY: your-secret-key - OPENAI_API_BASE: https://api.openai.com/v1 - OPENDAL_FS_ROOT: storage - OPENDAL_SCHEME: fs - OPENGAUSS_DATABASE: dify - OPENGAUSS_ENABLE_PQ: "false" - OPENGAUSS_HOST: opengauss - OPENGAUSS_MAX_CONNECTION: "5" - OPENGAUSS_MIN_CONNECTION: "1" - OPENGAUSS_PASSWORD: Dify@123 - OPENGAUSS_PORT: "6600" - OPENGAUSS_USER: postgres - OPENSEARCH_AUTH_METHOD: basic - OPENSEARCH_AWS_REGION: ap-southeast-1 - OPENSEARCH_AWS_SERVICE: aoss - OPENSEARCH_BOOTSTRAP_MEMORY_LOCK: "true" - OPENSEARCH_DISCOVERY_TYPE: single-node - OPENSEARCH_HOST: opensearch - OPENSEARCH_INITIAL_ADMIN_PASSWORD: Qazwsxedc!@#123 - OPENSEARCH_JAVA_OPTS_MAX: 1024m - OPENSEARCH_JAVA_OPTS_MIN: 512m - OPENSEARCH_MEMLOCK_HARD: "-1" - OPENSEARCH_MEMLOCK_SOFT: "-1" - OPENSEARCH_NOFILE_HARD: "65536" - OPENSEARCH_NOFILE_SOFT: "65536" - OPENSEARCH_PASSWORD: admin - OPENSEARCH_PORT: "9200" - OPENSEARCH_SECURE: "true" - OPENSEARCH_USER: admin - OPENSEARCH_VERIFY_CERTS: "true" - ORACLE_CHARACTERSET: AL32UTF8 - ORACLE_CONFIG_DIR: /app/api/storage/wallet - ORACLE_DSN: oracle:1521/FREEPDB1 - ORACLE_IS_AUTONOMOUS: "false" - ORACLE_PASSWORD: dify - ORACLE_PWD: Dify123456 - ORACLE_USER: dify - ORACLE_WALLET_LOCATION: /app/api/storage/wallet - ORACLE_WALLET_PASSWORD: dify - OTEL_BATCH_EXPORT_SCHEDULE_DELAY: "5000" - OTEL_BATCH_EXPORT_TIMEOUT: "10000" - OTEL_EXPORTER_OTLP_PROTOCOL: "" - OTEL_EXPORTER_TYPE: otlp - OTEL_MAX_EXPORT_BATCH_SIZE: "512" - OTEL_MAX_QUEUE_SIZE: "2048" - OTEL_METRIC_EXPORT_INTERVAL: "60000" - OTEL_METRIC_EXPORT_TIMEOUT: "30000" - OTEL_SAMPLING_RATE: "0.1" - OTLP_API_KEY: "" - OTLP_BASE_ENDPOINT: http://localhost:4318 - OTLP_METRIC_ENDPOINT: "" - OTLP_TRACE_ENDPOINT: "" - OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES: "5" - PGDATA: /var/lib/postgresql/data/pgdata - PGVECTO_RS_DATABASE: dify - PGVECTO_RS_HOST: pgvecto-rs - PGVECTO_RS_PASSWORD: difyai123456 - PGVECTO_RS_PORT: "5432" - PGVECTO_RS_USER: postgres - PGVECTOR_DATABASE: dify - PGVECTOR_HOST: pgvector - PGVECTOR_MAX_CONNECTION: "5" - PGVECTOR_MIN_CONNECTION: "1" - PGVECTOR_PASSWORD: difyai123456 - PGVECTOR_PG_BIGM: "false" - PGVECTOR_PG_BIGM_VERSION: 1.2-20240606 - PGVECTOR_PGDATA: /var/lib/postgresql/data/pgdata - PGVECTOR_PGUSER: postgres - PGVECTOR_PORT: "5432" - PGVECTOR_POSTGRES_DB: dify - PGVECTOR_POSTGRES_PASSWORD: difyai123456 - PGVECTOR_USER: postgres - PIP_MIRROR_URL: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_ID: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_SECRET: "" - PLUGIN_ALIYUN_OSS_AUTH_VERSION: v4 - PLUGIN_ALIYUN_OSS_ENDPOINT: "" - PLUGIN_ALIYUN_OSS_PATH: "" - PLUGIN_ALIYUN_OSS_REGION: "" - PLUGIN_AWS_ACCESS_KEY: "" - PLUGIN_AWS_REGION: "" - PLUGIN_AWS_SECRET_KEY: "" - PLUGIN_AZURE_BLOB_STORAGE_CONNECTION_STRING: "" - PLUGIN_AZURE_BLOB_STORAGE_CONTAINER_NAME: "" - PLUGIN_BASED_TOKEN_COUNTING_ENABLED: "false" - PLUGIN_DAEMON_KEY: lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi - PLUGIN_DAEMON_PORT: "5002" - PLUGIN_DAEMON_TIMEOUT: "600.0" - PLUGIN_DAEMON_URL: http://plugin_daemon:5002 - PLUGIN_DEBUGGING_HOST: 0.0.0.0 - PLUGIN_DEBUGGING_PORT: "5003" - PLUGIN_DIFY_INNER_API_KEY: QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 - PLUGIN_DIFY_INNER_API_URL: http://api:5001 - PLUGIN_INSTALLED_PATH: plugin - PLUGIN_MAX_EXECUTION_TIMEOUT: "600" - PLUGIN_MAX_PACKAGE_SIZE: "52428800" - PLUGIN_MEDIA_CACHE_PATH: assets - PLUGIN_MODEL_SCHEMA_CACHE_TTL: "3600" - PLUGIN_PACKAGE_CACHE_PATH: plugin_packages - PLUGIN_PPROF_ENABLED: "false" - PLUGIN_PYTHON_ENV_INIT_TIMEOUT: "120" - PLUGIN_REMOTE_INSTALL_HOST: localhost - PLUGIN_REMOTE_INSTALL_PORT: "5003" - PLUGIN_S3_ENDPOINT: "" - PLUGIN_S3_USE_AWS: "false" - PLUGIN_S3_USE_AWS_MANAGED_IAM: "false" - PLUGIN_S3_USE_PATH_STYLE: "false" - PLUGIN_SENTRY_DSN: "" - PLUGIN_SENTRY_ENABLED: "false" - PLUGIN_STDIO_BUFFER_SIZE: "1024" - PLUGIN_STDIO_MAX_BUFFER_SIZE: "5242880" - PLUGIN_STORAGE_LOCAL_ROOT: /app/storage - PLUGIN_STORAGE_OSS_BUCKET: "" - PLUGIN_STORAGE_TYPE: local - PLUGIN_TENCENT_COS_REGION: "" - PLUGIN_TENCENT_COS_SECRET_ID: "" - PLUGIN_TENCENT_COS_SECRET_KEY: "" - PLUGIN_VOLCENGINE_TOS_ACCESS_KEY: "" - PLUGIN_VOLCENGINE_TOS_ENDPOINT: "" - PLUGIN_VOLCENGINE_TOS_REGION: "" - PLUGIN_VOLCENGINE_TOS_SECRET_KEY: "" - PLUGIN_WORKING_PATH: /app/storage/cwd - POSITION_PROVIDER_EXCLUDES: "" - POSITION_PROVIDER_INCLUDES: "" - POSITION_PROVIDER_PINS: "" - POSITION_TOOL_EXCLUDES: "" - POSITION_TOOL_INCLUDES: "" - POSITION_TOOL_PINS: "" - POSTGRES_EFFECTIVE_CACHE_SIZE: 4096MB - POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT: "0" - POSTGRES_MAINTENANCE_WORK_MEM: 64MB - POSTGRES_MAX_CONNECTIONS: "100" - POSTGRES_SHARED_BUFFERS: 128MB - POSTGRES_STATEMENT_TIMEOUT: "0" - POSTGRES_WORK_MEM: 4MB - PROMPT_GENERATION_MAX_TOKENS: "512" - PYTHONIOENCODING: utf-8 - QDRANT_API_KEY: difyai123456 - QDRANT_CLIENT_TIMEOUT: "20" - QDRANT_GRPC_ENABLED: "false" - QDRANT_GRPC_PORT: "6334" - QDRANT_REPLICATION_FACTOR: "1" - QDRANT_URL: http://qdrant:6333 - QUEUE_MONITOR_ALERT_EMAILS: "" - QUEUE_MONITOR_INTERVAL: "30" - QUEUE_MONITOR_THRESHOLD: "200" - REDIS_CLUSTERS: "" - REDIS_CLUSTERS_PASSWORD: "" - REDIS_DB: "0" - REDIS_HEALTH_CHECK_INTERVAL: "30" - REDIS_HOST: redis - REDIS_KEY_PREFIX: "" - REDIS_MAX_CONNECTIONS: "" - REDIS_PASSWORD: difyai123456 - REDIS_PORT: "6379" - REDIS_RETRY_BACKOFF_BASE: "1.0" - REDIS_RETRY_BACKOFF_CAP: "10.0" - REDIS_RETRY_RETRIES: "3" - REDIS_SENTINEL_PASSWORD: "" - REDIS_SENTINEL_SERVICE_NAME: "" - REDIS_SENTINEL_SOCKET_TIMEOUT: "0.1" - REDIS_SENTINEL_USERNAME: "" - REDIS_SENTINELS: "" - REDIS_SOCKET_CONNECT_TIMEOUT: "5.0" - REDIS_SOCKET_TIMEOUT: "5.0" - REDIS_SSL_CA_CERTS: "" - REDIS_SSL_CERT_REQS: CERT_NONE - REDIS_SSL_CERTFILE: "" - REDIS_SSL_KEYFILE: "" - REDIS_USE_CLUSTERS: "false" - REDIS_USE_SENTINEL: "false" - REDIS_USE_SSL: "false" - REDIS_USERNAME: "" - REFRESH_TOKEN_EXPIRE_DAYS: "30" - RELYT_DATABASE: postgres - RELYT_HOST: db - RELYT_PASSWORD: difyai123456 - RELYT_PORT: "5432" - RELYT_USER: postgres - RESEND_API_KEY: your-resend-api-key - RESEND_API_URL: https://api.resend.com - RESET_PASSWORD_TOKEN_EXPIRY_MINUTES: "5" - RESPECT_XFORWARD_HEADERS_ENABLED: "false" - S3_ACCESS_KEY: "" - S3_ADDRESS_STYLE: auto - S3_BUCKET_NAME: difyai - S3_ENDPOINT: "" - S3_REGION: us-east-1 - S3_SECRET_KEY: "" - S3_USE_AWS_MANAGED_IAM: "false" - SANDBOX_API_KEY: dify-sandbox - SANDBOX_ENABLE_NETWORK: "true" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL: "200" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: "1000" - SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD: "21" - SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL: "90000" - SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: "30" - SANDBOX_GIN_MODE: release - SANDBOX_HTTP_PROXY: http://ssrf_proxy:3128 - SANDBOX_HTTPS_PROXY: http://ssrf_proxy:3128 - SANDBOX_PORT: "8194" - SANDBOX_WORKER_TIMEOUT: "15" - SCARF_NO_ANALYTICS: "true" - SECRET_KEY: sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U - SEEKDB_MEMORY_LIMIT: 2G - SENDGRID_API_KEY: "" - SENTRY_DSN: "" - SENTRY_PROFILES_SAMPLE_RATE: "1.0" - SENTRY_TRACES_SAMPLE_RATE: "1.0" - SERVER_WORKER_AMOUNT: "1" - SERVER_WORKER_CLASS: gevent - SERVER_WORKER_CONNECTIONS: "10" - SERVICE_API_URL: "" - SINGLE_CHUNK_ATTACHMENT_LIMIT: "10" - SMTP_LOCAL_HOSTNAME: "" - SMTP_OPPORTUNISTIC_TLS: "false" - SMTP_PASSWORD: "" - SMTP_PORT: "465" - SMTP_SERVER: "" - SMTP_USE_TLS: "true" - SMTP_USERNAME: "" - SQLALCHEMY_ECHO: "false" - SQLALCHEMY_MAX_OVERFLOW: "10" - SQLALCHEMY_POOL_PRE_PING: "false" - SQLALCHEMY_POOL_RECYCLE: "3600" - SQLALCHEMY_POOL_SIZE: "30" - SQLALCHEMY_POOL_TIMEOUT: "30" - SQLALCHEMY_POOL_USE_LIFO: "false" - SSRF_COREDUMP_DIR: /var/spool/squid - SSRF_DEFAULT_CONNECT_TIME_OUT: "5" - SSRF_DEFAULT_READ_TIME_OUT: "5" - SSRF_DEFAULT_TIME_OUT: "5" - SSRF_DEFAULT_WRITE_TIME_OUT: "5" - SSRF_HTTP_PORT: "3128" - SSRF_POOL_KEEPALIVE_EXPIRY: "5.0" - SSRF_POOL_MAX_CONNECTIONS: "100" - SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - SSRF_PROXY_HTTP_URL: http://ssrf_proxy:3128 - SSRF_PROXY_HTTPS_URL: http://ssrf_proxy:3128 - SSRF_REVERSE_PROXY_PORT: "8194" - SSRF_SANDBOX_HOST: sandbox - STORAGE_TYPE: opendal - SUPABASE_API_KEY: your-access-key - SUPABASE_BUCKET_NAME: your-bucket-name - SUPABASE_URL: your-server-url - SWAGGER_UI_ENABLED: "false" - SWAGGER_UI_PATH: /swagger-ui.html - TABLESTORE_ACCESS_KEY_ID: xxx - TABLESTORE_ACCESS_KEY_SECRET: xxx - TABLESTORE_ENDPOINT: https://instance-name.cn-hangzhou.ots.aliyuncs.com - TABLESTORE_INSTANCE_NAME: instance-name - TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE: "false" - TEMPLATE_TRANSFORM_MAX_LENGTH: "400000" - TENANT_ISOLATED_TASK_CONCURRENCY: "1" - TENCENT_COS_BUCKET_NAME: your-bucket-name - TENCENT_COS_CUSTOM_DOMAIN: your-custom-domain - TENCENT_COS_REGION: your-region - TENCENT_COS_SCHEME: your-scheme - TENCENT_COS_SECRET_ID: your-secret-id - TENCENT_COS_SECRET_KEY: your-secret-key - TENCENT_VECTOR_DB_API_KEY: dify - TENCENT_VECTOR_DB_DATABASE: dify - TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH: "false" - TENCENT_VECTOR_DB_REPLICAS: "2" - TENCENT_VECTOR_DB_SHARD: "1" - TENCENT_VECTOR_DB_TIMEOUT: "30" - TENCENT_VECTOR_DB_URL: http://127.0.0.1 - TENCENT_VECTOR_DB_USERNAME: dify - TEXT_GENERATION_TIMEOUT_MS: "60000" - TIDB_API_URL: http://127.0.0.1 - TIDB_IAM_API_URL: http://127.0.0.1 - TIDB_ON_QDRANT_API_KEY: dify - TIDB_ON_QDRANT_CLIENT_TIMEOUT: "20" - TIDB_ON_QDRANT_GRPC_ENABLED: "false" - TIDB_ON_QDRANT_GRPC_PORT: "6334" - TIDB_ON_QDRANT_URL: http://127.0.0.1 - TIDB_PRIVATE_KEY: dify - TIDB_PROJECT_ID: dify - TIDB_PUBLIC_KEY: dify - TIDB_REGION: regions/aws-us-east-1 - TIDB_SPEND_LIMIT: "100" - TIDB_VECTOR_DATABASE: dify - TIDB_VECTOR_HOST: tidb - TIDB_VECTOR_PASSWORD: "" - TIDB_VECTOR_PORT: "4000" - TIDB_VECTOR_USER: "" - TOP_K_MAX_VALUE: "10" - TRIGGER_URL: http://localhost - UNSTRUCTURED_API_KEY: "" - UNSTRUCTURED_API_URL: "" - UPLOAD_AUDIO_FILE_SIZE_LIMIT: "50" - UPLOAD_FILE_BATCH_LIMIT: "5" - UPLOAD_FILE_EXTENSION_BLACKLIST: "" - UPLOAD_FILE_SIZE_LIMIT: "15" - UPLOAD_IMAGE_FILE_SIZE_LIMIT: "10" - UPLOAD_VIDEO_FILE_SIZE_LIMIT: "100" - UPSTASH_VECTOR_TOKEN: dify - UPSTASH_VECTOR_URL: https://xxx-vector.upstash.io - UV_CACHE_DIR: /tmp/.uv-cache - VASTBASE_DATABASE: dify - VASTBASE_HOST: vastbase - VASTBASE_MAX_CONNECTION: "5" - VASTBASE_MIN_CONNECTION: "1" - VASTBASE_PASSWORD: Difyai123456 - VASTBASE_PORT: "5432" - VASTBASE_USER: dify - VECTOR_INDEX_NAME_PREFIX: Vector_index - VECTOR_STORE: weaviate - VIKINGDB_ACCESS_KEY: your-ak - VIKINGDB_CONNECTION_TIMEOUT: "30" - VIKINGDB_HOST: api-vikingdb.xxx.volces.com - VIKINGDB_REGION: cn-shanghai - VIKINGDB_SCHEMA: http - VIKINGDB_SECRET_KEY: your-sk - VIKINGDB_SOCKET_TIMEOUT: "30" - VOLCENGINE_TOS_ACCESS_KEY: your-access-key - VOLCENGINE_TOS_BUCKET_NAME: your-bucket-name - VOLCENGINE_TOS_ENDPOINT: your-server-url - VOLCENGINE_TOS_REGION: your-region - VOLCENGINE_TOS_SECRET_KEY: your-secret-key - WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_APIKEY_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_USERS: hello@dify.ai - WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED: "true" - WEAVIATE_AUTHORIZATION_ADMINLIST_USERS: hello@dify.ai - WEAVIATE_CLUSTER_HOSTNAME: node1 - WEAVIATE_DEFAULT_VECTORIZER_MODULE: none - WEAVIATE_DISABLE_TELEMETRY: "false" - WEAVIATE_ENABLE_TOKENIZER_GSE: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR: "false" - WEAVIATE_ENDPOINT: http://weaviate:8080 - WEAVIATE_GRPC_ENDPOINT: grpc://weaviate:50051 - WEAVIATE_PERSISTENCE_DATA_PATH: /var/lib/weaviate - WEAVIATE_QUERY_DEFAULTS_LIMIT: "25" - WEAVIATE_TOKENIZATION: word - WEB_API_CORS_ALLOW_ORIGINS: '*' - WEB_SENTRY_DSN: "" - WEBHOOK_REQUEST_BODY_MAX_SIZE: "10485760" - WORKFLOW_CALL_MAX_DEPTH: "5" - WORKFLOW_FILE_UPLOAD_LIMIT: "10" - WORKFLOW_LOG_CLEANUP_BATCH_SIZE: "100" - WORKFLOW_LOG_CLEANUP_ENABLED: "false" - WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS: "" - WORKFLOW_LOG_RETENTION_DAYS: "30" - WORKFLOW_MAX_EXECUTION_STEPS: "500" - WORKFLOW_MAX_EXECUTION_TIME: "1200" - WORKFLOW_NODE_EXECUTION_STORAGE: rdbms - WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK: "0" - WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE: "100" - WORKFLOW_SCHEDULE_POLLER_INTERVAL: "1" - healthcheck: - test: - - CMD - - curl - - -f - - http://localhost:5001/health - timeout: 5s - interval: 30s - retries: 3 - start_period: 30s - image: langgenius/dify-api:1.13.3 - networks: - default: null - ssrf_proxy_network: null - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/app/storage - target: /app/api/storage - bind: {} - db_postgres: - profiles: - - postgresql - command: - - postgres - - -c - - max_connections=100 - - -c - - shared_buffers=128MB - - -c - - work_mem=4MB - - -c - - maintenance_work_mem=64MB - - -c - - effective_cache_size=4096MB - - -c - - statement_timeout=0 - - -c - - idle_in_transaction_session_timeout=0 - environment: - PGDATA: /var/lib/postgresql/data/pgdata - POSTGRES_DB: dify - POSTGRES_PASSWORD: difyai123456 - POSTGRES_USER: postgres - healthcheck: - test: - - CMD - - pg_isready - - -h - - db_postgres - - -U - - postgres - - -d - - dify - timeout: 3s - interval: 1s - retries: 60 - image: postgres:15-alpine - networks: - default: null - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/db/data - target: /var/lib/postgresql/data - bind: {} - init_permissions: - command: - - sh - - -c - - | - FLAG_FILE="/app/api/storage/.init_permissions" - if [ -f "$${FLAG_FILE}" ]; then - echo "Permissions already initialized. Exiting." - exit 0 - fi - echo "Initializing permissions for /app/api/storage" - chown -R 1001:1001 /app/api/storage && touch "$${FLAG_FILE}" - echo "Permissions initialized. Exiting." - image: busybox:latest - networks: - default: null - restart: "no" - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/app/storage - target: /app/api/storage - bind: {} - nginx: - depends_on: - api: - condition: service_started - required: true - web: - condition: service_started - required: true - entrypoint: - - sh - - -c - - "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\r$$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" - environment: - CERTBOT_DOMAIN: your_domain.com - NGINX_CLIENT_MAX_BODY_SIZE: 100M - NGINX_ENABLE_CERTBOT_CHALLENGE: "false" - NGINX_HTTPS_ENABLED: "false" - NGINX_KEEPALIVE_TIMEOUT: "65" - NGINX_PORT: "80" - NGINX_PROXY_READ_TIMEOUT: 3600s - NGINX_PROXY_SEND_TIMEOUT: 3600s - NGINX_SERVER_NAME: _ - NGINX_SSL_CERT_FILENAME: dify.crt - NGINX_SSL_CERT_KEY_FILENAME: dify.key - NGINX_SSL_PORT: "443" - NGINX_SSL_PROTOCOLS: TLSv1.2 TLSv1.3 - NGINX_WORKER_PROCESSES: auto - image: nginx:latest - networks: - default: null - ports: - - mode: ingress - target: 80 - published: "80" - protocol: tcp - - mode: ingress - target: 443 - published: "443" - protocol: tcp - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/nginx/nginx.conf.template - target: /etc/nginx/nginx.conf.template - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/nginx/proxy.conf.template - target: /etc/nginx/proxy.conf.template - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/nginx/https.conf.template - target: /etc/nginx/https.conf.template - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/nginx/conf.d - target: /etc/nginx/conf.d - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/nginx/docker-entrypoint.sh - target: /docker-entrypoint-mount.sh - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/nginx/ssl - target: /etc/ssl - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/certbot/conf/live - target: /etc/letsencrypt/live - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/certbot/conf - target: /etc/letsencrypt - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/certbot/www - target: /var/www/html - bind: {} - plugin_daemon: - depends_on: - db_mysql: - condition: service_healthy - required: false - db_postgres: - condition: service_healthy - required: false - oceanbase: - condition: service_healthy - required: false - seekdb: - condition: service_healthy - required: false - environment: - ACCESS_TOKEN_EXPIRE_MINUTES: "600" - ALIBABACLOUD_MYSQL_DATABASE: dify - ALIBABACLOUD_MYSQL_HNSW_M: "6" - ALIBABACLOUD_MYSQL_HOST: 127.0.0.1 - ALIBABACLOUD_MYSQL_MAX_CONNECTION: "5" - ALIBABACLOUD_MYSQL_PASSWORD: difyai123456 - ALIBABACLOUD_MYSQL_PORT: "3306" - ALIBABACLOUD_MYSQL_USER: root - ALIYUN_OSS_ACCESS_KEY: your-access-key - ALIYUN_OSS_ACCESS_KEY_ID: "" - ALIYUN_OSS_ACCESS_KEY_SECRET: "" - ALIYUN_OSS_AUTH_VERSION: v4 - ALIYUN_OSS_BUCKET_NAME: your-bucket-name - ALIYUN_OSS_ENDPOINT: "" - ALIYUN_OSS_PATH: "" - ALIYUN_OSS_REGION: "" - ALIYUN_OSS_SECRET_KEY: your-secret-key - ALIYUN_SLS_ACCESS_KEY_ID: "" - ALIYUN_SLS_ACCESS_KEY_SECRET: "" - ALIYUN_SLS_ENDPOINT: "" - ALIYUN_SLS_LOGSTORE_TTL: "365" - ALIYUN_SLS_PROJECT_NAME: "" - ALIYUN_SLS_REGION: "" - ALLOW_EMBED: "false" - ALLOW_INLINE_STYLES: "false" - ALLOW_UNSAFE_DATA_SCHEME: "false" - AMPLITUDE_API_KEY: "" - ANALYTICDB_ACCOUNT: testaccount - ANALYTICDB_HOST: gp-test.aliyuncs.com - ANALYTICDB_INSTANCE_ID: gp-ab123456 - ANALYTICDB_KEY_ID: your-ak - ANALYTICDB_KEY_SECRET: your-sk - ANALYTICDB_MAX_CONNECTION: "5" - ANALYTICDB_MIN_CONNECTION: "1" - ANALYTICDB_NAMESPACE: dify - ANALYTICDB_NAMESPACE_PASSWORD: difypassword - ANALYTICDB_PASSWORD: testpassword - ANALYTICDB_PORT: "5432" - ANALYTICDB_REGION_ID: cn-hangzhou - ANNOTATION_IMPORT_FILE_SIZE_LIMIT: "2" - ANNOTATION_IMPORT_MAX_CONCURRENT: "5" - ANNOTATION_IMPORT_MAX_RECORDS: "10000" - ANNOTATION_IMPORT_MIN_RECORDS: "1" - ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR: "20" - ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE: "5" - API_SENTRY_DSN: "" - API_SENTRY_PROFILES_SAMPLE_RATE: "1.0" - API_SENTRY_TRACES_SAMPLE_RATE: "1.0" - API_TOOL_DEFAULT_CONNECT_TIMEOUT: "10" - API_TOOL_DEFAULT_READ_TIMEOUT: "60" - API_WORKFLOW_NODE_EXECUTION_REPOSITORY: repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository - API_WORKFLOW_RUN_REPOSITORY: repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository - APP_API_URL: "" - APP_DEFAULT_ACTIVE_REQUESTS: "0" - APP_MAX_ACTIVE_REQUESTS: "0" - APP_MAX_EXECUTION_TIME: "1200" - APP_WEB_URL: "" - ARCHIVE_STORAGE_ACCESS_KEY: "" - ARCHIVE_STORAGE_ARCHIVE_BUCKET: "" - ARCHIVE_STORAGE_ENABLED: "false" - ARCHIVE_STORAGE_ENDPOINT: "" - ARCHIVE_STORAGE_EXPORT_BUCKET: "" - ARCHIVE_STORAGE_REGION: auto - ARCHIVE_STORAGE_SECRET_KEY: "" - ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT: "60" - ATTACHMENT_IMAGE_FILE_SIZE_LIMIT: "2" - AWS_ACCESS_KEY: "" - AWS_REGION: "" - AWS_SECRET_KEY: "" - AZURE_BLOB_ACCOUNT_KEY: difyai - AZURE_BLOB_ACCOUNT_NAME: difyai - AZURE_BLOB_ACCOUNT_URL: https://.blob.core.windows.net - AZURE_BLOB_CONTAINER_NAME: difyai-container - AZURE_BLOB_STORAGE_CONNECTION_STRING: "" - AZURE_BLOB_STORAGE_CONTAINER_NAME: "" - BAIDU_OBS_ACCESS_KEY: your-access-key - BAIDU_OBS_BUCKET_NAME: your-bucket-name - BAIDU_OBS_ENDPOINT: your-server-url - BAIDU_OBS_SECRET_KEY: your-secret-key - BAIDU_VECTOR_DB_ACCOUNT: root - BAIDU_VECTOR_DB_API_KEY: dify - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT: "500" - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO: "0.05" - BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS: "30000" - BAIDU_VECTOR_DB_DATABASE: dify - BAIDU_VECTOR_DB_ENDPOINT: http://127.0.0.1:5287 - BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER: DEFAULT_ANALYZER - BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE: COARSE_MODE - BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS: "300" - BAIDU_VECTOR_DB_REPLICAS: "3" - BAIDU_VECTOR_DB_SHARD: "1" - BROKER_USE_SSL: "false" - CELERY_AUTO_SCALE: "false" - CELERY_BACKEND: redis - CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1 - CELERY_MAX_WORKERS: "" - CELERY_MIN_WORKERS: "" - CELERY_SENTINEL_MASTER_NAME: "" - CELERY_SENTINEL_PASSWORD: "" - CELERY_SENTINEL_SOCKET_TIMEOUT: "0.1" - CELERY_TASK_ANNOTATIONS: "null" - CELERY_USE_SENTINEL: "false" - CELERY_WORKER_AMOUNT: "4" - CELERY_WORKER_CLASS: "" - CERTBOT_DOMAIN: your_domain.com - CERTBOT_EMAIL: your_email@example.com - CERTBOT_OPTIONS: "" - CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES: "5" - CHECK_UPDATE_URL: https://updates.dify.ai - CHROMA_AUTH_CREDENTIALS: "" - CHROMA_AUTH_PROVIDER: chromadb.auth.token_authn.TokenAuthClientProvider - CHROMA_DATABASE: default_database - CHROMA_HOST: 127.0.0.1 - CHROMA_IS_PERSISTENT: "TRUE" - CHROMA_PORT: "8000" - CHROMA_SERVER_AUTHN_CREDENTIALS: difyai123456 - CHROMA_SERVER_AUTHN_PROVIDER: chromadb.auth.token_authn.TokenAuthenticationServerProvider - CHROMA_TENANT: default_tenant - CLICKZETTA_ANALYZER_MODE: smart - CLICKZETTA_ANALYZER_TYPE: chinese - CLICKZETTA_BATCH_SIZE: "100" - CLICKZETTA_ENABLE_INVERTED_INDEX: "true" - CLICKZETTA_INSTANCE: "" - CLICKZETTA_PASSWORD: "" - CLICKZETTA_SCHEMA: dify - CLICKZETTA_SERVICE: api.clickzetta.com - CLICKZETTA_USERNAME: "" - CLICKZETTA_VCLUSTER: default_ap - CLICKZETTA_VECTOR_DISTANCE_FUNCTION: cosine_distance - CLICKZETTA_VOLUME_DIFY_PREFIX: dify_km - CLICKZETTA_VOLUME_NAME: "" - CLICKZETTA_VOLUME_TABLE_PREFIX: dataset_ - CLICKZETTA_VOLUME_TYPE: user - CLICKZETTA_WORKSPACE: quick_start - CODE_EXECUTION_API_KEY: dify-sandbox - CODE_EXECUTION_CONNECT_TIMEOUT: "10" - CODE_EXECUTION_ENDPOINT: http://sandbox:8194 - CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY: "5.0" - CODE_EXECUTION_POOL_MAX_CONNECTIONS: "100" - CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - CODE_EXECUTION_READ_TIMEOUT: "60" - CODE_EXECUTION_SSL_VERIFY: "True" - CODE_EXECUTION_WRITE_TIMEOUT: "10" - CODE_GENERATION_MAX_TOKENS: "1024" - CODE_MAX_DEPTH: "5" - CODE_MAX_NUMBER: "9223372036854775807" - CODE_MAX_NUMBER_ARRAY_LENGTH: "1000" - CODE_MAX_OBJECT_ARRAY_LENGTH: "30" - CODE_MAX_PRECISION: "20" - CODE_MAX_STRING_ARRAY_LENGTH: "30" - CODE_MAX_STRING_LENGTH: "400000" - CODE_MIN_NUMBER: "-9223372036854775808" - CONSOLE_API_URL: "" - CONSOLE_API_URL_NEW: "" - CONSOLE_CORS_ALLOW_ORIGINS: '*' - CONSOLE_WEB_URL: "" - COOKIE_DOMAIN: "" - CORE_WORKFLOW_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository - CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository - COUCHBASE_BUCKET_NAME: Embeddings - COUCHBASE_CONNECTION_STRING: couchbase://couchbase-server - COUCHBASE_PASSWORD: password - COUCHBASE_SCOPE_NAME: _default - COUCHBASE_USER: Administrator - CREATE_TIDB_SERVICE_JOB_ENABLED: "false" - CSP_WHITELIST: "" - DATASET_MAX_SEGMENTS_PER_REQUEST: "0" - DB_DATABASE: dify_plugin - DB_HOST: db_postgres - DB_PASSWORD: difyai123456 - DB_PLUGIN_DATABASE: dify_plugin - DB_PORT: "5432" - DB_SSL_MODE: disable - DB_TYPE: postgresql - DB_USERNAME: postgres - DEBUG: "false" - DEPLOY_ENV: PRODUCTION - DIFY_BIND_ADDRESS: 0.0.0.0 - DIFY_INNER_API_KEY: QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 - DIFY_INNER_API_URL: http://api:5001 - DIFY_PORT: "5001" - DSL_EXPORT_ENCRYPT_DATASET_ID: "true" - ELASTICSEARCH_API_KEY: YOUR-ELASTICSEARCH_API_KEY - ELASTICSEARCH_CA_CERTS: "" - ELASTICSEARCH_CLOUD_URL: YOUR-ELASTICSEARCH_CLOUD_URL - ELASTICSEARCH_HOST: 0.0.0.0 - ELASTICSEARCH_MAX_RETRIES: "10" - ELASTICSEARCH_PASSWORD: elastic - ELASTICSEARCH_PORT: "9200" - ELASTICSEARCH_REQUEST_TIMEOUT: "100000" - ELASTICSEARCH_RETRY_ON_TIMEOUT: "True" - ELASTICSEARCH_USE_CLOUD: "false" - ELASTICSEARCH_USERNAME: elastic - ELASTICSEARCH_VERIFY_CERTS: "False" - EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES: "5" - ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK: "true" - ENABLE_CLEAN_EMBEDDING_CACHE_TASK: "false" - ENABLE_CLEAN_MESSAGES: "false" - ENABLE_CLEAN_UNUSED_DATASETS_TASK: "false" - ENABLE_COLLABORATION_MODE: "false" - ENABLE_CREATE_TIDB_SERVERLESS_TASK: "false" - ENABLE_DATASETS_QUEUE_MONITOR: "false" - ENABLE_HUMAN_INPUT_TIMEOUT_TASK: "true" - ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK: "false" - ENABLE_OTEL: "false" - ENABLE_REQUEST_LOGGING: "False" - ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK: "false" - ENABLE_WEBSITE_FIRECRAWL: "true" - ENABLE_WEBSITE_JINAREADER: "true" - ENABLE_WEBSITE_WATERCRAWL: "true" - ENABLE_WORKFLOW_RUN_CLEANUP_TASK: "false" - ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK: "true" - ENDPOINT_URL_TEMPLATE: http://localhost/e/{hook_id} - ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES: "true" - ETCD_AUTO_COMPACTION_MODE: revision - ETCD_AUTO_COMPACTION_RETENTION: "1000" - ETCD_ENDPOINTS: etcd:2379 - ETCD_QUOTA_BACKEND_BYTES: "4294967296" - ETCD_SNAPSHOT_COUNT: "50000" - ETL_TYPE: dify - EVENT_BUS_REDIS_CHANNEL_TYPE: pubsub - EVENT_BUS_REDIS_URL: "" - EVENT_BUS_REDIS_USE_CLUSTERS: "false" - EXPERIMENTAL_ENABLE_VINEXT: "false" - EXPOSE_NGINX_PORT: "80" - EXPOSE_NGINX_SSL_PORT: "443" - EXPOSE_PLUGIN_DAEMON_PORT: "5002" - EXPOSE_PLUGIN_DEBUGGING_HOST: localhost - EXPOSE_PLUGIN_DEBUGGING_PORT: "5003" - FILES_ACCESS_TIMEOUT: "300" - FILES_URL: "" - FLASK_DEBUG: "false" - FORCE_VERIFYING_SIGNATURE: "true" - GOOGLE_STORAGE_BUCKET_NAME: your-bucket-name - GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: "" - GRAPH_ENGINE_MAX_WORKERS: "10" - GRAPH_ENGINE_MIN_WORKERS: "1" - GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME: "5.0" - GRAPH_ENGINE_SCALE_UP_THRESHOLD: "3" - GUNICORN_TIMEOUT: "360" - HOLOGRES_ACCESS_KEY_ID: "" - HOLOGRES_ACCESS_KEY_SECRET: "" - HOLOGRES_BASE_QUANTIZATION_TYPE: rabitq - HOLOGRES_DATABASE: "" - HOLOGRES_DISTANCE_METHOD: Cosine - HOLOGRES_EF_CONSTRUCTION: "400" - HOLOGRES_HOST: "" - HOLOGRES_MAX_DEGREE: "64" - HOLOGRES_PORT: "80" - HOLOGRES_SCHEMA: public - HOLOGRES_TOKENIZER: jieba - HTTP_REQUEST_MAX_CONNECT_TIMEOUT: "10" - HTTP_REQUEST_MAX_READ_TIMEOUT: "600" - HTTP_REQUEST_MAX_WRITE_TIMEOUT: "600" - HTTP_REQUEST_NODE_MAX_BINARY_SIZE: "10485760" - HTTP_REQUEST_NODE_MAX_TEXT_SIZE: "1048576" - HTTP_REQUEST_NODE_SSL_VERIFY: "True" - HUAWEI_CLOUD_HOSTS: https://127.0.0.1:9200 - HUAWEI_CLOUD_PASSWORD: admin - HUAWEI_CLOUD_USER: admin - HUAWEI_OBS_ACCESS_KEY: your-access-key - HUAWEI_OBS_BUCKET_NAME: your-bucket-name - HUAWEI_OBS_PATH_STYLE: "false" - HUAWEI_OBS_SECRET_KEY: your-secret-key - HUAWEI_OBS_SERVER: your-server-url - HUMAN_INPUT_TIMEOUT_TASK_INTERVAL: "1" - IMAGE_FILE_BATCH_LIMIT: "10" - INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: "4000" - INIT_PASSWORD: "" - INTERNAL_FILES_URL: "" - INVITE_EXPIRY_HOURS: "72" - IRIS_CONNECTION_URL: "" - IRIS_DATABASE: USER - IRIS_HOST: iris - IRIS_MAX_CONNECTION: "3" - IRIS_MIN_CONNECTION: "1" - IRIS_PASSWORD: Dify@1234 - IRIS_SCHEMA: dify - IRIS_SUPER_SERVER_PORT: "1972" - IRIS_TEXT_INDEX: "true" - IRIS_TEXT_INDEX_LANGUAGE: en - IRIS_TIMEZONE: UTC - IRIS_USER: _SYSTEM - IRIS_WEB_SERVER_PORT: "52773" - KIBANA_PORT: "5601" - LANG: C.UTF-8 - LC_ALL: C.UTF-8 - LINDORM_PASSWORD: admin - LINDORM_QUERY_TIMEOUT: "1" - LINDORM_URL: http://localhost:30070 - LINDORM_USERNAME: admin - LINDORM_USING_UGC: "True" - LOG_DATEFORMAT: '%Y-%m-%d %H:%M:%S' - LOG_FILE: /app/logs/server.log - LOG_FILE_BACKUP_COUNT: "5" - LOG_FILE_MAX_SIZE: "20" - LOG_LEVEL: INFO - LOG_OUTPUT_FORMAT: text - LOG_TZ: UTC - LOGSTORE_DUAL_READ_ENABLED: "true" - LOGSTORE_DUAL_WRITE_ENABLED: "false" - LOGSTORE_ENABLE_PUT_GRAPH_FIELD: "true" - LOOP_NODE_MAX_COUNT: "100" - MAIL_DEFAULT_SEND_FROM: "" - MAIL_TYPE: resend - MARKETPLACE_API_URL: https://marketplace.dify.ai - MARKETPLACE_ENABLED: "true" - MATRIXONE_DATABASE: dify - MATRIXONE_HOST: matrixone - MATRIXONE_PASSWORD: "111" - MATRIXONE_PORT: "6001" - MATRIXONE_USER: dump - MAX_ITERATIONS_NUM: "99" - MAX_PARALLEL_LIMIT: "10" - MAX_PLUGIN_PACKAGE_SIZE: "52428800" - MAX_SUBMIT_COUNT: "100" - MAX_TOOLS_NUM: "10" - MAX_TREE_DEPTH: "50" - MAX_VARIABLE_SIZE: "204800" - MIGRATION_ENABLED: "true" - MILVUS_ANALYZER_PARAMS: "" - MILVUS_AUTHORIZATION_ENABLED: "true" - MILVUS_DATABASE: "" - MILVUS_ENABLE_HYBRID_SEARCH: "False" - MILVUS_PASSWORD: "" - MILVUS_TOKEN: "" - MILVUS_URI: http://host.docker.internal:19530 - MILVUS_USER: "" - MINIO_ACCESS_KEY: minioadmin - MINIO_ADDRESS: minio:9000 - MINIO_SECRET_KEY: minioadmin - MULTIMODAL_SEND_FORMAT: base64 - MYSCALE_DATABASE: dify - MYSCALE_FTS_PARAMS: "" - MYSCALE_HOST: myscale - MYSCALE_PASSWORD: "" - MYSCALE_PORT: "8123" - MYSCALE_USER: default - MYSQL_HOST_VOLUME: ./volumes/mysql/data - MYSQL_INNODB_BUFFER_POOL_SIZE: 512M - MYSQL_INNODB_FLUSH_LOG_AT_TRX_COMMIT: "2" - MYSQL_INNODB_LOG_FILE_SIZE: 128M - MYSQL_MAX_CONNECTIONS: "1000" - NEXT_PUBLIC_BATCH_CONCURRENCY: "5" - NEXT_PUBLIC_COOKIE_DOMAIN: "" - NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX: "false" - NEXT_PUBLIC_SOCKET_URL: ws://localhost - NGINX_CLIENT_MAX_BODY_SIZE: 100M - NGINX_ENABLE_CERTBOT_CHALLENGE: "false" - NGINX_HTTPS_ENABLED: "false" - NGINX_KEEPALIVE_TIMEOUT: "65" - NGINX_PORT: "80" - NGINX_PROXY_READ_TIMEOUT: 3600s - NGINX_PROXY_SEND_TIMEOUT: 3600s - NGINX_SERVER_NAME: _ - NGINX_SSL_CERT_FILENAME: dify.crt - NGINX_SSL_CERT_KEY_FILENAME: dify.key - NGINX_SSL_PORT: "443" - NGINX_SSL_PROTOCOLS: TLSv1.2 TLSv1.3 - NGINX_WORKER_PROCESSES: auto - NOTION_CLIENT_ID: "" - NOTION_CLIENT_SECRET: "" - NOTION_INTEGRATION_TYPE: public - NOTION_INTERNAL_SECRET: "" - OCEANBASE_CLUSTER_NAME: difyai - OCEANBASE_ENABLE_HYBRID_SEARCH: "false" - OCEANBASE_FULLTEXT_PARSER: ik - OCEANBASE_MEMORY_LIMIT: 6G - OCEANBASE_VECTOR_DATABASE: test - OCEANBASE_VECTOR_HOST: oceanbase - OCEANBASE_VECTOR_PASSWORD: difyai123456 - OCEANBASE_VECTOR_PORT: "2881" - OCEANBASE_VECTOR_USER: root@test - OCI_ACCESS_KEY: your-access-key - OCI_BUCKET_NAME: your-bucket-name - OCI_ENDPOINT: https://your-object-storage-namespace.compat.objectstorage.us-ashburn-1.oraclecloud.com - OCI_REGION: us-ashburn-1 - OCI_SECRET_KEY: your-secret-key - OPENAI_API_BASE: https://api.openai.com/v1 - OPENDAL_FS_ROOT: storage - OPENDAL_SCHEME: fs - OPENGAUSS_DATABASE: dify - OPENGAUSS_ENABLE_PQ: "false" - OPENGAUSS_HOST: opengauss - OPENGAUSS_MAX_CONNECTION: "5" - OPENGAUSS_MIN_CONNECTION: "1" - OPENGAUSS_PASSWORD: Dify@123 - OPENGAUSS_PORT: "6600" - OPENGAUSS_USER: postgres - OPENSEARCH_AUTH_METHOD: basic - OPENSEARCH_AWS_REGION: ap-southeast-1 - OPENSEARCH_AWS_SERVICE: aoss - OPENSEARCH_BOOTSTRAP_MEMORY_LOCK: "true" - OPENSEARCH_DISCOVERY_TYPE: single-node - OPENSEARCH_HOST: opensearch - OPENSEARCH_INITIAL_ADMIN_PASSWORD: Qazwsxedc!@#123 - OPENSEARCH_JAVA_OPTS_MAX: 1024m - OPENSEARCH_JAVA_OPTS_MIN: 512m - OPENSEARCH_MEMLOCK_HARD: "-1" - OPENSEARCH_MEMLOCK_SOFT: "-1" - OPENSEARCH_NOFILE_HARD: "65536" - OPENSEARCH_NOFILE_SOFT: "65536" - OPENSEARCH_PASSWORD: admin - OPENSEARCH_PORT: "9200" - OPENSEARCH_SECURE: "true" - OPENSEARCH_USER: admin - OPENSEARCH_VERIFY_CERTS: "true" - ORACLE_CHARACTERSET: AL32UTF8 - ORACLE_CONFIG_DIR: /app/api/storage/wallet - ORACLE_DSN: oracle:1521/FREEPDB1 - ORACLE_IS_AUTONOMOUS: "false" - ORACLE_PASSWORD: dify - ORACLE_PWD: Dify123456 - ORACLE_USER: dify - ORACLE_WALLET_LOCATION: /app/api/storage/wallet - ORACLE_WALLET_PASSWORD: dify - OTEL_BATCH_EXPORT_SCHEDULE_DELAY: "5000" - OTEL_BATCH_EXPORT_TIMEOUT: "10000" - OTEL_EXPORTER_OTLP_PROTOCOL: "" - OTEL_EXPORTER_TYPE: otlp - OTEL_MAX_EXPORT_BATCH_SIZE: "512" - OTEL_MAX_QUEUE_SIZE: "2048" - OTEL_METRIC_EXPORT_INTERVAL: "60000" - OTEL_METRIC_EXPORT_TIMEOUT: "30000" - OTEL_SAMPLING_RATE: "0.1" - OTLP_API_KEY: "" - OTLP_BASE_ENDPOINT: http://localhost:4318 - OTLP_METRIC_ENDPOINT: "" - OTLP_TRACE_ENDPOINT: "" - OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES: "5" - PGDATA: /var/lib/postgresql/data/pgdata - PGVECTO_RS_DATABASE: dify - PGVECTO_RS_HOST: pgvecto-rs - PGVECTO_RS_PASSWORD: difyai123456 - PGVECTO_RS_PORT: "5432" - PGVECTO_RS_USER: postgres - PGVECTOR_DATABASE: dify - PGVECTOR_HOST: pgvector - PGVECTOR_MAX_CONNECTION: "5" - PGVECTOR_MIN_CONNECTION: "1" - PGVECTOR_PASSWORD: difyai123456 - PGVECTOR_PG_BIGM: "false" - PGVECTOR_PG_BIGM_VERSION: 1.2-20240606 - PGVECTOR_PGDATA: /var/lib/postgresql/data/pgdata - PGVECTOR_PGUSER: postgres - PGVECTOR_PORT: "5432" - PGVECTOR_POSTGRES_DB: dify - PGVECTOR_POSTGRES_PASSWORD: difyai123456 - PGVECTOR_USER: postgres - PIP_MIRROR_URL: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_ID: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_SECRET: "" - PLUGIN_ALIYUN_OSS_AUTH_VERSION: v4 - PLUGIN_ALIYUN_OSS_ENDPOINT: "" - PLUGIN_ALIYUN_OSS_PATH: "" - PLUGIN_ALIYUN_OSS_REGION: "" - PLUGIN_AWS_ACCESS_KEY: "" - PLUGIN_AWS_REGION: "" - PLUGIN_AWS_SECRET_KEY: "" - PLUGIN_AZURE_BLOB_STORAGE_CONNECTION_STRING: "" - PLUGIN_AZURE_BLOB_STORAGE_CONTAINER_NAME: "" - PLUGIN_BASED_TOKEN_COUNTING_ENABLED: "false" - PLUGIN_DAEMON_KEY: lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi - PLUGIN_DAEMON_PORT: "5002" - PLUGIN_DAEMON_TIMEOUT: "600.0" - PLUGIN_DAEMON_URL: http://plugin_daemon:5002 - PLUGIN_DEBUGGING_HOST: 0.0.0.0 - PLUGIN_DEBUGGING_PORT: "5003" - PLUGIN_DIFY_INNER_API_KEY: QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 - PLUGIN_DIFY_INNER_API_URL: http://api:5001 - PLUGIN_INSTALLED_PATH: plugin - PLUGIN_MAX_EXECUTION_TIMEOUT: "600" - PLUGIN_MAX_PACKAGE_SIZE: "52428800" - PLUGIN_MEDIA_CACHE_PATH: assets - PLUGIN_MODEL_SCHEMA_CACHE_TTL: "3600" - PLUGIN_PACKAGE_CACHE_PATH: plugin_packages - PLUGIN_PPROF_ENABLED: "false" - PLUGIN_PYTHON_ENV_INIT_TIMEOUT: "120" - PLUGIN_REMOTE_INSTALLING_HOST: 0.0.0.0 - PLUGIN_REMOTE_INSTALLING_PORT: "5003" - PLUGIN_S3_ENDPOINT: "" - PLUGIN_S3_USE_AWS: "false" - PLUGIN_S3_USE_AWS_MANAGED_IAM: "false" - PLUGIN_S3_USE_PATH_STYLE: "false" - PLUGIN_SENTRY_DSN: "" - PLUGIN_SENTRY_ENABLED: "false" - PLUGIN_STDIO_BUFFER_SIZE: "1024" - PLUGIN_STDIO_MAX_BUFFER_SIZE: "5242880" - PLUGIN_STORAGE_LOCAL_ROOT: /app/storage - PLUGIN_STORAGE_OSS_BUCKET: "" - PLUGIN_STORAGE_TYPE: local - PLUGIN_TENCENT_COS_REGION: "" - PLUGIN_TENCENT_COS_SECRET_ID: "" - PLUGIN_TENCENT_COS_SECRET_KEY: "" - PLUGIN_VOLCENGINE_TOS_ACCESS_KEY: "" - PLUGIN_VOLCENGINE_TOS_ENDPOINT: "" - PLUGIN_VOLCENGINE_TOS_REGION: "" - PLUGIN_VOLCENGINE_TOS_SECRET_KEY: "" - PLUGIN_WORKING_PATH: /app/storage/cwd - POSITION_PROVIDER_EXCLUDES: "" - POSITION_PROVIDER_INCLUDES: "" - POSITION_PROVIDER_PINS: "" - POSITION_TOOL_EXCLUDES: "" - POSITION_TOOL_INCLUDES: "" - POSITION_TOOL_PINS: "" - POSTGRES_EFFECTIVE_CACHE_SIZE: 4096MB - POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT: "0" - POSTGRES_MAINTENANCE_WORK_MEM: 64MB - POSTGRES_MAX_CONNECTIONS: "100" - POSTGRES_SHARED_BUFFERS: 128MB - POSTGRES_STATEMENT_TIMEOUT: "0" - POSTGRES_WORK_MEM: 4MB - PPROF_ENABLED: "false" - PROMPT_GENERATION_MAX_TOKENS: "512" - PYTHON_ENV_INIT_TIMEOUT: "120" - PYTHONIOENCODING: utf-8 - QDRANT_API_KEY: difyai123456 - QDRANT_CLIENT_TIMEOUT: "20" - QDRANT_GRPC_ENABLED: "false" - QDRANT_GRPC_PORT: "6334" - QDRANT_REPLICATION_FACTOR: "1" - QDRANT_URL: http://qdrant:6333 - QUEUE_MONITOR_ALERT_EMAILS: "" - QUEUE_MONITOR_INTERVAL: "30" - QUEUE_MONITOR_THRESHOLD: "200" - REDIS_CLUSTERS: "" - REDIS_CLUSTERS_PASSWORD: "" - REDIS_DB: "0" - REDIS_HEALTH_CHECK_INTERVAL: "30" - REDIS_HOST: redis - REDIS_KEY_PREFIX: "" - REDIS_MAX_CONNECTIONS: "" - REDIS_PASSWORD: difyai123456 - REDIS_PORT: "6379" - REDIS_RETRY_BACKOFF_BASE: "1.0" - REDIS_RETRY_BACKOFF_CAP: "10.0" - REDIS_RETRY_RETRIES: "3" - REDIS_SENTINEL_PASSWORD: "" - REDIS_SENTINEL_SERVICE_NAME: "" - REDIS_SENTINEL_SOCKET_TIMEOUT: "0.1" - REDIS_SENTINEL_USERNAME: "" - REDIS_SENTINELS: "" - REDIS_SOCKET_CONNECT_TIMEOUT: "5.0" - REDIS_SOCKET_TIMEOUT: "5.0" - REDIS_SSL_CA_CERTS: "" - REDIS_SSL_CERT_REQS: CERT_NONE - REDIS_SSL_CERTFILE: "" - REDIS_SSL_KEYFILE: "" - REDIS_USE_CLUSTERS: "false" - REDIS_USE_SENTINEL: "false" - REDIS_USE_SSL: "false" - REDIS_USERNAME: "" - REFRESH_TOKEN_EXPIRE_DAYS: "30" - RELYT_DATABASE: postgres - RELYT_HOST: db - RELYT_PASSWORD: difyai123456 - RELYT_PORT: "5432" - RELYT_USER: postgres - RESEND_API_KEY: your-resend-api-key - RESEND_API_URL: https://api.resend.com - RESET_PASSWORD_TOKEN_EXPIRY_MINUTES: "5" - RESPECT_XFORWARD_HEADERS_ENABLED: "false" - S3_ACCESS_KEY: "" - S3_ADDRESS_STYLE: auto - S3_BUCKET_NAME: difyai - S3_ENDPOINT: "" - S3_REGION: us-east-1 - S3_SECRET_KEY: "" - S3_USE_AWS: "false" - S3_USE_AWS_MANAGED_IAM: "false" - S3_USE_PATH_STYLE: "false" - SANDBOX_API_KEY: dify-sandbox - SANDBOX_ENABLE_NETWORK: "true" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL: "200" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: "1000" - SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD: "21" - SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL: "90000" - SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: "30" - SANDBOX_GIN_MODE: release - SANDBOX_HTTP_PROXY: http://ssrf_proxy:3128 - SANDBOX_HTTPS_PROXY: http://ssrf_proxy:3128 - SANDBOX_PORT: "8194" - SANDBOX_WORKER_TIMEOUT: "15" - SCARF_NO_ANALYTICS: "true" - SECRET_KEY: sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U - SEEKDB_MEMORY_LIMIT: 2G - SENDGRID_API_KEY: "" - SENTRY_DSN: "" - SENTRY_ENABLED: "false" - SERVER_KEY: lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi - SERVER_PORT: "5002" - SERVER_WORKER_AMOUNT: "1" - SERVER_WORKER_CLASS: gevent - SERVER_WORKER_CONNECTIONS: "10" - SERVICE_API_URL: "" - SINGLE_CHUNK_ATTACHMENT_LIMIT: "10" - SMTP_LOCAL_HOSTNAME: "" - SMTP_OPPORTUNISTIC_TLS: "false" - SMTP_PASSWORD: "" - SMTP_PORT: "465" - SMTP_SERVER: "" - SMTP_USE_TLS: "true" - SMTP_USERNAME: "" - SQLALCHEMY_ECHO: "false" - SQLALCHEMY_MAX_OVERFLOW: "10" - SQLALCHEMY_POOL_PRE_PING: "false" - SQLALCHEMY_POOL_RECYCLE: "3600" - SQLALCHEMY_POOL_SIZE: "30" - SQLALCHEMY_POOL_TIMEOUT: "30" - SQLALCHEMY_POOL_USE_LIFO: "false" - SSRF_COREDUMP_DIR: /var/spool/squid - SSRF_DEFAULT_CONNECT_TIME_OUT: "5" - SSRF_DEFAULT_READ_TIME_OUT: "5" - SSRF_DEFAULT_TIME_OUT: "5" - SSRF_DEFAULT_WRITE_TIME_OUT: "5" - SSRF_HTTP_PORT: "3128" - SSRF_POOL_KEEPALIVE_EXPIRY: "5.0" - SSRF_POOL_MAX_CONNECTIONS: "100" - SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - SSRF_PROXY_HTTP_URL: http://ssrf_proxy:3128 - SSRF_PROXY_HTTPS_URL: http://ssrf_proxy:3128 - SSRF_REVERSE_PROXY_PORT: "8194" - SSRF_SANDBOX_HOST: sandbox - STORAGE_TYPE: opendal - SUPABASE_API_KEY: your-access-key - SUPABASE_BUCKET_NAME: your-bucket-name - SUPABASE_URL: your-server-url - SWAGGER_UI_ENABLED: "false" - SWAGGER_UI_PATH: /swagger-ui.html - TABLESTORE_ACCESS_KEY_ID: xxx - TABLESTORE_ACCESS_KEY_SECRET: xxx - TABLESTORE_ENDPOINT: https://instance-name.cn-hangzhou.ots.aliyuncs.com - TABLESTORE_INSTANCE_NAME: instance-name - TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE: "false" - TEMPLATE_TRANSFORM_MAX_LENGTH: "400000" - TENANT_ISOLATED_TASK_CONCURRENCY: "1" - TENCENT_COS_BUCKET_NAME: your-bucket-name - TENCENT_COS_CUSTOM_DOMAIN: your-custom-domain - TENCENT_COS_REGION: "" - TENCENT_COS_SCHEME: your-scheme - TENCENT_COS_SECRET_ID: "" - TENCENT_COS_SECRET_KEY: "" - TENCENT_VECTOR_DB_API_KEY: dify - TENCENT_VECTOR_DB_DATABASE: dify - TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH: "false" - TENCENT_VECTOR_DB_REPLICAS: "2" - TENCENT_VECTOR_DB_SHARD: "1" - TENCENT_VECTOR_DB_TIMEOUT: "30" - TENCENT_VECTOR_DB_URL: http://127.0.0.1 - TENCENT_VECTOR_DB_USERNAME: dify - TEXT_GENERATION_TIMEOUT_MS: "60000" - TIDB_API_URL: http://127.0.0.1 - TIDB_IAM_API_URL: http://127.0.0.1 - TIDB_ON_QDRANT_API_KEY: dify - TIDB_ON_QDRANT_CLIENT_TIMEOUT: "20" - TIDB_ON_QDRANT_GRPC_ENABLED: "false" - TIDB_ON_QDRANT_GRPC_PORT: "6334" - TIDB_ON_QDRANT_URL: http://127.0.0.1 - TIDB_PRIVATE_KEY: dify - TIDB_PROJECT_ID: dify - TIDB_PUBLIC_KEY: dify - TIDB_REGION: regions/aws-us-east-1 - TIDB_SPEND_LIMIT: "100" - TIDB_VECTOR_DATABASE: dify - TIDB_VECTOR_HOST: tidb - TIDB_VECTOR_PASSWORD: "" - TIDB_VECTOR_PORT: "4000" - TIDB_VECTOR_USER: "" - TOP_K_MAX_VALUE: "10" - TRIGGER_URL: http://localhost - UNSTRUCTURED_API_KEY: "" - UNSTRUCTURED_API_URL: "" - UPLOAD_AUDIO_FILE_SIZE_LIMIT: "50" - UPLOAD_FILE_BATCH_LIMIT: "5" - UPLOAD_FILE_EXTENSION_BLACKLIST: "" - UPLOAD_FILE_SIZE_LIMIT: "15" - UPLOAD_IMAGE_FILE_SIZE_LIMIT: "10" - UPLOAD_VIDEO_FILE_SIZE_LIMIT: "100" - UPSTASH_VECTOR_TOKEN: dify - UPSTASH_VECTOR_URL: https://xxx-vector.upstash.io - UV_CACHE_DIR: /tmp/.uv-cache - VASTBASE_DATABASE: dify - VASTBASE_HOST: vastbase - VASTBASE_MAX_CONNECTION: "5" - VASTBASE_MIN_CONNECTION: "1" - VASTBASE_PASSWORD: Difyai123456 - VASTBASE_PORT: "5432" - VASTBASE_USER: dify - VECTOR_INDEX_NAME_PREFIX: Vector_index - VECTOR_STORE: weaviate - VIKINGDB_ACCESS_KEY: your-ak - VIKINGDB_CONNECTION_TIMEOUT: "30" - VIKINGDB_HOST: api-vikingdb.xxx.volces.com - VIKINGDB_REGION: cn-shanghai - VIKINGDB_SCHEMA: http - VIKINGDB_SECRET_KEY: your-sk - VIKINGDB_SOCKET_TIMEOUT: "30" - VOLCENGINE_TOS_ACCESS_KEY: "" - VOLCENGINE_TOS_BUCKET_NAME: your-bucket-name - VOLCENGINE_TOS_ENDPOINT: "" - VOLCENGINE_TOS_REGION: "" - VOLCENGINE_TOS_SECRET_KEY: "" - WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_APIKEY_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_USERS: hello@dify.ai - WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED: "true" - WEAVIATE_AUTHORIZATION_ADMINLIST_USERS: hello@dify.ai - WEAVIATE_CLUSTER_HOSTNAME: node1 - WEAVIATE_DEFAULT_VECTORIZER_MODULE: none - WEAVIATE_DISABLE_TELEMETRY: "false" - WEAVIATE_ENABLE_TOKENIZER_GSE: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR: "false" - WEAVIATE_ENDPOINT: http://weaviate:8080 - WEAVIATE_GRPC_ENDPOINT: grpc://weaviate:50051 - WEAVIATE_PERSISTENCE_DATA_PATH: /var/lib/weaviate - WEAVIATE_QUERY_DEFAULTS_LIMIT: "25" - WEAVIATE_TOKENIZATION: word - WEB_API_CORS_ALLOW_ORIGINS: '*' - WEB_SENTRY_DSN: "" - WEBHOOK_REQUEST_BODY_MAX_SIZE: "10485760" - WORKFLOW_CALL_MAX_DEPTH: "5" - WORKFLOW_FILE_UPLOAD_LIMIT: "10" - WORKFLOW_LOG_CLEANUP_BATCH_SIZE: "100" - WORKFLOW_LOG_CLEANUP_ENABLED: "false" - WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS: "" - WORKFLOW_LOG_RETENTION_DAYS: "30" - WORKFLOW_MAX_EXECUTION_STEPS: "500" - WORKFLOW_MAX_EXECUTION_TIME: "1200" - WORKFLOW_NODE_EXECUTION_STORAGE: rdbms - WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK: "0" - WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE: "100" - WORKFLOW_SCHEDULE_POLLER_INTERVAL: "1" - image: langgenius/dify-plugin-daemon:0.5.3-local - networks: - default: null - ports: - - mode: ingress - target: 5003 - published: "5003" - protocol: tcp - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/plugin_daemon - target: /app/storage - bind: {} - redis: - command: - - redis-server - - --requirepass - - difyai123456 - environment: - REDISCLI_AUTH: difyai123456 - healthcheck: - test: - - CMD-SHELL - - redis-cli -a difyai123456 ping | grep -q PONG - image: redis:6-alpine - networks: - default: null - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/redis/data - target: /data - bind: {} - sandbox: - environment: - API_KEY: dify-sandbox - ENABLE_NETWORK: "true" - GIN_MODE: release - HTTP_PROXY: http://ssrf_proxy:3128 - HTTPS_PROXY: http://ssrf_proxy:3128 - PIP_MIRROR_URL: "" - SANDBOX_PORT: "8194" - WORKER_TIMEOUT: "15" - healthcheck: - test: - - CMD - - curl - - -f - - http://localhost:8194/health - image: langgenius/dify-sandbox:0.2.14 - networks: - ssrf_proxy_network: null - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/sandbox/dependencies - target: /dependencies - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/sandbox/conf - target: /conf - bind: {} - ssrf_proxy: - entrypoint: - - sh - - -c - - "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\r$$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" - environment: - COREDUMP_DIR: /var/spool/squid - HTTP_PORT: "3128" - REVERSE_PROXY_PORT: "8194" - SANDBOX_HOST: sandbox - SANDBOX_PORT: "8194" - image: ubuntu/squid:latest - networks: - default: null - ssrf_proxy_network: null - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/ssrf_proxy/squid.conf.template - target: /etc/squid/squid.conf.template - bind: {} - - type: bind - source: /Users/zhaohao/Dify/dify/docker/ssrf_proxy/docker-entrypoint.sh - target: /docker-entrypoint-mount.sh - bind: {} - weaviate: - profiles: - - weaviate - environment: - AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true" - AUTHENTICATION_APIKEY_ALLOWED_KEYS: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - AUTHENTICATION_APIKEY_ENABLED: "true" - AUTHENTICATION_APIKEY_USERS: hello@dify.ai - AUTHORIZATION_ADMINLIST_ENABLED: "true" - AUTHORIZATION_ADMINLIST_USERS: hello@dify.ai - CLUSTER_HOSTNAME: node1 - DEFAULT_VECTORIZER_MODULE: none - DISABLE_TELEMETRY: "false" - ENABLE_TOKENIZER_GSE: "false" - ENABLE_TOKENIZER_KAGOME_JA: "false" - ENABLE_TOKENIZER_KAGOME_KR: "false" - PERSISTENCE_DATA_PATH: /var/lib/weaviate - QUERY_DEFAULTS_LIMIT: "25" - image: semitechnologies/weaviate:1.27.0 - networks: - default: null - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/weaviate - target: /var/lib/weaviate - bind: {} - web: - environment: - ALLOW_EMBED: "false" - ALLOW_INLINE_STYLES: "false" - ALLOW_UNSAFE_DATA_SCHEME: "false" - AMPLITUDE_API_KEY: "" - APP_API_URL: "" - CONSOLE_API_URL: "" - CSP_WHITELIST: "" - ENABLE_WEBSITE_FIRECRAWL: "true" - ENABLE_WEBSITE_JINAREADER: "true" - ENABLE_WEBSITE_WATERCRAWL: "true" - EXPERIMENTAL_ENABLE_VINEXT: "false" - INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: "4000" - LOOP_NODE_MAX_COUNT: "100" - MARKETPLACE_API_URL: https://marketplace.dify.ai - MARKETPLACE_URL: https://marketplace.dify.ai - MAX_ITERATIONS_NUM: "99" - MAX_PARALLEL_LIMIT: "10" - MAX_TOOLS_NUM: "10" - MAX_TREE_DEPTH: "50" - NEXT_PUBLIC_COOKIE_DOMAIN: "" - NEXT_PUBLIC_SOCKET_URL: ws://localhost - NEXT_TELEMETRY_DISABLED: "0" - SENTRY_DSN: "" - TEXT_GENERATION_TIMEOUT_MS: "60000" - TOP_K_MAX_VALUE: "10" - image: langgenius/dify-web:1.13.3 - networks: - default: null - restart: always - worker: - depends_on: - db_mysql: - condition: service_healthy - required: false - db_postgres: - condition: service_healthy - required: false - init_permissions: - condition: service_completed_successfully - required: true - oceanbase: - condition: service_healthy - required: false - redis: - condition: service_started - required: true - seekdb: - condition: service_healthy - required: false - environment: - ACCESS_TOKEN_EXPIRE_MINUTES: "600" - ALIBABACLOUD_MYSQL_DATABASE: dify - ALIBABACLOUD_MYSQL_HNSW_M: "6" - ALIBABACLOUD_MYSQL_HOST: 127.0.0.1 - ALIBABACLOUD_MYSQL_MAX_CONNECTION: "5" - ALIBABACLOUD_MYSQL_PASSWORD: difyai123456 - ALIBABACLOUD_MYSQL_PORT: "3306" - ALIBABACLOUD_MYSQL_USER: root - ALIYUN_OSS_ACCESS_KEY: your-access-key - ALIYUN_OSS_AUTH_VERSION: v4 - ALIYUN_OSS_BUCKET_NAME: your-bucket-name - ALIYUN_OSS_ENDPOINT: https://oss-ap-southeast-1-internal.aliyuncs.com - ALIYUN_OSS_PATH: your-path - ALIYUN_OSS_REGION: ap-southeast-1 - ALIYUN_OSS_SECRET_KEY: your-secret-key - ALIYUN_SLS_ACCESS_KEY_ID: "" - ALIYUN_SLS_ACCESS_KEY_SECRET: "" - ALIYUN_SLS_ENDPOINT: "" - ALIYUN_SLS_LOGSTORE_TTL: "365" - ALIYUN_SLS_PROJECT_NAME: "" - ALIYUN_SLS_REGION: "" - ALLOW_EMBED: "false" - ALLOW_INLINE_STYLES: "false" - ALLOW_UNSAFE_DATA_SCHEME: "false" - AMPLITUDE_API_KEY: "" - ANALYTICDB_ACCOUNT: testaccount - ANALYTICDB_HOST: gp-test.aliyuncs.com - ANALYTICDB_INSTANCE_ID: gp-ab123456 - ANALYTICDB_KEY_ID: your-ak - ANALYTICDB_KEY_SECRET: your-sk - ANALYTICDB_MAX_CONNECTION: "5" - ANALYTICDB_MIN_CONNECTION: "1" - ANALYTICDB_NAMESPACE: dify - ANALYTICDB_NAMESPACE_PASSWORD: difypassword - ANALYTICDB_PASSWORD: testpassword - ANALYTICDB_PORT: "5432" - ANALYTICDB_REGION_ID: cn-hangzhou - ANNOTATION_IMPORT_FILE_SIZE_LIMIT: "2" - ANNOTATION_IMPORT_MAX_CONCURRENT: "5" - ANNOTATION_IMPORT_MAX_RECORDS: "10000" - ANNOTATION_IMPORT_MIN_RECORDS: "1" - ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR: "20" - ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE: "5" - API_SENTRY_DSN: "" - API_SENTRY_PROFILES_SAMPLE_RATE: "1.0" - API_SENTRY_TRACES_SAMPLE_RATE: "1.0" - API_TOOL_DEFAULT_CONNECT_TIMEOUT: "10" - API_TOOL_DEFAULT_READ_TIMEOUT: "60" - API_WORKFLOW_NODE_EXECUTION_REPOSITORY: repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository - API_WORKFLOW_RUN_REPOSITORY: repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository - APP_API_URL: "" - APP_DEFAULT_ACTIVE_REQUESTS: "0" - APP_MAX_ACTIVE_REQUESTS: "0" - APP_MAX_EXECUTION_TIME: "1200" - APP_WEB_URL: "" - ARCHIVE_STORAGE_ACCESS_KEY: "" - ARCHIVE_STORAGE_ARCHIVE_BUCKET: "" - ARCHIVE_STORAGE_ENABLED: "false" - ARCHIVE_STORAGE_ENDPOINT: "" - ARCHIVE_STORAGE_EXPORT_BUCKET: "" - ARCHIVE_STORAGE_REGION: auto - ARCHIVE_STORAGE_SECRET_KEY: "" - ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT: "60" - ATTACHMENT_IMAGE_FILE_SIZE_LIMIT: "2" - AZURE_BLOB_ACCOUNT_KEY: difyai - AZURE_BLOB_ACCOUNT_NAME: difyai - AZURE_BLOB_ACCOUNT_URL: https://.blob.core.windows.net - AZURE_BLOB_CONTAINER_NAME: difyai-container - BAIDU_OBS_ACCESS_KEY: your-access-key - BAIDU_OBS_BUCKET_NAME: your-bucket-name - BAIDU_OBS_ENDPOINT: your-server-url - BAIDU_OBS_SECRET_KEY: your-secret-key - BAIDU_VECTOR_DB_ACCOUNT: root - BAIDU_VECTOR_DB_API_KEY: dify - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT: "500" - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO: "0.05" - BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS: "30000" - BAIDU_VECTOR_DB_DATABASE: dify - BAIDU_VECTOR_DB_ENDPOINT: http://127.0.0.1:5287 - BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER: DEFAULT_ANALYZER - BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE: COARSE_MODE - BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS: "300" - BAIDU_VECTOR_DB_REPLICAS: "3" - BAIDU_VECTOR_DB_SHARD: "1" - BROKER_USE_SSL: "false" - CELERY_AUTO_SCALE: "false" - CELERY_BACKEND: redis - CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1 - CELERY_MAX_WORKERS: "" - CELERY_MIN_WORKERS: "" - CELERY_SENTINEL_MASTER_NAME: "" - CELERY_SENTINEL_PASSWORD: "" - CELERY_SENTINEL_SOCKET_TIMEOUT: "0.1" - CELERY_TASK_ANNOTATIONS: "null" - CELERY_USE_SENTINEL: "false" - CELERY_WORKER_AMOUNT: "4" - CELERY_WORKER_CLASS: "" - CERTBOT_DOMAIN: your_domain.com - CERTBOT_EMAIL: your_email@example.com - CERTBOT_OPTIONS: "" - CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES: "5" - CHECK_UPDATE_URL: https://updates.dify.ai - CHROMA_AUTH_CREDENTIALS: "" - CHROMA_AUTH_PROVIDER: chromadb.auth.token_authn.TokenAuthClientProvider - CHROMA_DATABASE: default_database - CHROMA_HOST: 127.0.0.1 - CHROMA_IS_PERSISTENT: "TRUE" - CHROMA_PORT: "8000" - CHROMA_SERVER_AUTHN_CREDENTIALS: difyai123456 - CHROMA_SERVER_AUTHN_PROVIDER: chromadb.auth.token_authn.TokenAuthenticationServerProvider - CHROMA_TENANT: default_tenant - CLICKZETTA_ANALYZER_MODE: smart - CLICKZETTA_ANALYZER_TYPE: chinese - CLICKZETTA_BATCH_SIZE: "100" - CLICKZETTA_ENABLE_INVERTED_INDEX: "true" - CLICKZETTA_INSTANCE: "" - CLICKZETTA_PASSWORD: "" - CLICKZETTA_SCHEMA: dify - CLICKZETTA_SERVICE: api.clickzetta.com - CLICKZETTA_USERNAME: "" - CLICKZETTA_VCLUSTER: default_ap - CLICKZETTA_VECTOR_DISTANCE_FUNCTION: cosine_distance - CLICKZETTA_VOLUME_DIFY_PREFIX: dify_km - CLICKZETTA_VOLUME_NAME: "" - CLICKZETTA_VOLUME_TABLE_PREFIX: dataset_ - CLICKZETTA_VOLUME_TYPE: user - CLICKZETTA_WORKSPACE: quick_start - CODE_EXECUTION_API_KEY: dify-sandbox - CODE_EXECUTION_CONNECT_TIMEOUT: "10" - CODE_EXECUTION_ENDPOINT: http://sandbox:8194 - CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY: "5.0" - CODE_EXECUTION_POOL_MAX_CONNECTIONS: "100" - CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - CODE_EXECUTION_READ_TIMEOUT: "60" - CODE_EXECUTION_SSL_VERIFY: "True" - CODE_EXECUTION_WRITE_TIMEOUT: "10" - CODE_GENERATION_MAX_TOKENS: "1024" - CODE_MAX_DEPTH: "5" - CODE_MAX_NUMBER: "9223372036854775807" - CODE_MAX_NUMBER_ARRAY_LENGTH: "1000" - CODE_MAX_OBJECT_ARRAY_LENGTH: "30" - CODE_MAX_PRECISION: "20" - CODE_MAX_STRING_ARRAY_LENGTH: "30" - CODE_MAX_STRING_LENGTH: "400000" - CODE_MIN_NUMBER: "-9223372036854775808" - CONSOLE_API_URL: "" - CONSOLE_API_URL_NEW: "" - CONSOLE_CORS_ALLOW_ORIGINS: '*' - CONSOLE_WEB_URL: "" - COOKIE_DOMAIN: "" - CORE_WORKFLOW_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository - CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository - COUCHBASE_BUCKET_NAME: Embeddings - COUCHBASE_CONNECTION_STRING: couchbase://couchbase-server - COUCHBASE_PASSWORD: password - COUCHBASE_SCOPE_NAME: _default - COUCHBASE_USER: Administrator - CREATE_TIDB_SERVICE_JOB_ENABLED: "false" - CSP_WHITELIST: "" - DATASET_MAX_SEGMENTS_PER_REQUEST: "0" - DB_DATABASE: dify - DB_HOST: db_postgres - DB_PASSWORD: difyai123456 - DB_PLUGIN_DATABASE: dify_plugin - DB_PORT: "5432" - DB_TYPE: postgresql - DB_USERNAME: postgres - DEBUG: "false" - DEPLOY_ENV: PRODUCTION - DIFY_BIND_ADDRESS: 0.0.0.0 - DIFY_PORT: "5001" - DSL_EXPORT_ENCRYPT_DATASET_ID: "true" - ELASTICSEARCH_API_KEY: YOUR-ELASTICSEARCH_API_KEY - ELASTICSEARCH_CA_CERTS: "" - ELASTICSEARCH_CLOUD_URL: YOUR-ELASTICSEARCH_CLOUD_URL - ELASTICSEARCH_HOST: 0.0.0.0 - ELASTICSEARCH_MAX_RETRIES: "10" - ELASTICSEARCH_PASSWORD: elastic - ELASTICSEARCH_PORT: "9200" - ELASTICSEARCH_REQUEST_TIMEOUT: "100000" - ELASTICSEARCH_RETRY_ON_TIMEOUT: "True" - ELASTICSEARCH_USE_CLOUD: "false" - ELASTICSEARCH_USERNAME: elastic - ELASTICSEARCH_VERIFY_CERTS: "False" - EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES: "5" - ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK: "true" - ENABLE_CLEAN_EMBEDDING_CACHE_TASK: "false" - ENABLE_CLEAN_MESSAGES: "false" - ENABLE_CLEAN_UNUSED_DATASETS_TASK: "false" - ENABLE_COLLABORATION_MODE: "false" - ENABLE_CREATE_TIDB_SERVERLESS_TASK: "false" - ENABLE_DATASETS_QUEUE_MONITOR: "false" - ENABLE_HUMAN_INPUT_TIMEOUT_TASK: "true" - ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK: "false" - ENABLE_OTEL: "false" - ENABLE_REQUEST_LOGGING: "False" - ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK: "false" - ENABLE_WEBSITE_FIRECRAWL: "true" - ENABLE_WEBSITE_JINAREADER: "true" - ENABLE_WEBSITE_WATERCRAWL: "true" - ENABLE_WORKFLOW_RUN_CLEANUP_TASK: "false" - ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK: "true" - ENDPOINT_URL_TEMPLATE: http://localhost/e/{hook_id} - ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES: "true" - ETCD_AUTO_COMPACTION_MODE: revision - ETCD_AUTO_COMPACTION_RETENTION: "1000" - ETCD_ENDPOINTS: etcd:2379 - ETCD_QUOTA_BACKEND_BYTES: "4294967296" - ETCD_SNAPSHOT_COUNT: "50000" - ETL_TYPE: dify - EVENT_BUS_REDIS_CHANNEL_TYPE: pubsub - EVENT_BUS_REDIS_URL: "" - EVENT_BUS_REDIS_USE_CLUSTERS: "false" - EXPERIMENTAL_ENABLE_VINEXT: "false" - EXPOSE_NGINX_PORT: "80" - EXPOSE_NGINX_SSL_PORT: "443" - EXPOSE_PLUGIN_DAEMON_PORT: "5002" - EXPOSE_PLUGIN_DEBUGGING_HOST: localhost - EXPOSE_PLUGIN_DEBUGGING_PORT: "5003" - FILES_ACCESS_TIMEOUT: "300" - FILES_URL: "" - FLASK_DEBUG: "false" - FORCE_VERIFYING_SIGNATURE: "true" - GOOGLE_STORAGE_BUCKET_NAME: your-bucket-name - GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: "" - GRAPH_ENGINE_MAX_WORKERS: "10" - GRAPH_ENGINE_MIN_WORKERS: "1" - GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME: "5.0" - GRAPH_ENGINE_SCALE_UP_THRESHOLD: "3" - GUNICORN_TIMEOUT: "360" - HOLOGRES_ACCESS_KEY_ID: "" - HOLOGRES_ACCESS_KEY_SECRET: "" - HOLOGRES_BASE_QUANTIZATION_TYPE: rabitq - HOLOGRES_DATABASE: "" - HOLOGRES_DISTANCE_METHOD: Cosine - HOLOGRES_EF_CONSTRUCTION: "400" - HOLOGRES_HOST: "" - HOLOGRES_MAX_DEGREE: "64" - HOLOGRES_PORT: "80" - HOLOGRES_SCHEMA: public - HOLOGRES_TOKENIZER: jieba - HTTP_REQUEST_MAX_CONNECT_TIMEOUT: "10" - HTTP_REQUEST_MAX_READ_TIMEOUT: "600" - HTTP_REQUEST_MAX_WRITE_TIMEOUT: "600" - HTTP_REQUEST_NODE_MAX_BINARY_SIZE: "10485760" - HTTP_REQUEST_NODE_MAX_TEXT_SIZE: "1048576" - HTTP_REQUEST_NODE_SSL_VERIFY: "True" - HUAWEI_CLOUD_HOSTS: https://127.0.0.1:9200 - HUAWEI_CLOUD_PASSWORD: admin - HUAWEI_CLOUD_USER: admin - HUAWEI_OBS_ACCESS_KEY: your-access-key - HUAWEI_OBS_BUCKET_NAME: your-bucket-name - HUAWEI_OBS_PATH_STYLE: "false" - HUAWEI_OBS_SECRET_KEY: your-secret-key - HUAWEI_OBS_SERVER: your-server-url - HUMAN_INPUT_TIMEOUT_TASK_INTERVAL: "1" - IMAGE_FILE_BATCH_LIMIT: "10" - INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: "4000" - INIT_PASSWORD: "" - INNER_API_KEY_FOR_PLUGIN: QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 - INTERNAL_FILES_URL: "" - INVITE_EXPIRY_HOURS: "72" - IRIS_CONNECTION_URL: "" - IRIS_DATABASE: USER - IRIS_HOST: iris - IRIS_MAX_CONNECTION: "3" - IRIS_MIN_CONNECTION: "1" - IRIS_PASSWORD: Dify@1234 - IRIS_SCHEMA: dify - IRIS_SUPER_SERVER_PORT: "1972" - IRIS_TEXT_INDEX: "true" - IRIS_TEXT_INDEX_LANGUAGE: en - IRIS_TIMEZONE: UTC - IRIS_USER: _SYSTEM - IRIS_WEB_SERVER_PORT: "52773" - KIBANA_PORT: "5601" - LANG: C.UTF-8 - LC_ALL: C.UTF-8 - LINDORM_PASSWORD: admin - LINDORM_QUERY_TIMEOUT: "1" - LINDORM_URL: http://localhost:30070 - LINDORM_USERNAME: admin - LINDORM_USING_UGC: "True" - LOG_DATEFORMAT: '%Y-%m-%d %H:%M:%S' - LOG_FILE: /app/logs/server.log - LOG_FILE_BACKUP_COUNT: "5" - LOG_FILE_MAX_SIZE: "20" - LOG_LEVEL: INFO - LOG_OUTPUT_FORMAT: text - LOG_TZ: UTC - LOGSTORE_DUAL_READ_ENABLED: "true" - LOGSTORE_DUAL_WRITE_ENABLED: "false" - LOGSTORE_ENABLE_PUT_GRAPH_FIELD: "true" - LOOP_NODE_MAX_COUNT: "100" - MAIL_DEFAULT_SEND_FROM: "" - MAIL_TYPE: resend - MARKETPLACE_API_URL: https://marketplace.dify.ai - MARKETPLACE_ENABLED: "true" - MATRIXONE_DATABASE: dify - MATRIXONE_HOST: matrixone - MATRIXONE_PASSWORD: "111" - MATRIXONE_PORT: "6001" - MATRIXONE_USER: dump - MAX_ITERATIONS_NUM: "99" - MAX_PARALLEL_LIMIT: "10" - MAX_SUBMIT_COUNT: "100" - MAX_TOOLS_NUM: "10" - MAX_TREE_DEPTH: "50" - MAX_VARIABLE_SIZE: "204800" - MIGRATION_ENABLED: "true" - MILVUS_ANALYZER_PARAMS: "" - MILVUS_AUTHORIZATION_ENABLED: "true" - MILVUS_DATABASE: "" - MILVUS_ENABLE_HYBRID_SEARCH: "False" - MILVUS_PASSWORD: "" - MILVUS_TOKEN: "" - MILVUS_URI: http://host.docker.internal:19530 - MILVUS_USER: "" - MINIO_ACCESS_KEY: minioadmin - MINIO_ADDRESS: minio:9000 - MINIO_SECRET_KEY: minioadmin - MODE: worker - MULTIMODAL_SEND_FORMAT: base64 - MYSCALE_DATABASE: dify - MYSCALE_FTS_PARAMS: "" - MYSCALE_HOST: myscale - MYSCALE_PASSWORD: "" - MYSCALE_PORT: "8123" - MYSCALE_USER: default - MYSQL_HOST_VOLUME: ./volumes/mysql/data - MYSQL_INNODB_BUFFER_POOL_SIZE: 512M - MYSQL_INNODB_FLUSH_LOG_AT_TRX_COMMIT: "2" - MYSQL_INNODB_LOG_FILE_SIZE: 128M - MYSQL_MAX_CONNECTIONS: "1000" - NEXT_PUBLIC_BATCH_CONCURRENCY: "5" - NEXT_PUBLIC_COOKIE_DOMAIN: "" - NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX: "false" - NEXT_PUBLIC_SOCKET_URL: ws://localhost - NGINX_CLIENT_MAX_BODY_SIZE: 100M - NGINX_ENABLE_CERTBOT_CHALLENGE: "false" - NGINX_HTTPS_ENABLED: "false" - NGINX_KEEPALIVE_TIMEOUT: "65" - NGINX_PORT: "80" - NGINX_PROXY_READ_TIMEOUT: 3600s - NGINX_PROXY_SEND_TIMEOUT: 3600s - NGINX_SERVER_NAME: _ - NGINX_SSL_CERT_FILENAME: dify.crt - NGINX_SSL_CERT_KEY_FILENAME: dify.key - NGINX_SSL_PORT: "443" - NGINX_SSL_PROTOCOLS: TLSv1.2 TLSv1.3 - NGINX_WORKER_PROCESSES: auto - NOTION_CLIENT_ID: "" - NOTION_CLIENT_SECRET: "" - NOTION_INTEGRATION_TYPE: public - NOTION_INTERNAL_SECRET: "" - OCEANBASE_CLUSTER_NAME: difyai - OCEANBASE_ENABLE_HYBRID_SEARCH: "false" - OCEANBASE_FULLTEXT_PARSER: ik - OCEANBASE_MEMORY_LIMIT: 6G - OCEANBASE_VECTOR_DATABASE: test - OCEANBASE_VECTOR_HOST: oceanbase - OCEANBASE_VECTOR_PASSWORD: difyai123456 - OCEANBASE_VECTOR_PORT: "2881" - OCEANBASE_VECTOR_USER: root@test - OCI_ACCESS_KEY: your-access-key - OCI_BUCKET_NAME: your-bucket-name - OCI_ENDPOINT: https://your-object-storage-namespace.compat.objectstorage.us-ashburn-1.oraclecloud.com - OCI_REGION: us-ashburn-1 - OCI_SECRET_KEY: your-secret-key - OPENAI_API_BASE: https://api.openai.com/v1 - OPENDAL_FS_ROOT: storage - OPENDAL_SCHEME: fs - OPENGAUSS_DATABASE: dify - OPENGAUSS_ENABLE_PQ: "false" - OPENGAUSS_HOST: opengauss - OPENGAUSS_MAX_CONNECTION: "5" - OPENGAUSS_MIN_CONNECTION: "1" - OPENGAUSS_PASSWORD: Dify@123 - OPENGAUSS_PORT: "6600" - OPENGAUSS_USER: postgres - OPENSEARCH_AUTH_METHOD: basic - OPENSEARCH_AWS_REGION: ap-southeast-1 - OPENSEARCH_AWS_SERVICE: aoss - OPENSEARCH_BOOTSTRAP_MEMORY_LOCK: "true" - OPENSEARCH_DISCOVERY_TYPE: single-node - OPENSEARCH_HOST: opensearch - OPENSEARCH_INITIAL_ADMIN_PASSWORD: Qazwsxedc!@#123 - OPENSEARCH_JAVA_OPTS_MAX: 1024m - OPENSEARCH_JAVA_OPTS_MIN: 512m - OPENSEARCH_MEMLOCK_HARD: "-1" - OPENSEARCH_MEMLOCK_SOFT: "-1" - OPENSEARCH_NOFILE_HARD: "65536" - OPENSEARCH_NOFILE_SOFT: "65536" - OPENSEARCH_PASSWORD: admin - OPENSEARCH_PORT: "9200" - OPENSEARCH_SECURE: "true" - OPENSEARCH_USER: admin - OPENSEARCH_VERIFY_CERTS: "true" - ORACLE_CHARACTERSET: AL32UTF8 - ORACLE_CONFIG_DIR: /app/api/storage/wallet - ORACLE_DSN: oracle:1521/FREEPDB1 - ORACLE_IS_AUTONOMOUS: "false" - ORACLE_PASSWORD: dify - ORACLE_PWD: Dify123456 - ORACLE_USER: dify - ORACLE_WALLET_LOCATION: /app/api/storage/wallet - ORACLE_WALLET_PASSWORD: dify - OTEL_BATCH_EXPORT_SCHEDULE_DELAY: "5000" - OTEL_BATCH_EXPORT_TIMEOUT: "10000" - OTEL_EXPORTER_OTLP_PROTOCOL: "" - OTEL_EXPORTER_TYPE: otlp - OTEL_MAX_EXPORT_BATCH_SIZE: "512" - OTEL_MAX_QUEUE_SIZE: "2048" - OTEL_METRIC_EXPORT_INTERVAL: "60000" - OTEL_METRIC_EXPORT_TIMEOUT: "30000" - OTEL_SAMPLING_RATE: "0.1" - OTLP_API_KEY: "" - OTLP_BASE_ENDPOINT: http://localhost:4318 - OTLP_METRIC_ENDPOINT: "" - OTLP_TRACE_ENDPOINT: "" - OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES: "5" - PGDATA: /var/lib/postgresql/data/pgdata - PGVECTO_RS_DATABASE: dify - PGVECTO_RS_HOST: pgvecto-rs - PGVECTO_RS_PASSWORD: difyai123456 - PGVECTO_RS_PORT: "5432" - PGVECTO_RS_USER: postgres - PGVECTOR_DATABASE: dify - PGVECTOR_HOST: pgvector - PGVECTOR_MAX_CONNECTION: "5" - PGVECTOR_MIN_CONNECTION: "1" - PGVECTOR_PASSWORD: difyai123456 - PGVECTOR_PG_BIGM: "false" - PGVECTOR_PG_BIGM_VERSION: 1.2-20240606 - PGVECTOR_PGDATA: /var/lib/postgresql/data/pgdata - PGVECTOR_PGUSER: postgres - PGVECTOR_PORT: "5432" - PGVECTOR_POSTGRES_DB: dify - PGVECTOR_POSTGRES_PASSWORD: difyai123456 - PGVECTOR_USER: postgres - PIP_MIRROR_URL: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_ID: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_SECRET: "" - PLUGIN_ALIYUN_OSS_AUTH_VERSION: v4 - PLUGIN_ALIYUN_OSS_ENDPOINT: "" - PLUGIN_ALIYUN_OSS_PATH: "" - PLUGIN_ALIYUN_OSS_REGION: "" - PLUGIN_AWS_ACCESS_KEY: "" - PLUGIN_AWS_REGION: "" - PLUGIN_AWS_SECRET_KEY: "" - PLUGIN_AZURE_BLOB_STORAGE_CONNECTION_STRING: "" - PLUGIN_AZURE_BLOB_STORAGE_CONTAINER_NAME: "" - PLUGIN_BASED_TOKEN_COUNTING_ENABLED: "false" - PLUGIN_DAEMON_KEY: lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi - PLUGIN_DAEMON_PORT: "5002" - PLUGIN_DAEMON_TIMEOUT: "600.0" - PLUGIN_DAEMON_URL: http://plugin_daemon:5002 - PLUGIN_DEBUGGING_HOST: 0.0.0.0 - PLUGIN_DEBUGGING_PORT: "5003" - PLUGIN_DIFY_INNER_API_KEY: QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 - PLUGIN_DIFY_INNER_API_URL: http://api:5001 - PLUGIN_INSTALLED_PATH: plugin - PLUGIN_MAX_EXECUTION_TIMEOUT: "600" - PLUGIN_MAX_PACKAGE_SIZE: "52428800" - PLUGIN_MEDIA_CACHE_PATH: assets - PLUGIN_MODEL_SCHEMA_CACHE_TTL: "3600" - PLUGIN_PACKAGE_CACHE_PATH: plugin_packages - PLUGIN_PPROF_ENABLED: "false" - PLUGIN_PYTHON_ENV_INIT_TIMEOUT: "120" - PLUGIN_S3_ENDPOINT: "" - PLUGIN_S3_USE_AWS: "false" - PLUGIN_S3_USE_AWS_MANAGED_IAM: "false" - PLUGIN_S3_USE_PATH_STYLE: "false" - PLUGIN_SENTRY_DSN: "" - PLUGIN_SENTRY_ENABLED: "false" - PLUGIN_STDIO_BUFFER_SIZE: "1024" - PLUGIN_STDIO_MAX_BUFFER_SIZE: "5242880" - PLUGIN_STORAGE_LOCAL_ROOT: /app/storage - PLUGIN_STORAGE_OSS_BUCKET: "" - PLUGIN_STORAGE_TYPE: local - PLUGIN_TENCENT_COS_REGION: "" - PLUGIN_TENCENT_COS_SECRET_ID: "" - PLUGIN_TENCENT_COS_SECRET_KEY: "" - PLUGIN_VOLCENGINE_TOS_ACCESS_KEY: "" - PLUGIN_VOLCENGINE_TOS_ENDPOINT: "" - PLUGIN_VOLCENGINE_TOS_REGION: "" - PLUGIN_VOLCENGINE_TOS_SECRET_KEY: "" - PLUGIN_WORKING_PATH: /app/storage/cwd - POSITION_PROVIDER_EXCLUDES: "" - POSITION_PROVIDER_INCLUDES: "" - POSITION_PROVIDER_PINS: "" - POSITION_TOOL_EXCLUDES: "" - POSITION_TOOL_INCLUDES: "" - POSITION_TOOL_PINS: "" - POSTGRES_EFFECTIVE_CACHE_SIZE: 4096MB - POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT: "0" - POSTGRES_MAINTENANCE_WORK_MEM: 64MB - POSTGRES_MAX_CONNECTIONS: "100" - POSTGRES_SHARED_BUFFERS: 128MB - POSTGRES_STATEMENT_TIMEOUT: "0" - POSTGRES_WORK_MEM: 4MB - PROMPT_GENERATION_MAX_TOKENS: "512" - PYTHONIOENCODING: utf-8 - QDRANT_API_KEY: difyai123456 - QDRANT_CLIENT_TIMEOUT: "20" - QDRANT_GRPC_ENABLED: "false" - QDRANT_GRPC_PORT: "6334" - QDRANT_REPLICATION_FACTOR: "1" - QDRANT_URL: http://qdrant:6333 - QUEUE_MONITOR_ALERT_EMAILS: "" - QUEUE_MONITOR_INTERVAL: "30" - QUEUE_MONITOR_THRESHOLD: "200" - REDIS_CLUSTERS: "" - REDIS_CLUSTERS_PASSWORD: "" - REDIS_DB: "0" - REDIS_HEALTH_CHECK_INTERVAL: "30" - REDIS_HOST: redis - REDIS_KEY_PREFIX: "" - REDIS_MAX_CONNECTIONS: "" - REDIS_PASSWORD: difyai123456 - REDIS_PORT: "6379" - REDIS_RETRY_BACKOFF_BASE: "1.0" - REDIS_RETRY_BACKOFF_CAP: "10.0" - REDIS_RETRY_RETRIES: "3" - REDIS_SENTINEL_PASSWORD: "" - REDIS_SENTINEL_SERVICE_NAME: "" - REDIS_SENTINEL_SOCKET_TIMEOUT: "0.1" - REDIS_SENTINEL_USERNAME: "" - REDIS_SENTINELS: "" - REDIS_SOCKET_CONNECT_TIMEOUT: "5.0" - REDIS_SOCKET_TIMEOUT: "5.0" - REDIS_SSL_CA_CERTS: "" - REDIS_SSL_CERT_REQS: CERT_NONE - REDIS_SSL_CERTFILE: "" - REDIS_SSL_KEYFILE: "" - REDIS_USE_CLUSTERS: "false" - REDIS_USE_SENTINEL: "false" - REDIS_USE_SSL: "false" - REDIS_USERNAME: "" - REFRESH_TOKEN_EXPIRE_DAYS: "30" - RELYT_DATABASE: postgres - RELYT_HOST: db - RELYT_PASSWORD: difyai123456 - RELYT_PORT: "5432" - RELYT_USER: postgres - RESEND_API_KEY: your-resend-api-key - RESEND_API_URL: https://api.resend.com - RESET_PASSWORD_TOKEN_EXPIRY_MINUTES: "5" - RESPECT_XFORWARD_HEADERS_ENABLED: "false" - S3_ACCESS_KEY: "" - S3_ADDRESS_STYLE: auto - S3_BUCKET_NAME: difyai - S3_ENDPOINT: "" - S3_REGION: us-east-1 - S3_SECRET_KEY: "" - S3_USE_AWS_MANAGED_IAM: "false" - SANDBOX_API_KEY: dify-sandbox - SANDBOX_ENABLE_NETWORK: "true" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL: "200" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: "1000" - SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD: "21" - SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL: "90000" - SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: "30" - SANDBOX_GIN_MODE: release - SANDBOX_HTTP_PROXY: http://ssrf_proxy:3128 - SANDBOX_HTTPS_PROXY: http://ssrf_proxy:3128 - SANDBOX_PORT: "8194" - SANDBOX_WORKER_TIMEOUT: "15" - SCARF_NO_ANALYTICS: "true" - SECRET_KEY: sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U - SEEKDB_MEMORY_LIMIT: 2G - SENDGRID_API_KEY: "" - SENTRY_DSN: "" - SENTRY_PROFILES_SAMPLE_RATE: "1.0" - SENTRY_TRACES_SAMPLE_RATE: "1.0" - SERVER_WORKER_AMOUNT: "1" - SERVER_WORKER_CLASS: gevent - SERVER_WORKER_CONNECTIONS: "10" - SERVICE_API_URL: "" - SINGLE_CHUNK_ATTACHMENT_LIMIT: "10" - SMTP_LOCAL_HOSTNAME: "" - SMTP_OPPORTUNISTIC_TLS: "false" - SMTP_PASSWORD: "" - SMTP_PORT: "465" - SMTP_SERVER: "" - SMTP_USE_TLS: "true" - SMTP_USERNAME: "" - SQLALCHEMY_ECHO: "false" - SQLALCHEMY_MAX_OVERFLOW: "10" - SQLALCHEMY_POOL_PRE_PING: "false" - SQLALCHEMY_POOL_RECYCLE: "3600" - SQLALCHEMY_POOL_SIZE: "30" - SQLALCHEMY_POOL_TIMEOUT: "30" - SQLALCHEMY_POOL_USE_LIFO: "false" - SSRF_COREDUMP_DIR: /var/spool/squid - SSRF_DEFAULT_CONNECT_TIME_OUT: "5" - SSRF_DEFAULT_READ_TIME_OUT: "5" - SSRF_DEFAULT_TIME_OUT: "5" - SSRF_DEFAULT_WRITE_TIME_OUT: "5" - SSRF_HTTP_PORT: "3128" - SSRF_POOL_KEEPALIVE_EXPIRY: "5.0" - SSRF_POOL_MAX_CONNECTIONS: "100" - SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - SSRF_PROXY_HTTP_URL: http://ssrf_proxy:3128 - SSRF_PROXY_HTTPS_URL: http://ssrf_proxy:3128 - SSRF_REVERSE_PROXY_PORT: "8194" - SSRF_SANDBOX_HOST: sandbox - STORAGE_TYPE: opendal - SUPABASE_API_KEY: your-access-key - SUPABASE_BUCKET_NAME: your-bucket-name - SUPABASE_URL: your-server-url - SWAGGER_UI_ENABLED: "false" - SWAGGER_UI_PATH: /swagger-ui.html - TABLESTORE_ACCESS_KEY_ID: xxx - TABLESTORE_ACCESS_KEY_SECRET: xxx - TABLESTORE_ENDPOINT: https://instance-name.cn-hangzhou.ots.aliyuncs.com - TABLESTORE_INSTANCE_NAME: instance-name - TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE: "false" - TEMPLATE_TRANSFORM_MAX_LENGTH: "400000" - TENANT_ISOLATED_TASK_CONCURRENCY: "1" - TENCENT_COS_BUCKET_NAME: your-bucket-name - TENCENT_COS_CUSTOM_DOMAIN: your-custom-domain - TENCENT_COS_REGION: your-region - TENCENT_COS_SCHEME: your-scheme - TENCENT_COS_SECRET_ID: your-secret-id - TENCENT_COS_SECRET_KEY: your-secret-key - TENCENT_VECTOR_DB_API_KEY: dify - TENCENT_VECTOR_DB_DATABASE: dify - TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH: "false" - TENCENT_VECTOR_DB_REPLICAS: "2" - TENCENT_VECTOR_DB_SHARD: "1" - TENCENT_VECTOR_DB_TIMEOUT: "30" - TENCENT_VECTOR_DB_URL: http://127.0.0.1 - TENCENT_VECTOR_DB_USERNAME: dify - TEXT_GENERATION_TIMEOUT_MS: "60000" - TIDB_API_URL: http://127.0.0.1 - TIDB_IAM_API_URL: http://127.0.0.1 - TIDB_ON_QDRANT_API_KEY: dify - TIDB_ON_QDRANT_CLIENT_TIMEOUT: "20" - TIDB_ON_QDRANT_GRPC_ENABLED: "false" - TIDB_ON_QDRANT_GRPC_PORT: "6334" - TIDB_ON_QDRANT_URL: http://127.0.0.1 - TIDB_PRIVATE_KEY: dify - TIDB_PROJECT_ID: dify - TIDB_PUBLIC_KEY: dify - TIDB_REGION: regions/aws-us-east-1 - TIDB_SPEND_LIMIT: "100" - TIDB_VECTOR_DATABASE: dify - TIDB_VECTOR_HOST: tidb - TIDB_VECTOR_PASSWORD: "" - TIDB_VECTOR_PORT: "4000" - TIDB_VECTOR_USER: "" - TOP_K_MAX_VALUE: "10" - TRIGGER_URL: http://localhost - UNSTRUCTURED_API_KEY: "" - UNSTRUCTURED_API_URL: "" - UPLOAD_AUDIO_FILE_SIZE_LIMIT: "50" - UPLOAD_FILE_BATCH_LIMIT: "5" - UPLOAD_FILE_EXTENSION_BLACKLIST: "" - UPLOAD_FILE_SIZE_LIMIT: "15" - UPLOAD_IMAGE_FILE_SIZE_LIMIT: "10" - UPLOAD_VIDEO_FILE_SIZE_LIMIT: "100" - UPSTASH_VECTOR_TOKEN: dify - UPSTASH_VECTOR_URL: https://xxx-vector.upstash.io - UV_CACHE_DIR: /tmp/.uv-cache - VASTBASE_DATABASE: dify - VASTBASE_HOST: vastbase - VASTBASE_MAX_CONNECTION: "5" - VASTBASE_MIN_CONNECTION: "1" - VASTBASE_PASSWORD: Difyai123456 - VASTBASE_PORT: "5432" - VASTBASE_USER: dify - VECTOR_INDEX_NAME_PREFIX: Vector_index - VECTOR_STORE: weaviate - VIKINGDB_ACCESS_KEY: your-ak - VIKINGDB_CONNECTION_TIMEOUT: "30" - VIKINGDB_HOST: api-vikingdb.xxx.volces.com - VIKINGDB_REGION: cn-shanghai - VIKINGDB_SCHEMA: http - VIKINGDB_SECRET_KEY: your-sk - VIKINGDB_SOCKET_TIMEOUT: "30" - VOLCENGINE_TOS_ACCESS_KEY: your-access-key - VOLCENGINE_TOS_BUCKET_NAME: your-bucket-name - VOLCENGINE_TOS_ENDPOINT: your-server-url - VOLCENGINE_TOS_REGION: your-region - VOLCENGINE_TOS_SECRET_KEY: your-secret-key - WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_APIKEY_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_USERS: hello@dify.ai - WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED: "true" - WEAVIATE_AUTHORIZATION_ADMINLIST_USERS: hello@dify.ai - WEAVIATE_CLUSTER_HOSTNAME: node1 - WEAVIATE_DEFAULT_VECTORIZER_MODULE: none - WEAVIATE_DISABLE_TELEMETRY: "false" - WEAVIATE_ENABLE_TOKENIZER_GSE: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR: "false" - WEAVIATE_ENDPOINT: http://weaviate:8080 - WEAVIATE_GRPC_ENDPOINT: grpc://weaviate:50051 - WEAVIATE_PERSISTENCE_DATA_PATH: /var/lib/weaviate - WEAVIATE_QUERY_DEFAULTS_LIMIT: "25" - WEAVIATE_TOKENIZATION: word - WEB_API_CORS_ALLOW_ORIGINS: '*' - WEB_SENTRY_DSN: "" - WEBHOOK_REQUEST_BODY_MAX_SIZE: "10485760" - WORKFLOW_CALL_MAX_DEPTH: "5" - WORKFLOW_FILE_UPLOAD_LIMIT: "10" - WORKFLOW_LOG_CLEANUP_BATCH_SIZE: "100" - WORKFLOW_LOG_CLEANUP_ENABLED: "false" - WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS: "" - WORKFLOW_LOG_RETENTION_DAYS: "30" - WORKFLOW_MAX_EXECUTION_STEPS: "500" - WORKFLOW_MAX_EXECUTION_TIME: "1200" - WORKFLOW_NODE_EXECUTION_STORAGE: rdbms - WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK: "0" - WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE: "100" - WORKFLOW_SCHEDULE_POLLER_INTERVAL: "1" - healthcheck: - test: - - CMD-SHELL - - celery -A celery_healthcheck.celery inspect ping - timeout: 30s - interval: 30s - retries: 3 - start_period: 1m0s - disable: true - image: langgenius/dify-api:1.13.3 - networks: - default: null - ssrf_proxy_network: null - restart: always - volumes: - - type: bind - source: /Users/zhaohao/Dify/dify/docker/volumes/app/storage - target: /app/api/storage - bind: {} - worker_beat: - depends_on: - db_mysql: - condition: service_healthy - required: false - db_postgres: - condition: service_healthy - required: false - init_permissions: - condition: service_completed_successfully - required: true - oceanbase: - condition: service_healthy - required: false - redis: - condition: service_started - required: true - seekdb: - condition: service_healthy - required: false - environment: - ACCESS_TOKEN_EXPIRE_MINUTES: "600" - ALIBABACLOUD_MYSQL_DATABASE: dify - ALIBABACLOUD_MYSQL_HNSW_M: "6" - ALIBABACLOUD_MYSQL_HOST: 127.0.0.1 - ALIBABACLOUD_MYSQL_MAX_CONNECTION: "5" - ALIBABACLOUD_MYSQL_PASSWORD: difyai123456 - ALIBABACLOUD_MYSQL_PORT: "3306" - ALIBABACLOUD_MYSQL_USER: root - ALIYUN_OSS_ACCESS_KEY: your-access-key - ALIYUN_OSS_AUTH_VERSION: v4 - ALIYUN_OSS_BUCKET_NAME: your-bucket-name - ALIYUN_OSS_ENDPOINT: https://oss-ap-southeast-1-internal.aliyuncs.com - ALIYUN_OSS_PATH: your-path - ALIYUN_OSS_REGION: ap-southeast-1 - ALIYUN_OSS_SECRET_KEY: your-secret-key - ALIYUN_SLS_ACCESS_KEY_ID: "" - ALIYUN_SLS_ACCESS_KEY_SECRET: "" - ALIYUN_SLS_ENDPOINT: "" - ALIYUN_SLS_LOGSTORE_TTL: "365" - ALIYUN_SLS_PROJECT_NAME: "" - ALIYUN_SLS_REGION: "" - ALLOW_EMBED: "false" - ALLOW_INLINE_STYLES: "false" - ALLOW_UNSAFE_DATA_SCHEME: "false" - AMPLITUDE_API_KEY: "" - ANALYTICDB_ACCOUNT: testaccount - ANALYTICDB_HOST: gp-test.aliyuncs.com - ANALYTICDB_INSTANCE_ID: gp-ab123456 - ANALYTICDB_KEY_ID: your-ak - ANALYTICDB_KEY_SECRET: your-sk - ANALYTICDB_MAX_CONNECTION: "5" - ANALYTICDB_MIN_CONNECTION: "1" - ANALYTICDB_NAMESPACE: dify - ANALYTICDB_NAMESPACE_PASSWORD: difypassword - ANALYTICDB_PASSWORD: testpassword - ANALYTICDB_PORT: "5432" - ANALYTICDB_REGION_ID: cn-hangzhou - ANNOTATION_IMPORT_FILE_SIZE_LIMIT: "2" - ANNOTATION_IMPORT_MAX_CONCURRENT: "5" - ANNOTATION_IMPORT_MAX_RECORDS: "10000" - ANNOTATION_IMPORT_MIN_RECORDS: "1" - ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR: "20" - ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE: "5" - API_SENTRY_DSN: "" - API_SENTRY_PROFILES_SAMPLE_RATE: "1.0" - API_SENTRY_TRACES_SAMPLE_RATE: "1.0" - API_TOOL_DEFAULT_CONNECT_TIMEOUT: "10" - API_TOOL_DEFAULT_READ_TIMEOUT: "60" - API_WORKFLOW_NODE_EXECUTION_REPOSITORY: repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository - API_WORKFLOW_RUN_REPOSITORY: repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository - APP_API_URL: "" - APP_DEFAULT_ACTIVE_REQUESTS: "0" - APP_MAX_ACTIVE_REQUESTS: "0" - APP_MAX_EXECUTION_TIME: "1200" - APP_WEB_URL: "" - ARCHIVE_STORAGE_ACCESS_KEY: "" - ARCHIVE_STORAGE_ARCHIVE_BUCKET: "" - ARCHIVE_STORAGE_ENABLED: "false" - ARCHIVE_STORAGE_ENDPOINT: "" - ARCHIVE_STORAGE_EXPORT_BUCKET: "" - ARCHIVE_STORAGE_REGION: auto - ARCHIVE_STORAGE_SECRET_KEY: "" - ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT: "60" - ATTACHMENT_IMAGE_FILE_SIZE_LIMIT: "2" - AZURE_BLOB_ACCOUNT_KEY: difyai - AZURE_BLOB_ACCOUNT_NAME: difyai - AZURE_BLOB_ACCOUNT_URL: https://.blob.core.windows.net - AZURE_BLOB_CONTAINER_NAME: difyai-container - BAIDU_OBS_ACCESS_KEY: your-access-key - BAIDU_OBS_BUCKET_NAME: your-bucket-name - BAIDU_OBS_ENDPOINT: your-server-url - BAIDU_OBS_SECRET_KEY: your-secret-key - BAIDU_VECTOR_DB_ACCOUNT: root - BAIDU_VECTOR_DB_API_KEY: dify - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT: "500" - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO: "0.05" - BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS: "30000" - BAIDU_VECTOR_DB_DATABASE: dify - BAIDU_VECTOR_DB_ENDPOINT: http://127.0.0.1:5287 - BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER: DEFAULT_ANALYZER - BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE: COARSE_MODE - BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS: "300" - BAIDU_VECTOR_DB_REPLICAS: "3" - BAIDU_VECTOR_DB_SHARD: "1" - BROKER_USE_SSL: "false" - CELERY_AUTO_SCALE: "false" - CELERY_BACKEND: redis - CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1 - CELERY_MAX_WORKERS: "" - CELERY_MIN_WORKERS: "" - CELERY_SENTINEL_MASTER_NAME: "" - CELERY_SENTINEL_PASSWORD: "" - CELERY_SENTINEL_SOCKET_TIMEOUT: "0.1" - CELERY_TASK_ANNOTATIONS: "null" - CELERY_USE_SENTINEL: "false" - CELERY_WORKER_AMOUNT: "4" - CELERY_WORKER_CLASS: "" - CERTBOT_DOMAIN: your_domain.com - CERTBOT_EMAIL: your_email@example.com - CERTBOT_OPTIONS: "" - CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES: "5" - CHECK_UPDATE_URL: https://updates.dify.ai - CHROMA_AUTH_CREDENTIALS: "" - CHROMA_AUTH_PROVIDER: chromadb.auth.token_authn.TokenAuthClientProvider - CHROMA_DATABASE: default_database - CHROMA_HOST: 127.0.0.1 - CHROMA_IS_PERSISTENT: "TRUE" - CHROMA_PORT: "8000" - CHROMA_SERVER_AUTHN_CREDENTIALS: difyai123456 - CHROMA_SERVER_AUTHN_PROVIDER: chromadb.auth.token_authn.TokenAuthenticationServerProvider - CHROMA_TENANT: default_tenant - CLICKZETTA_ANALYZER_MODE: smart - CLICKZETTA_ANALYZER_TYPE: chinese - CLICKZETTA_BATCH_SIZE: "100" - CLICKZETTA_ENABLE_INVERTED_INDEX: "true" - CLICKZETTA_INSTANCE: "" - CLICKZETTA_PASSWORD: "" - CLICKZETTA_SCHEMA: dify - CLICKZETTA_SERVICE: api.clickzetta.com - CLICKZETTA_USERNAME: "" - CLICKZETTA_VCLUSTER: default_ap - CLICKZETTA_VECTOR_DISTANCE_FUNCTION: cosine_distance - CLICKZETTA_VOLUME_DIFY_PREFIX: dify_km - CLICKZETTA_VOLUME_NAME: "" - CLICKZETTA_VOLUME_TABLE_PREFIX: dataset_ - CLICKZETTA_VOLUME_TYPE: user - CLICKZETTA_WORKSPACE: quick_start - CODE_EXECUTION_API_KEY: dify-sandbox - CODE_EXECUTION_CONNECT_TIMEOUT: "10" - CODE_EXECUTION_ENDPOINT: http://sandbox:8194 - CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY: "5.0" - CODE_EXECUTION_POOL_MAX_CONNECTIONS: "100" - CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - CODE_EXECUTION_READ_TIMEOUT: "60" - CODE_EXECUTION_SSL_VERIFY: "True" - CODE_EXECUTION_WRITE_TIMEOUT: "10" - CODE_GENERATION_MAX_TOKENS: "1024" - CODE_MAX_DEPTH: "5" - CODE_MAX_NUMBER: "9223372036854775807" - CODE_MAX_NUMBER_ARRAY_LENGTH: "1000" - CODE_MAX_OBJECT_ARRAY_LENGTH: "30" - CODE_MAX_PRECISION: "20" - CODE_MAX_STRING_ARRAY_LENGTH: "30" - CODE_MAX_STRING_LENGTH: "400000" - CODE_MIN_NUMBER: "-9223372036854775808" - CONSOLE_API_URL: "" - CONSOLE_API_URL_NEW: "" - CONSOLE_CORS_ALLOW_ORIGINS: '*' - CONSOLE_WEB_URL: "" - COOKIE_DOMAIN: "" - CORE_WORKFLOW_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository - CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository - COUCHBASE_BUCKET_NAME: Embeddings - COUCHBASE_CONNECTION_STRING: couchbase://couchbase-server - COUCHBASE_PASSWORD: password - COUCHBASE_SCOPE_NAME: _default - COUCHBASE_USER: Administrator - CREATE_TIDB_SERVICE_JOB_ENABLED: "false" - CSP_WHITELIST: "" - DATASET_MAX_SEGMENTS_PER_REQUEST: "0" - DB_DATABASE: dify - DB_HOST: db_postgres - DB_PASSWORD: difyai123456 - DB_PLUGIN_DATABASE: dify_plugin - DB_PORT: "5432" - DB_TYPE: postgresql - DB_USERNAME: postgres - DEBUG: "false" - DEPLOY_ENV: PRODUCTION - DIFY_BIND_ADDRESS: 0.0.0.0 - DIFY_PORT: "5001" - DSL_EXPORT_ENCRYPT_DATASET_ID: "true" - ELASTICSEARCH_API_KEY: YOUR-ELASTICSEARCH_API_KEY - ELASTICSEARCH_CA_CERTS: "" - ELASTICSEARCH_CLOUD_URL: YOUR-ELASTICSEARCH_CLOUD_URL - ELASTICSEARCH_HOST: 0.0.0.0 - ELASTICSEARCH_MAX_RETRIES: "10" - ELASTICSEARCH_PASSWORD: elastic - ELASTICSEARCH_PORT: "9200" - ELASTICSEARCH_REQUEST_TIMEOUT: "100000" - ELASTICSEARCH_RETRY_ON_TIMEOUT: "True" - ELASTICSEARCH_USE_CLOUD: "false" - ELASTICSEARCH_USERNAME: elastic - ELASTICSEARCH_VERIFY_CERTS: "False" - EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES: "5" - ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK: "true" - ENABLE_CLEAN_EMBEDDING_CACHE_TASK: "false" - ENABLE_CLEAN_MESSAGES: "false" - ENABLE_CLEAN_UNUSED_DATASETS_TASK: "false" - ENABLE_COLLABORATION_MODE: "false" - ENABLE_CREATE_TIDB_SERVERLESS_TASK: "false" - ENABLE_DATASETS_QUEUE_MONITOR: "false" - ENABLE_HUMAN_INPUT_TIMEOUT_TASK: "true" - ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK: "false" - ENABLE_OTEL: "false" - ENABLE_REQUEST_LOGGING: "False" - ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK: "false" - ENABLE_WEBSITE_FIRECRAWL: "true" - ENABLE_WEBSITE_JINAREADER: "true" - ENABLE_WEBSITE_WATERCRAWL: "true" - ENABLE_WORKFLOW_RUN_CLEANUP_TASK: "false" - ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK: "true" - ENDPOINT_URL_TEMPLATE: http://localhost/e/{hook_id} - ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES: "true" - ETCD_AUTO_COMPACTION_MODE: revision - ETCD_AUTO_COMPACTION_RETENTION: "1000" - ETCD_ENDPOINTS: etcd:2379 - ETCD_QUOTA_BACKEND_BYTES: "4294967296" - ETCD_SNAPSHOT_COUNT: "50000" - ETL_TYPE: dify - EVENT_BUS_REDIS_CHANNEL_TYPE: pubsub - EVENT_BUS_REDIS_URL: "" - EVENT_BUS_REDIS_USE_CLUSTERS: "false" - EXPERIMENTAL_ENABLE_VINEXT: "false" - EXPOSE_NGINX_PORT: "80" - EXPOSE_NGINX_SSL_PORT: "443" - EXPOSE_PLUGIN_DAEMON_PORT: "5002" - EXPOSE_PLUGIN_DEBUGGING_HOST: localhost - EXPOSE_PLUGIN_DEBUGGING_PORT: "5003" - FILES_ACCESS_TIMEOUT: "300" - FILES_URL: "" - FLASK_DEBUG: "false" - FORCE_VERIFYING_SIGNATURE: "true" - GOOGLE_STORAGE_BUCKET_NAME: your-bucket-name - GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: "" - GRAPH_ENGINE_MAX_WORKERS: "10" - GRAPH_ENGINE_MIN_WORKERS: "1" - GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME: "5.0" - GRAPH_ENGINE_SCALE_UP_THRESHOLD: "3" - GUNICORN_TIMEOUT: "360" - HOLOGRES_ACCESS_KEY_ID: "" - HOLOGRES_ACCESS_KEY_SECRET: "" - HOLOGRES_BASE_QUANTIZATION_TYPE: rabitq - HOLOGRES_DATABASE: "" - HOLOGRES_DISTANCE_METHOD: Cosine - HOLOGRES_EF_CONSTRUCTION: "400" - HOLOGRES_HOST: "" - HOLOGRES_MAX_DEGREE: "64" - HOLOGRES_PORT: "80" - HOLOGRES_SCHEMA: public - HOLOGRES_TOKENIZER: jieba - HTTP_REQUEST_MAX_CONNECT_TIMEOUT: "10" - HTTP_REQUEST_MAX_READ_TIMEOUT: "600" - HTTP_REQUEST_MAX_WRITE_TIMEOUT: "600" - HTTP_REQUEST_NODE_MAX_BINARY_SIZE: "10485760" - HTTP_REQUEST_NODE_MAX_TEXT_SIZE: "1048576" - HTTP_REQUEST_NODE_SSL_VERIFY: "True" - HUAWEI_CLOUD_HOSTS: https://127.0.0.1:9200 - HUAWEI_CLOUD_PASSWORD: admin - HUAWEI_CLOUD_USER: admin - HUAWEI_OBS_ACCESS_KEY: your-access-key - HUAWEI_OBS_BUCKET_NAME: your-bucket-name - HUAWEI_OBS_PATH_STYLE: "false" - HUAWEI_OBS_SECRET_KEY: your-secret-key - HUAWEI_OBS_SERVER: your-server-url - HUMAN_INPUT_TIMEOUT_TASK_INTERVAL: "1" - IMAGE_FILE_BATCH_LIMIT: "10" - INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: "4000" - INIT_PASSWORD: "" - INTERNAL_FILES_URL: "" - INVITE_EXPIRY_HOURS: "72" - IRIS_CONNECTION_URL: "" - IRIS_DATABASE: USER - IRIS_HOST: iris - IRIS_MAX_CONNECTION: "3" - IRIS_MIN_CONNECTION: "1" - IRIS_PASSWORD: Dify@1234 - IRIS_SCHEMA: dify - IRIS_SUPER_SERVER_PORT: "1972" - IRIS_TEXT_INDEX: "true" - IRIS_TEXT_INDEX_LANGUAGE: en - IRIS_TIMEZONE: UTC - IRIS_USER: _SYSTEM - IRIS_WEB_SERVER_PORT: "52773" - KIBANA_PORT: "5601" - LANG: C.UTF-8 - LC_ALL: C.UTF-8 - LINDORM_PASSWORD: admin - LINDORM_QUERY_TIMEOUT: "1" - LINDORM_URL: http://localhost:30070 - LINDORM_USERNAME: admin - LINDORM_USING_UGC: "True" - LOG_DATEFORMAT: '%Y-%m-%d %H:%M:%S' - LOG_FILE: /app/logs/server.log - LOG_FILE_BACKUP_COUNT: "5" - LOG_FILE_MAX_SIZE: "20" - LOG_LEVEL: INFO - LOG_OUTPUT_FORMAT: text - LOG_TZ: UTC - LOGSTORE_DUAL_READ_ENABLED: "true" - LOGSTORE_DUAL_WRITE_ENABLED: "false" - LOGSTORE_ENABLE_PUT_GRAPH_FIELD: "true" - LOOP_NODE_MAX_COUNT: "100" - MAIL_DEFAULT_SEND_FROM: "" - MAIL_TYPE: resend - MARKETPLACE_API_URL: https://marketplace.dify.ai - MARKETPLACE_ENABLED: "true" - MATRIXONE_DATABASE: dify - MATRIXONE_HOST: matrixone - MATRIXONE_PASSWORD: "111" - MATRIXONE_PORT: "6001" - MATRIXONE_USER: dump - MAX_ITERATIONS_NUM: "99" - MAX_PARALLEL_LIMIT: "10" - MAX_SUBMIT_COUNT: "100" - MAX_TOOLS_NUM: "10" - MAX_TREE_DEPTH: "50" - MAX_VARIABLE_SIZE: "204800" - MIGRATION_ENABLED: "true" - MILVUS_ANALYZER_PARAMS: "" - MILVUS_AUTHORIZATION_ENABLED: "true" - MILVUS_DATABASE: "" - MILVUS_ENABLE_HYBRID_SEARCH: "False" - MILVUS_PASSWORD: "" - MILVUS_TOKEN: "" - MILVUS_URI: http://host.docker.internal:19530 - MILVUS_USER: "" - MINIO_ACCESS_KEY: minioadmin - MINIO_ADDRESS: minio:9000 - MINIO_SECRET_KEY: minioadmin - MODE: beat - MULTIMODAL_SEND_FORMAT: base64 - MYSCALE_DATABASE: dify - MYSCALE_FTS_PARAMS: "" - MYSCALE_HOST: myscale - MYSCALE_PASSWORD: "" - MYSCALE_PORT: "8123" - MYSCALE_USER: default - MYSQL_HOST_VOLUME: ./volumes/mysql/data - MYSQL_INNODB_BUFFER_POOL_SIZE: 512M - MYSQL_INNODB_FLUSH_LOG_AT_TRX_COMMIT: "2" - MYSQL_INNODB_LOG_FILE_SIZE: 128M - MYSQL_MAX_CONNECTIONS: "1000" - NEXT_PUBLIC_BATCH_CONCURRENCY: "5" - NEXT_PUBLIC_COOKIE_DOMAIN: "" - NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX: "false" - NEXT_PUBLIC_SOCKET_URL: ws://localhost - NGINX_CLIENT_MAX_BODY_SIZE: 100M - NGINX_ENABLE_CERTBOT_CHALLENGE: "false" - NGINX_HTTPS_ENABLED: "false" - NGINX_KEEPALIVE_TIMEOUT: "65" - NGINX_PORT: "80" - NGINX_PROXY_READ_TIMEOUT: 3600s - NGINX_PROXY_SEND_TIMEOUT: 3600s - NGINX_SERVER_NAME: _ - NGINX_SSL_CERT_FILENAME: dify.crt - NGINX_SSL_CERT_KEY_FILENAME: dify.key - NGINX_SSL_PORT: "443" - NGINX_SSL_PROTOCOLS: TLSv1.2 TLSv1.3 - NGINX_WORKER_PROCESSES: auto - NOTION_CLIENT_ID: "" - NOTION_CLIENT_SECRET: "" - NOTION_INTEGRATION_TYPE: public - NOTION_INTERNAL_SECRET: "" - OCEANBASE_CLUSTER_NAME: difyai - OCEANBASE_ENABLE_HYBRID_SEARCH: "false" - OCEANBASE_FULLTEXT_PARSER: ik - OCEANBASE_MEMORY_LIMIT: 6G - OCEANBASE_VECTOR_DATABASE: test - OCEANBASE_VECTOR_HOST: oceanbase - OCEANBASE_VECTOR_PASSWORD: difyai123456 - OCEANBASE_VECTOR_PORT: "2881" - OCEANBASE_VECTOR_USER: root@test - OCI_ACCESS_KEY: your-access-key - OCI_BUCKET_NAME: your-bucket-name - OCI_ENDPOINT: https://your-object-storage-namespace.compat.objectstorage.us-ashburn-1.oraclecloud.com - OCI_REGION: us-ashburn-1 - OCI_SECRET_KEY: your-secret-key - OPENAI_API_BASE: https://api.openai.com/v1 - OPENDAL_FS_ROOT: storage - OPENDAL_SCHEME: fs - OPENGAUSS_DATABASE: dify - OPENGAUSS_ENABLE_PQ: "false" - OPENGAUSS_HOST: opengauss - OPENGAUSS_MAX_CONNECTION: "5" - OPENGAUSS_MIN_CONNECTION: "1" - OPENGAUSS_PASSWORD: Dify@123 - OPENGAUSS_PORT: "6600" - OPENGAUSS_USER: postgres - OPENSEARCH_AUTH_METHOD: basic - OPENSEARCH_AWS_REGION: ap-southeast-1 - OPENSEARCH_AWS_SERVICE: aoss - OPENSEARCH_BOOTSTRAP_MEMORY_LOCK: "true" - OPENSEARCH_DISCOVERY_TYPE: single-node - OPENSEARCH_HOST: opensearch - OPENSEARCH_INITIAL_ADMIN_PASSWORD: Qazwsxedc!@#123 - OPENSEARCH_JAVA_OPTS_MAX: 1024m - OPENSEARCH_JAVA_OPTS_MIN: 512m - OPENSEARCH_MEMLOCK_HARD: "-1" - OPENSEARCH_MEMLOCK_SOFT: "-1" - OPENSEARCH_NOFILE_HARD: "65536" - OPENSEARCH_NOFILE_SOFT: "65536" - OPENSEARCH_PASSWORD: admin - OPENSEARCH_PORT: "9200" - OPENSEARCH_SECURE: "true" - OPENSEARCH_USER: admin - OPENSEARCH_VERIFY_CERTS: "true" - ORACLE_CHARACTERSET: AL32UTF8 - ORACLE_CONFIG_DIR: /app/api/storage/wallet - ORACLE_DSN: oracle:1521/FREEPDB1 - ORACLE_IS_AUTONOMOUS: "false" - ORACLE_PASSWORD: dify - ORACLE_PWD: Dify123456 - ORACLE_USER: dify - ORACLE_WALLET_LOCATION: /app/api/storage/wallet - ORACLE_WALLET_PASSWORD: dify - OTEL_BATCH_EXPORT_SCHEDULE_DELAY: "5000" - OTEL_BATCH_EXPORT_TIMEOUT: "10000" - OTEL_EXPORTER_OTLP_PROTOCOL: "" - OTEL_EXPORTER_TYPE: otlp - OTEL_MAX_EXPORT_BATCH_SIZE: "512" - OTEL_MAX_QUEUE_SIZE: "2048" - OTEL_METRIC_EXPORT_INTERVAL: "60000" - OTEL_METRIC_EXPORT_TIMEOUT: "30000" - OTEL_SAMPLING_RATE: "0.1" - OTLP_API_KEY: "" - OTLP_BASE_ENDPOINT: http://localhost:4318 - OTLP_METRIC_ENDPOINT: "" - OTLP_TRACE_ENDPOINT: "" - OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES: "5" - PGDATA: /var/lib/postgresql/data/pgdata - PGVECTO_RS_DATABASE: dify - PGVECTO_RS_HOST: pgvecto-rs - PGVECTO_RS_PASSWORD: difyai123456 - PGVECTO_RS_PORT: "5432" - PGVECTO_RS_USER: postgres - PGVECTOR_DATABASE: dify - PGVECTOR_HOST: pgvector - PGVECTOR_MAX_CONNECTION: "5" - PGVECTOR_MIN_CONNECTION: "1" - PGVECTOR_PASSWORD: difyai123456 - PGVECTOR_PG_BIGM: "false" - PGVECTOR_PG_BIGM_VERSION: 1.2-20240606 - PGVECTOR_PGDATA: /var/lib/postgresql/data/pgdata - PGVECTOR_PGUSER: postgres - PGVECTOR_PORT: "5432" - PGVECTOR_POSTGRES_DB: dify - PGVECTOR_POSTGRES_PASSWORD: difyai123456 - PGVECTOR_USER: postgres - PIP_MIRROR_URL: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_ID: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_SECRET: "" - PLUGIN_ALIYUN_OSS_AUTH_VERSION: v4 - PLUGIN_ALIYUN_OSS_ENDPOINT: "" - PLUGIN_ALIYUN_OSS_PATH: "" - PLUGIN_ALIYUN_OSS_REGION: "" - PLUGIN_AWS_ACCESS_KEY: "" - PLUGIN_AWS_REGION: "" - PLUGIN_AWS_SECRET_KEY: "" - PLUGIN_AZURE_BLOB_STORAGE_CONNECTION_STRING: "" - PLUGIN_AZURE_BLOB_STORAGE_CONTAINER_NAME: "" - PLUGIN_BASED_TOKEN_COUNTING_ENABLED: "false" - PLUGIN_DAEMON_KEY: lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi - PLUGIN_DAEMON_PORT: "5002" - PLUGIN_DAEMON_TIMEOUT: "600.0" - PLUGIN_DAEMON_URL: http://plugin_daemon:5002 - PLUGIN_DEBUGGING_HOST: 0.0.0.0 - PLUGIN_DEBUGGING_PORT: "5003" - PLUGIN_DIFY_INNER_API_KEY: QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 - PLUGIN_DIFY_INNER_API_URL: http://api:5001 - PLUGIN_INSTALLED_PATH: plugin - PLUGIN_MAX_EXECUTION_TIMEOUT: "600" - PLUGIN_MAX_PACKAGE_SIZE: "52428800" - PLUGIN_MEDIA_CACHE_PATH: assets - PLUGIN_MODEL_SCHEMA_CACHE_TTL: "3600" - PLUGIN_PACKAGE_CACHE_PATH: plugin_packages - PLUGIN_PPROF_ENABLED: "false" - PLUGIN_PYTHON_ENV_INIT_TIMEOUT: "120" - PLUGIN_S3_ENDPOINT: "" - PLUGIN_S3_USE_AWS: "false" - PLUGIN_S3_USE_AWS_MANAGED_IAM: "false" - PLUGIN_S3_USE_PATH_STYLE: "false" - PLUGIN_SENTRY_DSN: "" - PLUGIN_SENTRY_ENABLED: "false" - PLUGIN_STDIO_BUFFER_SIZE: "1024" - PLUGIN_STDIO_MAX_BUFFER_SIZE: "5242880" - PLUGIN_STORAGE_LOCAL_ROOT: /app/storage - PLUGIN_STORAGE_OSS_BUCKET: "" - PLUGIN_STORAGE_TYPE: local - PLUGIN_TENCENT_COS_REGION: "" - PLUGIN_TENCENT_COS_SECRET_ID: "" - PLUGIN_TENCENT_COS_SECRET_KEY: "" - PLUGIN_VOLCENGINE_TOS_ACCESS_KEY: "" - PLUGIN_VOLCENGINE_TOS_ENDPOINT: "" - PLUGIN_VOLCENGINE_TOS_REGION: "" - PLUGIN_VOLCENGINE_TOS_SECRET_KEY: "" - PLUGIN_WORKING_PATH: /app/storage/cwd - POSITION_PROVIDER_EXCLUDES: "" - POSITION_PROVIDER_INCLUDES: "" - POSITION_PROVIDER_PINS: "" - POSITION_TOOL_EXCLUDES: "" - POSITION_TOOL_INCLUDES: "" - POSITION_TOOL_PINS: "" - POSTGRES_EFFECTIVE_CACHE_SIZE: 4096MB - POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT: "0" - POSTGRES_MAINTENANCE_WORK_MEM: 64MB - POSTGRES_MAX_CONNECTIONS: "100" - POSTGRES_SHARED_BUFFERS: 128MB - POSTGRES_STATEMENT_TIMEOUT: "0" - POSTGRES_WORK_MEM: 4MB - PROMPT_GENERATION_MAX_TOKENS: "512" - PYTHONIOENCODING: utf-8 - QDRANT_API_KEY: difyai123456 - QDRANT_CLIENT_TIMEOUT: "20" - QDRANT_GRPC_ENABLED: "false" - QDRANT_GRPC_PORT: "6334" - QDRANT_REPLICATION_FACTOR: "1" - QDRANT_URL: http://qdrant:6333 - QUEUE_MONITOR_ALERT_EMAILS: "" - QUEUE_MONITOR_INTERVAL: "30" - QUEUE_MONITOR_THRESHOLD: "200" - REDIS_CLUSTERS: "" - REDIS_CLUSTERS_PASSWORD: "" - REDIS_DB: "0" - REDIS_HEALTH_CHECK_INTERVAL: "30" - REDIS_HOST: redis - REDIS_KEY_PREFIX: "" - REDIS_MAX_CONNECTIONS: "" - REDIS_PASSWORD: difyai123456 - REDIS_PORT: "6379" - REDIS_RETRY_BACKOFF_BASE: "1.0" - REDIS_RETRY_BACKOFF_CAP: "10.0" - REDIS_RETRY_RETRIES: "3" - REDIS_SENTINEL_PASSWORD: "" - REDIS_SENTINEL_SERVICE_NAME: "" - REDIS_SENTINEL_SOCKET_TIMEOUT: "0.1" - REDIS_SENTINEL_USERNAME: "" - REDIS_SENTINELS: "" - REDIS_SOCKET_CONNECT_TIMEOUT: "5.0" - REDIS_SOCKET_TIMEOUT: "5.0" - REDIS_SSL_CA_CERTS: "" - REDIS_SSL_CERT_REQS: CERT_NONE - REDIS_SSL_CERTFILE: "" - REDIS_SSL_KEYFILE: "" - REDIS_USE_CLUSTERS: "false" - REDIS_USE_SENTINEL: "false" - REDIS_USE_SSL: "false" - REDIS_USERNAME: "" - REFRESH_TOKEN_EXPIRE_DAYS: "30" - RELYT_DATABASE: postgres - RELYT_HOST: db - RELYT_PASSWORD: difyai123456 - RELYT_PORT: "5432" - RELYT_USER: postgres - RESEND_API_KEY: your-resend-api-key - RESEND_API_URL: https://api.resend.com - RESET_PASSWORD_TOKEN_EXPIRY_MINUTES: "5" - RESPECT_XFORWARD_HEADERS_ENABLED: "false" - S3_ACCESS_KEY: "" - S3_ADDRESS_STYLE: auto - S3_BUCKET_NAME: difyai - S3_ENDPOINT: "" - S3_REGION: us-east-1 - S3_SECRET_KEY: "" - S3_USE_AWS_MANAGED_IAM: "false" - SANDBOX_API_KEY: dify-sandbox - SANDBOX_ENABLE_NETWORK: "true" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL: "200" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: "1000" - SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD: "21" - SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL: "90000" - SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: "30" - SANDBOX_GIN_MODE: release - SANDBOX_HTTP_PROXY: http://ssrf_proxy:3128 - SANDBOX_HTTPS_PROXY: http://ssrf_proxy:3128 - SANDBOX_PORT: "8194" - SANDBOX_WORKER_TIMEOUT: "15" - SCARF_NO_ANALYTICS: "true" - SECRET_KEY: sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U - SEEKDB_MEMORY_LIMIT: 2G - SENDGRID_API_KEY: "" - SENTRY_DSN: "" - SERVER_WORKER_AMOUNT: "1" - SERVER_WORKER_CLASS: gevent - SERVER_WORKER_CONNECTIONS: "10" - SERVICE_API_URL: "" - SINGLE_CHUNK_ATTACHMENT_LIMIT: "10" - SMTP_LOCAL_HOSTNAME: "" - SMTP_OPPORTUNISTIC_TLS: "false" - SMTP_PASSWORD: "" - SMTP_PORT: "465" - SMTP_SERVER: "" - SMTP_USE_TLS: "true" - SMTP_USERNAME: "" - SQLALCHEMY_ECHO: "false" - SQLALCHEMY_MAX_OVERFLOW: "10" - SQLALCHEMY_POOL_PRE_PING: "false" - SQLALCHEMY_POOL_RECYCLE: "3600" - SQLALCHEMY_POOL_SIZE: "30" - SQLALCHEMY_POOL_TIMEOUT: "30" - SQLALCHEMY_POOL_USE_LIFO: "false" - SSRF_COREDUMP_DIR: /var/spool/squid - SSRF_DEFAULT_CONNECT_TIME_OUT: "5" - SSRF_DEFAULT_READ_TIME_OUT: "5" - SSRF_DEFAULT_TIME_OUT: "5" - SSRF_DEFAULT_WRITE_TIME_OUT: "5" - SSRF_HTTP_PORT: "3128" - SSRF_POOL_KEEPALIVE_EXPIRY: "5.0" - SSRF_POOL_MAX_CONNECTIONS: "100" - SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - SSRF_PROXY_HTTP_URL: http://ssrf_proxy:3128 - SSRF_PROXY_HTTPS_URL: http://ssrf_proxy:3128 - SSRF_REVERSE_PROXY_PORT: "8194" - SSRF_SANDBOX_HOST: sandbox - STORAGE_TYPE: opendal - SUPABASE_API_KEY: your-access-key - SUPABASE_BUCKET_NAME: your-bucket-name - SUPABASE_URL: your-server-url - SWAGGER_UI_ENABLED: "false" - SWAGGER_UI_PATH: /swagger-ui.html - TABLESTORE_ACCESS_KEY_ID: xxx - TABLESTORE_ACCESS_KEY_SECRET: xxx - TABLESTORE_ENDPOINT: https://instance-name.cn-hangzhou.ots.aliyuncs.com - TABLESTORE_INSTANCE_NAME: instance-name - TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE: "false" - TEMPLATE_TRANSFORM_MAX_LENGTH: "400000" - TENANT_ISOLATED_TASK_CONCURRENCY: "1" - TENCENT_COS_BUCKET_NAME: your-bucket-name - TENCENT_COS_CUSTOM_DOMAIN: your-custom-domain - TENCENT_COS_REGION: your-region - TENCENT_COS_SCHEME: your-scheme - TENCENT_COS_SECRET_ID: your-secret-id - TENCENT_COS_SECRET_KEY: your-secret-key - TENCENT_VECTOR_DB_API_KEY: dify - TENCENT_VECTOR_DB_DATABASE: dify - TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH: "false" - TENCENT_VECTOR_DB_REPLICAS: "2" - TENCENT_VECTOR_DB_SHARD: "1" - TENCENT_VECTOR_DB_TIMEOUT: "30" - TENCENT_VECTOR_DB_URL: http://127.0.0.1 - TENCENT_VECTOR_DB_USERNAME: dify - TEXT_GENERATION_TIMEOUT_MS: "60000" - TIDB_API_URL: http://127.0.0.1 - TIDB_IAM_API_URL: http://127.0.0.1 - TIDB_ON_QDRANT_API_KEY: dify - TIDB_ON_QDRANT_CLIENT_TIMEOUT: "20" - TIDB_ON_QDRANT_GRPC_ENABLED: "false" - TIDB_ON_QDRANT_GRPC_PORT: "6334" - TIDB_ON_QDRANT_URL: http://127.0.0.1 - TIDB_PRIVATE_KEY: dify - TIDB_PROJECT_ID: dify - TIDB_PUBLIC_KEY: dify - TIDB_REGION: regions/aws-us-east-1 - TIDB_SPEND_LIMIT: "100" - TIDB_VECTOR_DATABASE: dify - TIDB_VECTOR_HOST: tidb - TIDB_VECTOR_PASSWORD: "" - TIDB_VECTOR_PORT: "4000" - TIDB_VECTOR_USER: "" - TOP_K_MAX_VALUE: "10" - TRIGGER_URL: http://localhost - UNSTRUCTURED_API_KEY: "" - UNSTRUCTURED_API_URL: "" - UPLOAD_AUDIO_FILE_SIZE_LIMIT: "50" - UPLOAD_FILE_BATCH_LIMIT: "5" - UPLOAD_FILE_EXTENSION_BLACKLIST: "" - UPLOAD_FILE_SIZE_LIMIT: "15" - UPLOAD_IMAGE_FILE_SIZE_LIMIT: "10" - UPLOAD_VIDEO_FILE_SIZE_LIMIT: "100" - UPSTASH_VECTOR_TOKEN: dify - UPSTASH_VECTOR_URL: https://xxx-vector.upstash.io - UV_CACHE_DIR: /tmp/.uv-cache - VASTBASE_DATABASE: dify - VASTBASE_HOST: vastbase - VASTBASE_MAX_CONNECTION: "5" - VASTBASE_MIN_CONNECTION: "1" - VASTBASE_PASSWORD: Difyai123456 - VASTBASE_PORT: "5432" - VASTBASE_USER: dify - VECTOR_INDEX_NAME_PREFIX: Vector_index - VECTOR_STORE: weaviate - VIKINGDB_ACCESS_KEY: your-ak - VIKINGDB_CONNECTION_TIMEOUT: "30" - VIKINGDB_HOST: api-vikingdb.xxx.volces.com - VIKINGDB_REGION: cn-shanghai - VIKINGDB_SCHEMA: http - VIKINGDB_SECRET_KEY: your-sk - VIKINGDB_SOCKET_TIMEOUT: "30" - VOLCENGINE_TOS_ACCESS_KEY: your-access-key - VOLCENGINE_TOS_BUCKET_NAME: your-bucket-name - VOLCENGINE_TOS_ENDPOINT: your-server-url - VOLCENGINE_TOS_REGION: your-region - VOLCENGINE_TOS_SECRET_KEY: your-secret-key - WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_APIKEY_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_USERS: hello@dify.ai - WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED: "true" - WEAVIATE_AUTHORIZATION_ADMINLIST_USERS: hello@dify.ai - WEAVIATE_CLUSTER_HOSTNAME: node1 - WEAVIATE_DEFAULT_VECTORIZER_MODULE: none - WEAVIATE_DISABLE_TELEMETRY: "false" - WEAVIATE_ENABLE_TOKENIZER_GSE: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR: "false" - WEAVIATE_ENDPOINT: http://weaviate:8080 - WEAVIATE_GRPC_ENDPOINT: grpc://weaviate:50051 - WEAVIATE_PERSISTENCE_DATA_PATH: /var/lib/weaviate - WEAVIATE_QUERY_DEFAULTS_LIMIT: "25" - WEAVIATE_TOKENIZATION: word - WEB_API_CORS_ALLOW_ORIGINS: '*' - WEB_SENTRY_DSN: "" - WEBHOOK_REQUEST_BODY_MAX_SIZE: "10485760" - WORKFLOW_CALL_MAX_DEPTH: "5" - WORKFLOW_FILE_UPLOAD_LIMIT: "10" - WORKFLOW_LOG_CLEANUP_BATCH_SIZE: "100" - WORKFLOW_LOG_CLEANUP_ENABLED: "false" - WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS: "" - WORKFLOW_LOG_RETENTION_DAYS: "30" - WORKFLOW_MAX_EXECUTION_STEPS: "500" - WORKFLOW_MAX_EXECUTION_TIME: "1200" - WORKFLOW_NODE_EXECUTION_STORAGE: rdbms - WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK: "0" - WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE: "100" - WORKFLOW_SCHEDULE_POLLER_INTERVAL: "1" - healthcheck: - test: - - CMD-SHELL - - celery -A celery_healthcheck.celery inspect ping - timeout: 30s - interval: 30s - retries: 3 - start_period: 1m0s - disable: true - image: langgenius/dify-api:1.13.3 - networks: - default: null - ssrf_proxy_network: null - restart: always -networks: - default: - name: docker_default - ssrf_proxy_network: - name: docker_ssrf_proxy_network - driver: bridge - internal: true -x-shared-env: - ACCESS_TOKEN_EXPIRE_MINUTES: "600" - ALIBABACLOUD_MYSQL_DATABASE: dify - ALIBABACLOUD_MYSQL_HNSW_M: "6" - ALIBABACLOUD_MYSQL_HOST: 127.0.0.1 - ALIBABACLOUD_MYSQL_MAX_CONNECTION: "5" - ALIBABACLOUD_MYSQL_PASSWORD: difyai123456 - ALIBABACLOUD_MYSQL_PORT: "3306" - ALIBABACLOUD_MYSQL_USER: root - ALIYUN_OSS_ACCESS_KEY: your-access-key - ALIYUN_OSS_AUTH_VERSION: v4 - ALIYUN_OSS_BUCKET_NAME: your-bucket-name - ALIYUN_OSS_ENDPOINT: https://oss-ap-southeast-1-internal.aliyuncs.com - ALIYUN_OSS_PATH: your-path - ALIYUN_OSS_REGION: ap-southeast-1 - ALIYUN_OSS_SECRET_KEY: your-secret-key - ALIYUN_SLS_ACCESS_KEY_ID: "" - ALIYUN_SLS_ACCESS_KEY_SECRET: "" - ALIYUN_SLS_ENDPOINT: "" - ALIYUN_SLS_LOGSTORE_TTL: "365" - ALIYUN_SLS_PROJECT_NAME: "" - ALIYUN_SLS_REGION: "" - ALLOW_EMBED: "false" - ALLOW_INLINE_STYLES: "false" - ALLOW_UNSAFE_DATA_SCHEME: "false" - AMPLITUDE_API_KEY: "" - ANALYTICDB_ACCOUNT: testaccount - ANALYTICDB_HOST: gp-test.aliyuncs.com - ANALYTICDB_INSTANCE_ID: gp-ab123456 - ANALYTICDB_KEY_ID: your-ak - ANALYTICDB_KEY_SECRET: your-sk - ANALYTICDB_MAX_CONNECTION: "5" - ANALYTICDB_MIN_CONNECTION: "1" - ANALYTICDB_NAMESPACE: dify - ANALYTICDB_NAMESPACE_PASSWORD: difypassword - ANALYTICDB_PASSWORD: testpassword - ANALYTICDB_PORT: "5432" - ANALYTICDB_REGION_ID: cn-hangzhou - ANNOTATION_IMPORT_FILE_SIZE_LIMIT: "2" - ANNOTATION_IMPORT_MAX_CONCURRENT: "5" - ANNOTATION_IMPORT_MAX_RECORDS: "10000" - ANNOTATION_IMPORT_MIN_RECORDS: "1" - ANNOTATION_IMPORT_RATE_LIMIT_PER_HOUR: "20" - ANNOTATION_IMPORT_RATE_LIMIT_PER_MINUTE: "5" - API_SENTRY_DSN: "" - API_SENTRY_PROFILES_SAMPLE_RATE: "1.0" - API_SENTRY_TRACES_SAMPLE_RATE: "1.0" - API_TOOL_DEFAULT_CONNECT_TIMEOUT: "10" - API_TOOL_DEFAULT_READ_TIMEOUT: "60" - API_WORKFLOW_NODE_EXECUTION_REPOSITORY: repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository - API_WORKFLOW_RUN_REPOSITORY: repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository - APP_API_URL: "" - APP_DEFAULT_ACTIVE_REQUESTS: "0" - APP_MAX_ACTIVE_REQUESTS: "0" - APP_MAX_EXECUTION_TIME: "1200" - APP_WEB_URL: "" - ARCHIVE_STORAGE_ACCESS_KEY: "" - ARCHIVE_STORAGE_ARCHIVE_BUCKET: "" - ARCHIVE_STORAGE_ENABLED: "false" - ARCHIVE_STORAGE_ENDPOINT: "" - ARCHIVE_STORAGE_EXPORT_BUCKET: "" - ARCHIVE_STORAGE_REGION: auto - ARCHIVE_STORAGE_SECRET_KEY: "" - ATTACHMENT_IMAGE_DOWNLOAD_TIMEOUT: "60" - ATTACHMENT_IMAGE_FILE_SIZE_LIMIT: "2" - AZURE_BLOB_ACCOUNT_KEY: difyai - AZURE_BLOB_ACCOUNT_NAME: difyai - AZURE_BLOB_ACCOUNT_URL: https://.blob.core.windows.net - AZURE_BLOB_CONTAINER_NAME: difyai-container - BAIDU_OBS_ACCESS_KEY: your-access-key - BAIDU_OBS_BUCKET_NAME: your-bucket-name - BAIDU_OBS_ENDPOINT: your-server-url - BAIDU_OBS_SECRET_KEY: your-secret-key - BAIDU_VECTOR_DB_ACCOUNT: root - BAIDU_VECTOR_DB_API_KEY: dify - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT: "500" - BAIDU_VECTOR_DB_AUTO_BUILD_ROW_COUNT_INCREMENT_RATIO: "0.05" - BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS: "30000" - BAIDU_VECTOR_DB_DATABASE: dify - BAIDU_VECTOR_DB_ENDPOINT: http://127.0.0.1:5287 - BAIDU_VECTOR_DB_INVERTED_INDEX_ANALYZER: DEFAULT_ANALYZER - BAIDU_VECTOR_DB_INVERTED_INDEX_PARSER_MODE: COARSE_MODE - BAIDU_VECTOR_DB_REBUILD_INDEX_TIMEOUT_IN_SECONDS: "300" - BAIDU_VECTOR_DB_REPLICAS: "3" - BAIDU_VECTOR_DB_SHARD: "1" - BROKER_USE_SSL: "false" - CELERY_AUTO_SCALE: "false" - CELERY_BACKEND: redis - CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1 - CELERY_MAX_WORKERS: "" - CELERY_MIN_WORKERS: "" - CELERY_SENTINEL_MASTER_NAME: "" - CELERY_SENTINEL_PASSWORD: "" - CELERY_SENTINEL_SOCKET_TIMEOUT: "0.1" - CELERY_TASK_ANNOTATIONS: "null" - CELERY_USE_SENTINEL: "false" - CELERY_WORKER_AMOUNT: "4" - CELERY_WORKER_CLASS: "" - CERTBOT_DOMAIN: your_domain.com - CERTBOT_EMAIL: your_email@example.com - CERTBOT_OPTIONS: "" - CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES: "5" - CHECK_UPDATE_URL: https://updates.dify.ai - CHROMA_AUTH_CREDENTIALS: "" - CHROMA_AUTH_PROVIDER: chromadb.auth.token_authn.TokenAuthClientProvider - CHROMA_DATABASE: default_database - CHROMA_HOST: 127.0.0.1 - CHROMA_IS_PERSISTENT: "TRUE" - CHROMA_PORT: "8000" - CHROMA_SERVER_AUTHN_CREDENTIALS: difyai123456 - CHROMA_SERVER_AUTHN_PROVIDER: chromadb.auth.token_authn.TokenAuthenticationServerProvider - CHROMA_TENANT: default_tenant - CLICKZETTA_ANALYZER_MODE: smart - CLICKZETTA_ANALYZER_TYPE: chinese - CLICKZETTA_BATCH_SIZE: "100" - CLICKZETTA_ENABLE_INVERTED_INDEX: "true" - CLICKZETTA_INSTANCE: "" - CLICKZETTA_PASSWORD: "" - CLICKZETTA_SCHEMA: dify - CLICKZETTA_SERVICE: api.clickzetta.com - CLICKZETTA_USERNAME: "" - CLICKZETTA_VCLUSTER: default_ap - CLICKZETTA_VECTOR_DISTANCE_FUNCTION: cosine_distance - CLICKZETTA_VOLUME_DIFY_PREFIX: dify_km - CLICKZETTA_VOLUME_NAME: "" - CLICKZETTA_VOLUME_TABLE_PREFIX: dataset_ - CLICKZETTA_VOLUME_TYPE: user - CLICKZETTA_WORKSPACE: quick_start - CODE_EXECUTION_API_KEY: dify-sandbox - CODE_EXECUTION_CONNECT_TIMEOUT: "10" - CODE_EXECUTION_ENDPOINT: http://sandbox:8194 - CODE_EXECUTION_POOL_KEEPALIVE_EXPIRY: "5.0" - CODE_EXECUTION_POOL_MAX_CONNECTIONS: "100" - CODE_EXECUTION_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - CODE_EXECUTION_READ_TIMEOUT: "60" - CODE_EXECUTION_SSL_VERIFY: "True" - CODE_EXECUTION_WRITE_TIMEOUT: "10" - CODE_GENERATION_MAX_TOKENS: "1024" - CODE_MAX_DEPTH: "5" - CODE_MAX_NUMBER: "9223372036854775807" - CODE_MAX_NUMBER_ARRAY_LENGTH: "1000" - CODE_MAX_OBJECT_ARRAY_LENGTH: "30" - CODE_MAX_PRECISION: "20" - CODE_MAX_STRING_ARRAY_LENGTH: "30" - CODE_MAX_STRING_LENGTH: "400000" - CODE_MIN_NUMBER: "-9223372036854775808" - CONSOLE_API_URL: "" - CONSOLE_API_URL_NEW: "" - CONSOLE_CORS_ALLOW_ORIGINS: '*' - CONSOLE_WEB_URL: "" - COOKIE_DOMAIN: "" - CORE_WORKFLOW_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository - CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY: core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository - COUCHBASE_BUCKET_NAME: Embeddings - COUCHBASE_CONNECTION_STRING: couchbase://couchbase-server - COUCHBASE_PASSWORD: password - COUCHBASE_SCOPE_NAME: _default - COUCHBASE_USER: Administrator - CREATE_TIDB_SERVICE_JOB_ENABLED: "false" - CSP_WHITELIST: "" - DATASET_MAX_SEGMENTS_PER_REQUEST: "0" - DB_DATABASE: dify - DB_HOST: db_postgres - DB_PASSWORD: difyai123456 - DB_PLUGIN_DATABASE: dify_plugin - DB_PORT: "5432" - DB_TYPE: postgresql - DB_USERNAME: postgres - DEBUG: "false" - DEPLOY_ENV: PRODUCTION - DIFY_BIND_ADDRESS: 0.0.0.0 - DIFY_PORT: "5001" - DSL_EXPORT_ENCRYPT_DATASET_ID: "true" - ELASTICSEARCH_API_KEY: YOUR-ELASTICSEARCH_API_KEY - ELASTICSEARCH_CA_CERTS: "" - ELASTICSEARCH_CLOUD_URL: YOUR-ELASTICSEARCH_CLOUD_URL - ELASTICSEARCH_HOST: 0.0.0.0 - ELASTICSEARCH_MAX_RETRIES: "10" - ELASTICSEARCH_PASSWORD: elastic - ELASTICSEARCH_PORT: "9200" - ELASTICSEARCH_REQUEST_TIMEOUT: "100000" - ELASTICSEARCH_RETRY_ON_TIMEOUT: "True" - ELASTICSEARCH_USE_CLOUD: "false" - ELASTICSEARCH_USERNAME: elastic - ELASTICSEARCH_VERIFY_CERTS: "False" - EMAIL_REGISTER_TOKEN_EXPIRY_MINUTES: "5" - ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK: "true" - ENABLE_CLEAN_EMBEDDING_CACHE_TASK: "false" - ENABLE_CLEAN_MESSAGES: "false" - ENABLE_CLEAN_UNUSED_DATASETS_TASK: "false" - ENABLE_COLLABORATION_MODE: "false" - ENABLE_CREATE_TIDB_SERVERLESS_TASK: "false" - ENABLE_DATASETS_QUEUE_MONITOR: "false" - ENABLE_HUMAN_INPUT_TIMEOUT_TASK: "true" - ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK: "false" - ENABLE_OTEL: "false" - ENABLE_REQUEST_LOGGING: "False" - ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK: "false" - ENABLE_WEBSITE_FIRECRAWL: "true" - ENABLE_WEBSITE_JINAREADER: "true" - ENABLE_WEBSITE_WATERCRAWL: "true" - ENABLE_WORKFLOW_RUN_CLEANUP_TASK: "false" - ENABLE_WORKFLOW_SCHEDULE_POLLER_TASK: "true" - ENDPOINT_URL_TEMPLATE: http://localhost/e/{hook_id} - ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES: "true" - ETCD_AUTO_COMPACTION_MODE: revision - ETCD_AUTO_COMPACTION_RETENTION: "1000" - ETCD_ENDPOINTS: etcd:2379 - ETCD_QUOTA_BACKEND_BYTES: "4294967296" - ETCD_SNAPSHOT_COUNT: "50000" - ETL_TYPE: dify - EVENT_BUS_REDIS_CHANNEL_TYPE: pubsub - EVENT_BUS_REDIS_URL: "" - EVENT_BUS_REDIS_USE_CLUSTERS: "false" - EXPERIMENTAL_ENABLE_VINEXT: "false" - EXPOSE_NGINX_PORT: "80" - EXPOSE_NGINX_SSL_PORT: "443" - EXPOSE_PLUGIN_DAEMON_PORT: "5002" - EXPOSE_PLUGIN_DEBUGGING_HOST: localhost - EXPOSE_PLUGIN_DEBUGGING_PORT: "5003" - FILES_ACCESS_TIMEOUT: "300" - FILES_URL: "" - FLASK_DEBUG: "false" - FORCE_VERIFYING_SIGNATURE: "true" - GOOGLE_STORAGE_BUCKET_NAME: your-bucket-name - GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: "" - GRAPH_ENGINE_MAX_WORKERS: "10" - GRAPH_ENGINE_MIN_WORKERS: "1" - GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME: "5.0" - GRAPH_ENGINE_SCALE_UP_THRESHOLD: "3" - GUNICORN_TIMEOUT: "360" - HOLOGRES_ACCESS_KEY_ID: "" - HOLOGRES_ACCESS_KEY_SECRET: "" - HOLOGRES_BASE_QUANTIZATION_TYPE: rabitq - HOLOGRES_DATABASE: "" - HOLOGRES_DISTANCE_METHOD: Cosine - HOLOGRES_EF_CONSTRUCTION: "400" - HOLOGRES_HOST: "" - HOLOGRES_MAX_DEGREE: "64" - HOLOGRES_PORT: "80" - HOLOGRES_SCHEMA: public - HOLOGRES_TOKENIZER: jieba - HTTP_REQUEST_MAX_CONNECT_TIMEOUT: "10" - HTTP_REQUEST_MAX_READ_TIMEOUT: "600" - HTTP_REQUEST_MAX_WRITE_TIMEOUT: "600" - HTTP_REQUEST_NODE_MAX_BINARY_SIZE: "10485760" - HTTP_REQUEST_NODE_MAX_TEXT_SIZE: "1048576" - HTTP_REQUEST_NODE_SSL_VERIFY: "True" - HUAWEI_CLOUD_HOSTS: https://127.0.0.1:9200 - HUAWEI_CLOUD_PASSWORD: admin - HUAWEI_CLOUD_USER: admin - HUAWEI_OBS_ACCESS_KEY: your-access-key - HUAWEI_OBS_BUCKET_NAME: your-bucket-name - HUAWEI_OBS_PATH_STYLE: "false" - HUAWEI_OBS_SECRET_KEY: your-secret-key - HUAWEI_OBS_SERVER: your-server-url - HUMAN_INPUT_TIMEOUT_TASK_INTERVAL: "1" - IMAGE_FILE_BATCH_LIMIT: "10" - INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: "4000" - INIT_PASSWORD: "" - INTERNAL_FILES_URL: "" - INVITE_EXPIRY_HOURS: "72" - IRIS_CONNECTION_URL: "" - IRIS_DATABASE: USER - IRIS_HOST: iris - IRIS_MAX_CONNECTION: "3" - IRIS_MIN_CONNECTION: "1" - IRIS_PASSWORD: Dify@1234 - IRIS_SCHEMA: dify - IRIS_SUPER_SERVER_PORT: "1972" - IRIS_TEXT_INDEX: "true" - IRIS_TEXT_INDEX_LANGUAGE: en - IRIS_TIMEZONE: UTC - IRIS_USER: _SYSTEM - IRIS_WEB_SERVER_PORT: "52773" - KIBANA_PORT: "5601" - LANG: C.UTF-8 - LC_ALL: C.UTF-8 - LINDORM_PASSWORD: admin - LINDORM_QUERY_TIMEOUT: "1" - LINDORM_URL: http://localhost:30070 - LINDORM_USERNAME: admin - LINDORM_USING_UGC: "True" - LOG_DATEFORMAT: '%Y-%m-%d %H:%M:%S' - LOG_FILE: /app/logs/server.log - LOG_FILE_BACKUP_COUNT: "5" - LOG_FILE_MAX_SIZE: "20" - LOG_LEVEL: INFO - LOG_OUTPUT_FORMAT: text - LOG_TZ: UTC - LOGSTORE_DUAL_READ_ENABLED: "true" - LOGSTORE_DUAL_WRITE_ENABLED: "false" - LOGSTORE_ENABLE_PUT_GRAPH_FIELD: "true" - LOOP_NODE_MAX_COUNT: "100" - MAIL_DEFAULT_SEND_FROM: "" - MAIL_TYPE: resend - MARKETPLACE_API_URL: https://marketplace.dify.ai - MARKETPLACE_ENABLED: "true" - MATRIXONE_DATABASE: dify - MATRIXONE_HOST: matrixone - MATRIXONE_PASSWORD: "111" - MATRIXONE_PORT: "6001" - MATRIXONE_USER: dump - MAX_ITERATIONS_NUM: "99" - MAX_PARALLEL_LIMIT: "10" - MAX_SUBMIT_COUNT: "100" - MAX_TOOLS_NUM: "10" - MAX_TREE_DEPTH: "50" - MAX_VARIABLE_SIZE: "204800" - MIGRATION_ENABLED: "true" - MILVUS_ANALYZER_PARAMS: "" - MILVUS_AUTHORIZATION_ENABLED: "true" - MILVUS_DATABASE: "" - MILVUS_ENABLE_HYBRID_SEARCH: "False" - MILVUS_PASSWORD: "" - MILVUS_TOKEN: "" - MILVUS_URI: http://host.docker.internal:19530 - MILVUS_USER: "" - MINIO_ACCESS_KEY: minioadmin - MINIO_ADDRESS: minio:9000 - MINIO_SECRET_KEY: minioadmin - MULTIMODAL_SEND_FORMAT: base64 - MYSCALE_DATABASE: dify - MYSCALE_FTS_PARAMS: "" - MYSCALE_HOST: myscale - MYSCALE_PASSWORD: "" - MYSCALE_PORT: "8123" - MYSCALE_USER: default - MYSQL_HOST_VOLUME: ./volumes/mysql/data - MYSQL_INNODB_BUFFER_POOL_SIZE: 512M - MYSQL_INNODB_FLUSH_LOG_AT_TRX_COMMIT: "2" - MYSQL_INNODB_LOG_FILE_SIZE: 128M - MYSQL_MAX_CONNECTIONS: "1000" - NEXT_PUBLIC_BATCH_CONCURRENCY: "5" - NEXT_PUBLIC_COOKIE_DOMAIN: "" - NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX: "false" - NEXT_PUBLIC_SOCKET_URL: ws://localhost - NGINX_CLIENT_MAX_BODY_SIZE: 100M - NGINX_ENABLE_CERTBOT_CHALLENGE: "false" - NGINX_HTTPS_ENABLED: "false" - NGINX_KEEPALIVE_TIMEOUT: "65" - NGINX_PORT: "80" - NGINX_PROXY_READ_TIMEOUT: 3600s - NGINX_PROXY_SEND_TIMEOUT: 3600s - NGINX_SERVER_NAME: _ - NGINX_SSL_CERT_FILENAME: dify.crt - NGINX_SSL_CERT_KEY_FILENAME: dify.key - NGINX_SSL_PORT: "443" - NGINX_SSL_PROTOCOLS: TLSv1.2 TLSv1.3 - NGINX_WORKER_PROCESSES: auto - NOTION_CLIENT_ID: "" - NOTION_CLIENT_SECRET: "" - NOTION_INTEGRATION_TYPE: public - NOTION_INTERNAL_SECRET: "" - OCEANBASE_CLUSTER_NAME: difyai - OCEANBASE_ENABLE_HYBRID_SEARCH: "false" - OCEANBASE_FULLTEXT_PARSER: ik - OCEANBASE_MEMORY_LIMIT: 6G - OCEANBASE_VECTOR_DATABASE: test - OCEANBASE_VECTOR_HOST: oceanbase - OCEANBASE_VECTOR_PASSWORD: difyai123456 - OCEANBASE_VECTOR_PORT: "2881" - OCEANBASE_VECTOR_USER: root@test - OCI_ACCESS_KEY: your-access-key - OCI_BUCKET_NAME: your-bucket-name - OCI_ENDPOINT: https://your-object-storage-namespace.compat.objectstorage.us-ashburn-1.oraclecloud.com - OCI_REGION: us-ashburn-1 - OCI_SECRET_KEY: your-secret-key - OPENAI_API_BASE: https://api.openai.com/v1 - OPENDAL_FS_ROOT: storage - OPENDAL_SCHEME: fs - OPENGAUSS_DATABASE: dify - OPENGAUSS_ENABLE_PQ: "false" - OPENGAUSS_HOST: opengauss - OPENGAUSS_MAX_CONNECTION: "5" - OPENGAUSS_MIN_CONNECTION: "1" - OPENGAUSS_PASSWORD: Dify@123 - OPENGAUSS_PORT: "6600" - OPENGAUSS_USER: postgres - OPENSEARCH_AUTH_METHOD: basic - OPENSEARCH_AWS_REGION: ap-southeast-1 - OPENSEARCH_AWS_SERVICE: aoss - OPENSEARCH_BOOTSTRAP_MEMORY_LOCK: "true" - OPENSEARCH_DISCOVERY_TYPE: single-node - OPENSEARCH_HOST: opensearch - OPENSEARCH_INITIAL_ADMIN_PASSWORD: Qazwsxedc!@#123 - OPENSEARCH_JAVA_OPTS_MAX: 1024m - OPENSEARCH_JAVA_OPTS_MIN: 512m - OPENSEARCH_MEMLOCK_HARD: "-1" - OPENSEARCH_MEMLOCK_SOFT: "-1" - OPENSEARCH_NOFILE_HARD: "65536" - OPENSEARCH_NOFILE_SOFT: "65536" - OPENSEARCH_PASSWORD: admin - OPENSEARCH_PORT: "9200" - OPENSEARCH_SECURE: "true" - OPENSEARCH_USER: admin - OPENSEARCH_VERIFY_CERTS: "true" - ORACLE_CHARACTERSET: AL32UTF8 - ORACLE_CONFIG_DIR: /app/api/storage/wallet - ORACLE_DSN: oracle:1521/FREEPDB1 - ORACLE_IS_AUTONOMOUS: "false" - ORACLE_PASSWORD: dify - ORACLE_PWD: Dify123456 - ORACLE_USER: dify - ORACLE_WALLET_LOCATION: /app/api/storage/wallet - ORACLE_WALLET_PASSWORD: dify - OTEL_BATCH_EXPORT_SCHEDULE_DELAY: "5000" - OTEL_BATCH_EXPORT_TIMEOUT: "10000" - OTEL_EXPORTER_OTLP_PROTOCOL: "" - OTEL_EXPORTER_TYPE: otlp - OTEL_MAX_EXPORT_BATCH_SIZE: "512" - OTEL_MAX_QUEUE_SIZE: "2048" - OTEL_METRIC_EXPORT_INTERVAL: "60000" - OTEL_METRIC_EXPORT_TIMEOUT: "30000" - OTEL_SAMPLING_RATE: "0.1" - OTLP_API_KEY: "" - OTLP_BASE_ENDPOINT: http://localhost:4318 - OTLP_METRIC_ENDPOINT: "" - OTLP_TRACE_ENDPOINT: "" - OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES: "5" - PGDATA: /var/lib/postgresql/data/pgdata - PGVECTO_RS_DATABASE: dify - PGVECTO_RS_HOST: pgvecto-rs - PGVECTO_RS_PASSWORD: difyai123456 - PGVECTO_RS_PORT: "5432" - PGVECTO_RS_USER: postgres - PGVECTOR_DATABASE: dify - PGVECTOR_HOST: pgvector - PGVECTOR_MAX_CONNECTION: "5" - PGVECTOR_MIN_CONNECTION: "1" - PGVECTOR_PASSWORD: difyai123456 - PGVECTOR_PG_BIGM: "false" - PGVECTOR_PG_BIGM_VERSION: 1.2-20240606 - PGVECTOR_PGDATA: /var/lib/postgresql/data/pgdata - PGVECTOR_PGUSER: postgres - PGVECTOR_PORT: "5432" - PGVECTOR_POSTGRES_DB: dify - PGVECTOR_POSTGRES_PASSWORD: difyai123456 - PGVECTOR_USER: postgres - PIP_MIRROR_URL: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_ID: "" - PLUGIN_ALIYUN_OSS_ACCESS_KEY_SECRET: "" - PLUGIN_ALIYUN_OSS_AUTH_VERSION: v4 - PLUGIN_ALIYUN_OSS_ENDPOINT: "" - PLUGIN_ALIYUN_OSS_PATH: "" - PLUGIN_ALIYUN_OSS_REGION: "" - PLUGIN_AWS_ACCESS_KEY: "" - PLUGIN_AWS_REGION: "" - PLUGIN_AWS_SECRET_KEY: "" - PLUGIN_AZURE_BLOB_STORAGE_CONNECTION_STRING: "" - PLUGIN_AZURE_BLOB_STORAGE_CONTAINER_NAME: "" - PLUGIN_BASED_TOKEN_COUNTING_ENABLED: "false" - PLUGIN_DAEMON_KEY: lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi - PLUGIN_DAEMON_PORT: "5002" - PLUGIN_DAEMON_TIMEOUT: "600.0" - PLUGIN_DAEMON_URL: http://plugin_daemon:5002 - PLUGIN_DEBUGGING_HOST: 0.0.0.0 - PLUGIN_DEBUGGING_PORT: "5003" - PLUGIN_DIFY_INNER_API_KEY: QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 - PLUGIN_DIFY_INNER_API_URL: http://api:5001 - PLUGIN_INSTALLED_PATH: plugin - PLUGIN_MAX_EXECUTION_TIMEOUT: "600" - PLUGIN_MAX_PACKAGE_SIZE: "52428800" - PLUGIN_MEDIA_CACHE_PATH: assets - PLUGIN_MODEL_SCHEMA_CACHE_TTL: "3600" - PLUGIN_PACKAGE_CACHE_PATH: plugin_packages - PLUGIN_PPROF_ENABLED: "false" - PLUGIN_PYTHON_ENV_INIT_TIMEOUT: "120" - PLUGIN_S3_ENDPOINT: "" - PLUGIN_S3_USE_AWS: "false" - PLUGIN_S3_USE_AWS_MANAGED_IAM: "false" - PLUGIN_S3_USE_PATH_STYLE: "false" - PLUGIN_SENTRY_DSN: "" - PLUGIN_SENTRY_ENABLED: "false" - PLUGIN_STDIO_BUFFER_SIZE: "1024" - PLUGIN_STDIO_MAX_BUFFER_SIZE: "5242880" - PLUGIN_STORAGE_LOCAL_ROOT: /app/storage - PLUGIN_STORAGE_OSS_BUCKET: "" - PLUGIN_STORAGE_TYPE: local - PLUGIN_TENCENT_COS_REGION: "" - PLUGIN_TENCENT_COS_SECRET_ID: "" - PLUGIN_TENCENT_COS_SECRET_KEY: "" - PLUGIN_VOLCENGINE_TOS_ACCESS_KEY: "" - PLUGIN_VOLCENGINE_TOS_ENDPOINT: "" - PLUGIN_VOLCENGINE_TOS_REGION: "" - PLUGIN_VOLCENGINE_TOS_SECRET_KEY: "" - PLUGIN_WORKING_PATH: /app/storage/cwd - POSITION_PROVIDER_EXCLUDES: "" - POSITION_PROVIDER_INCLUDES: "" - POSITION_PROVIDER_PINS: "" - POSITION_TOOL_EXCLUDES: "" - POSITION_TOOL_INCLUDES: "" - POSITION_TOOL_PINS: "" - POSTGRES_EFFECTIVE_CACHE_SIZE: 4096MB - POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT: "0" - POSTGRES_MAINTENANCE_WORK_MEM: 64MB - POSTGRES_MAX_CONNECTIONS: "100" - POSTGRES_SHARED_BUFFERS: 128MB - POSTGRES_STATEMENT_TIMEOUT: "0" - POSTGRES_WORK_MEM: 4MB - PROMPT_GENERATION_MAX_TOKENS: "512" - PYTHONIOENCODING: utf-8 - QDRANT_API_KEY: difyai123456 - QDRANT_CLIENT_TIMEOUT: "20" - QDRANT_GRPC_ENABLED: "false" - QDRANT_GRPC_PORT: "6334" - QDRANT_REPLICATION_FACTOR: "1" - QDRANT_URL: http://qdrant:6333 - QUEUE_MONITOR_ALERT_EMAILS: "" - QUEUE_MONITOR_INTERVAL: "30" - QUEUE_MONITOR_THRESHOLD: "200" - REDIS_CLUSTERS: "" - REDIS_CLUSTERS_PASSWORD: "" - REDIS_DB: "0" - REDIS_HEALTH_CHECK_INTERVAL: "30" - REDIS_HOST: redis - REDIS_KEY_PREFIX: "" - REDIS_MAX_CONNECTIONS: "" - REDIS_PASSWORD: difyai123456 - REDIS_PORT: "6379" - REDIS_RETRY_BACKOFF_BASE: "1.0" - REDIS_RETRY_BACKOFF_CAP: "10.0" - REDIS_RETRY_RETRIES: "3" - REDIS_SENTINEL_PASSWORD: "" - REDIS_SENTINEL_SERVICE_NAME: "" - REDIS_SENTINEL_SOCKET_TIMEOUT: "0.1" - REDIS_SENTINEL_USERNAME: "" - REDIS_SENTINELS: "" - REDIS_SOCKET_CONNECT_TIMEOUT: "5.0" - REDIS_SOCKET_TIMEOUT: "5.0" - REDIS_SSL_CA_CERTS: "" - REDIS_SSL_CERT_REQS: CERT_NONE - REDIS_SSL_CERTFILE: "" - REDIS_SSL_KEYFILE: "" - REDIS_USE_CLUSTERS: "false" - REDIS_USE_SENTINEL: "false" - REDIS_USE_SSL: "false" - REDIS_USERNAME: "" - REFRESH_TOKEN_EXPIRE_DAYS: "30" - RELYT_DATABASE: postgres - RELYT_HOST: db - RELYT_PASSWORD: difyai123456 - RELYT_PORT: "5432" - RELYT_USER: postgres - RESEND_API_KEY: your-resend-api-key - RESEND_API_URL: https://api.resend.com - RESET_PASSWORD_TOKEN_EXPIRY_MINUTES: "5" - RESPECT_XFORWARD_HEADERS_ENABLED: "false" - S3_ACCESS_KEY: "" - S3_ADDRESS_STYLE: auto - S3_BUCKET_NAME: difyai - S3_ENDPOINT: "" - S3_REGION: us-east-1 - S3_SECRET_KEY: "" - S3_USE_AWS_MANAGED_IAM: "false" - SANDBOX_API_KEY: dify-sandbox - SANDBOX_ENABLE_NETWORK: "true" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL: "200" - SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: "1000" - SANDBOX_EXPIRED_RECORDS_CLEAN_GRACEFUL_PERIOD: "21" - SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL: "90000" - SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: "30" - SANDBOX_GIN_MODE: release - SANDBOX_HTTP_PROXY: http://ssrf_proxy:3128 - SANDBOX_HTTPS_PROXY: http://ssrf_proxy:3128 - SANDBOX_PORT: "8194" - SANDBOX_WORKER_TIMEOUT: "15" - SCARF_NO_ANALYTICS: "true" - SECRET_KEY: sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U - SEEKDB_MEMORY_LIMIT: 2G - SENDGRID_API_KEY: "" - SENTRY_DSN: "" - SERVER_WORKER_AMOUNT: "1" - SERVER_WORKER_CLASS: gevent - SERVER_WORKER_CONNECTIONS: "10" - SERVICE_API_URL: "" - SINGLE_CHUNK_ATTACHMENT_LIMIT: "10" - SMTP_LOCAL_HOSTNAME: "" - SMTP_OPPORTUNISTIC_TLS: "false" - SMTP_PASSWORD: "" - SMTP_PORT: "465" - SMTP_SERVER: "" - SMTP_USE_TLS: "true" - SMTP_USERNAME: "" - SQLALCHEMY_ECHO: "false" - SQLALCHEMY_MAX_OVERFLOW: "10" - SQLALCHEMY_POOL_PRE_PING: "false" - SQLALCHEMY_POOL_RECYCLE: "3600" - SQLALCHEMY_POOL_SIZE: "30" - SQLALCHEMY_POOL_TIMEOUT: "30" - SQLALCHEMY_POOL_USE_LIFO: "false" - SSRF_COREDUMP_DIR: /var/spool/squid - SSRF_DEFAULT_CONNECT_TIME_OUT: "5" - SSRF_DEFAULT_READ_TIME_OUT: "5" - SSRF_DEFAULT_TIME_OUT: "5" - SSRF_DEFAULT_WRITE_TIME_OUT: "5" - SSRF_HTTP_PORT: "3128" - SSRF_POOL_KEEPALIVE_EXPIRY: "5.0" - SSRF_POOL_MAX_CONNECTIONS: "100" - SSRF_POOL_MAX_KEEPALIVE_CONNECTIONS: "20" - SSRF_PROXY_HTTP_URL: http://ssrf_proxy:3128 - SSRF_PROXY_HTTPS_URL: http://ssrf_proxy:3128 - SSRF_REVERSE_PROXY_PORT: "8194" - SSRF_SANDBOX_HOST: sandbox - STORAGE_TYPE: opendal - SUPABASE_API_KEY: your-access-key - SUPABASE_BUCKET_NAME: your-bucket-name - SUPABASE_URL: your-server-url - SWAGGER_UI_ENABLED: "false" - SWAGGER_UI_PATH: /swagger-ui.html - TABLESTORE_ACCESS_KEY_ID: xxx - TABLESTORE_ACCESS_KEY_SECRET: xxx - TABLESTORE_ENDPOINT: https://instance-name.cn-hangzhou.ots.aliyuncs.com - TABLESTORE_INSTANCE_NAME: instance-name - TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE: "false" - TEMPLATE_TRANSFORM_MAX_LENGTH: "400000" - TENANT_ISOLATED_TASK_CONCURRENCY: "1" - TENCENT_COS_BUCKET_NAME: your-bucket-name - TENCENT_COS_CUSTOM_DOMAIN: your-custom-domain - TENCENT_COS_REGION: your-region - TENCENT_COS_SCHEME: your-scheme - TENCENT_COS_SECRET_ID: your-secret-id - TENCENT_COS_SECRET_KEY: your-secret-key - TENCENT_VECTOR_DB_API_KEY: dify - TENCENT_VECTOR_DB_DATABASE: dify - TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH: "false" - TENCENT_VECTOR_DB_REPLICAS: "2" - TENCENT_VECTOR_DB_SHARD: "1" - TENCENT_VECTOR_DB_TIMEOUT: "30" - TENCENT_VECTOR_DB_URL: http://127.0.0.1 - TENCENT_VECTOR_DB_USERNAME: dify - TEXT_GENERATION_TIMEOUT_MS: "60000" - TIDB_API_URL: http://127.0.0.1 - TIDB_IAM_API_URL: http://127.0.0.1 - TIDB_ON_QDRANT_API_KEY: dify - TIDB_ON_QDRANT_CLIENT_TIMEOUT: "20" - TIDB_ON_QDRANT_GRPC_ENABLED: "false" - TIDB_ON_QDRANT_GRPC_PORT: "6334" - TIDB_ON_QDRANT_URL: http://127.0.0.1 - TIDB_PRIVATE_KEY: dify - TIDB_PROJECT_ID: dify - TIDB_PUBLIC_KEY: dify - TIDB_REGION: regions/aws-us-east-1 - TIDB_SPEND_LIMIT: "100" - TIDB_VECTOR_DATABASE: dify - TIDB_VECTOR_HOST: tidb - TIDB_VECTOR_PASSWORD: "" - TIDB_VECTOR_PORT: "4000" - TIDB_VECTOR_USER: "" - TOP_K_MAX_VALUE: "10" - TRIGGER_URL: http://localhost - UNSTRUCTURED_API_KEY: "" - UNSTRUCTURED_API_URL: "" - UPLOAD_AUDIO_FILE_SIZE_LIMIT: "50" - UPLOAD_FILE_BATCH_LIMIT: "5" - UPLOAD_FILE_EXTENSION_BLACKLIST: "" - UPLOAD_FILE_SIZE_LIMIT: "15" - UPLOAD_IMAGE_FILE_SIZE_LIMIT: "10" - UPLOAD_VIDEO_FILE_SIZE_LIMIT: "100" - UPSTASH_VECTOR_TOKEN: dify - UPSTASH_VECTOR_URL: https://xxx-vector.upstash.io - UV_CACHE_DIR: /tmp/.uv-cache - VASTBASE_DATABASE: dify - VASTBASE_HOST: vastbase - VASTBASE_MAX_CONNECTION: "5" - VASTBASE_MIN_CONNECTION: "1" - VASTBASE_PASSWORD: Difyai123456 - VASTBASE_PORT: "5432" - VASTBASE_USER: dify - VECTOR_INDEX_NAME_PREFIX: Vector_index - VECTOR_STORE: weaviate - VIKINGDB_ACCESS_KEY: your-ak - VIKINGDB_CONNECTION_TIMEOUT: "30" - VIKINGDB_HOST: api-vikingdb.xxx.volces.com - VIKINGDB_REGION: cn-shanghai - VIKINGDB_SCHEMA: http - VIKINGDB_SECRET_KEY: your-sk - VIKINGDB_SOCKET_TIMEOUT: "30" - VOLCENGINE_TOS_ACCESS_KEY: your-access-key - VOLCENGINE_TOS_BUCKET_NAME: your-bucket-name - VOLCENGINE_TOS_ENDPOINT: your-server-url - VOLCENGINE_TOS_REGION: your-region - VOLCENGINE_TOS_SECRET_KEY: your-secret-key - WEAVIATE_API_KEY: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS: WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih - WEAVIATE_AUTHENTICATION_APIKEY_ENABLED: "true" - WEAVIATE_AUTHENTICATION_APIKEY_USERS: hello@dify.ai - WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED: "true" - WEAVIATE_AUTHORIZATION_ADMINLIST_USERS: hello@dify.ai - WEAVIATE_CLUSTER_HOSTNAME: node1 - WEAVIATE_DEFAULT_VECTORIZER_MODULE: none - WEAVIATE_DISABLE_TELEMETRY: "false" - WEAVIATE_ENABLE_TOKENIZER_GSE: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_JA: "false" - WEAVIATE_ENABLE_TOKENIZER_KAGOME_KR: "false" - WEAVIATE_ENDPOINT: http://weaviate:8080 - WEAVIATE_GRPC_ENDPOINT: grpc://weaviate:50051 - WEAVIATE_PERSISTENCE_DATA_PATH: /var/lib/weaviate - WEAVIATE_QUERY_DEFAULTS_LIMIT: "25" - WEAVIATE_TOKENIZATION: word - WEB_API_CORS_ALLOW_ORIGINS: '*' - WEB_SENTRY_DSN: "" - WEBHOOK_REQUEST_BODY_MAX_SIZE: "10485760" - WORKFLOW_CALL_MAX_DEPTH: "5" - WORKFLOW_FILE_UPLOAD_LIMIT: "10" - WORKFLOW_LOG_CLEANUP_BATCH_SIZE: "100" - WORKFLOW_LOG_CLEANUP_ENABLED: "false" - WORKFLOW_LOG_CLEANUP_SPECIFIC_WORKFLOW_IDS: "" - WORKFLOW_LOG_RETENTION_DAYS: "30" - WORKFLOW_MAX_EXECUTION_STEPS: "500" - WORKFLOW_MAX_EXECUTION_TIME: "1200" - WORKFLOW_NODE_EXECUTION_STORAGE: rdbms - WORKFLOW_SCHEDULE_MAX_DISPATCH_PER_TICK: "0" - WORKFLOW_SCHEDULE_POLLER_BATCH_SIZE: "100" - WORKFLOW_SCHEDULE_POLLER_INTERVAL: "1" diff --git a/web/docs/frontend-env.reference.json b/web/docs/frontend-env.reference.json new file mode 100644 index 0000000000..a2d609867f --- /dev/null +++ b/web/docs/frontend-env.reference.json @@ -0,0 +1,655 @@ +{ + "schema_version": "1", + "artifact_policy": "committed-generated-artifact", + "authority": { + "kind": "frontend-env-schema", + "source_root": "web", + "model": "web/env.ts" + }, + "variables": [ + { + "name": "NEXT_PUBLIC_ALLOW_EMBED", + "accepted_names": [ + "NEXT_PUBLIC_ALLOW_EMBED" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "Default is not allow to embed into iframe to prevent Clickjacking: https://owasp.org/www-community/attacks/Clickjacking", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "allowEmbed" + }, + { + "name": "NEXT_PUBLIC_ALLOW_INLINE_STYLES", + "accepted_names": [ + "NEXT_PUBLIC_ALLOW_INLINE_STYLES" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "Allow inline style attributes in Markdown rendering. Self-hosted opt-in for workflows using styled Jinja2 templates.", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "allowInlineStyles" + }, + { + "name": "NEXT_PUBLIC_ALLOW_UNSAFE_DATA_SCHEME", + "accepted_names": [ + "NEXT_PUBLIC_ALLOW_UNSAFE_DATA_SCHEME" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "Allow rendering unsafe URLs which have \"data:\" scheme.", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "allowUnsafeDataScheme" + }, + { + "name": "NEXT_PUBLIC_AMPLITUDE_API_KEY", + "accepted_names": [ + "NEXT_PUBLIC_AMPLITUDE_API_KEY" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "The API key of amplitude", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "amplitudeApiKey" + }, + { + "name": "NEXT_PUBLIC_API_PREFIX", + "accepted_names": [ + "NEXT_PUBLIC_API_PREFIX" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "The base URL of console application, refers to the Console base URL of WEB service if console domain is different from api or web app domain. example: http://cloud.dify.ai/console/api", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "apiPrefix" + }, + { + "name": "NEXT_PUBLIC_BASE_PATH", + "accepted_names": [ + "NEXT_PUBLIC_BASE_PATH" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "The base path for the application", + "code_default": "", + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "basePath" + }, + { + "name": "NEXT_PUBLIC_BATCH_CONCURRENCY", + "accepted_names": [ + "NEXT_PUBLIC_BATCH_CONCURRENCY" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "number of concurrency", + "code_default": 5, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "batchConcurrency" + }, + { + "name": "NEXT_PUBLIC_COOKIE_DOMAIN", + "accepted_names": [ + "NEXT_PUBLIC_COOKIE_DOMAIN" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "When the frontend and backend run on different subdomains, set NEXT_PUBLIC_COOKIE_DOMAIN=1.", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "cookieDomain" + }, + { + "name": "NEXT_PUBLIC_CSP_WHITELIST", + "accepted_names": [ + "NEXT_PUBLIC_CSP_WHITELIST" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "CSP https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "cspWhitelist" + }, + { + "name": "NEXT_PUBLIC_DEPLOY_ENV", + "accepted_names": [ + "NEXT_PUBLIC_DEPLOY_ENV" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "literal[\"DEVELOPMENT\", \"PRODUCTION\", \"TESTING\"]", + "description": "For production release, change this to PRODUCTION", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "deployEnv" + }, + { + "name": "NEXT_PUBLIC_DISABLE_UPLOAD_IMAGE_AS_ICON", + "accepted_names": [ + "NEXT_PUBLIC_DISABLE_UPLOAD_IMAGE_AS_ICON" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "disableUploadImageAsIcon" + }, + { + "name": "NEXT_PUBLIC_EDITION", + "accepted_names": [ + "NEXT_PUBLIC_EDITION" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "literal[\"SELF_HOSTED\", \"CLOUD\"]", + "description": "The deployment edition, SELF_HOSTED", + "code_default": "SELF_HOSTED", + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "edition" + }, + { + "name": "NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX", + "accepted_names": [ + "NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "Enable inline LaTeX rendering with single dollar signs ($...$) Default is false for security reasons to prevent conflicts with regular text", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "enableSingleDollarLatex" + }, + { + "name": "NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL", + "accepted_names": [ + "NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "", + "code_default": true, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "enableWebsiteFirecrawl" + }, + { + "name": "NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER", + "accepted_names": [ + "NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "", + "code_default": true, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "enableWebsiteJinareader" + }, + { + "name": "NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL", + "accepted_names": [ + "NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "enableWebsiteWatercrawl" + }, + { + "name": "NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH", + "accepted_names": [ + "NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "The maximum number of tokens for segmentation", + "code_default": 4000, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "indexingMaxSegmentationTokensLength" + }, + { + "name": "NEXT_PUBLIC_IS_MARKETPLACE", + "accepted_names": [ + "NEXT_PUBLIC_IS_MARKETPLACE" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "isMarketplace" + }, + { + "name": "NEXT_PUBLIC_LOOP_NODE_MAX_COUNT", + "accepted_names": [ + "NEXT_PUBLIC_LOOP_NODE_MAX_COUNT" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "Maximum loop count in the workflow", + "code_default": 100, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "loopNodeMaxCount" + }, + { + "name": "NEXT_PUBLIC_MAINTENANCE_NOTICE", + "accepted_names": [ + "NEXT_PUBLIC_MAINTENANCE_NOTICE" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "maintenanceNotice" + }, + { + "name": "NEXT_PUBLIC_MARKETPLACE_API_PREFIX", + "accepted_names": [ + "NEXT_PUBLIC_MARKETPLACE_API_PREFIX" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "The API PREFIX for MARKETPLACE", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "marketplaceApiPrefix" + }, + { + "name": "NEXT_PUBLIC_MARKETPLACE_URL_PREFIX", + "accepted_names": [ + "NEXT_PUBLIC_MARKETPLACE_URL_PREFIX" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "The URL for MARKETPLACE", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "marketplaceUrlPrefix" + }, + { + "name": "NEXT_PUBLIC_MAX_ITERATIONS_NUM", + "accepted_names": [ + "NEXT_PUBLIC_MAX_ITERATIONS_NUM" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "The maximum number of iterations for agent setting", + "code_default": 99, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "maxIterationsNum" + }, + { + "name": "NEXT_PUBLIC_MAX_PARALLEL_LIMIT", + "accepted_names": [ + "NEXT_PUBLIC_MAX_PARALLEL_LIMIT" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "Maximum number of Parallelism branches in the workflow", + "code_default": 10, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "maxParallelLimit" + }, + { + "name": "NEXT_PUBLIC_MAX_TOOLS_NUM", + "accepted_names": [ + "NEXT_PUBLIC_MAX_TOOLS_NUM" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "Maximum number of tools in the agent/workflow", + "code_default": 10, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "maxToolsNum" + }, + { + "name": "NEXT_PUBLIC_MAX_TREE_DEPTH", + "accepted_names": [ + "NEXT_PUBLIC_MAX_TREE_DEPTH" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "The maximum number of tree node depth for workflow", + "code_default": 50, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "maxTreeDepth" + }, + { + "name": "NEXT_PUBLIC_PUBLIC_API_PREFIX", + "accepted_names": [ + "NEXT_PUBLIC_PUBLIC_API_PREFIX" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from console or api domain. example: http://udify.app/api", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "publicApiPrefix" + }, + { + "name": "NEXT_PUBLIC_SENTRY_DSN", + "accepted_names": [ + "NEXT_PUBLIC_SENTRY_DSN" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "SENTRY", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "sentryDsn" + }, + { + "name": "NEXT_PUBLIC_SITE_ABOUT", + "accepted_names": [ + "NEXT_PUBLIC_SITE_ABOUT" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "siteAbout" + }, + { + "name": "NEXT_PUBLIC_SOCKET_URL", + "accepted_names": [ + "NEXT_PUBLIC_SOCKET_URL" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "socketUrl" + }, + { + "name": "NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS", + "accepted_names": [ + "NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "supportEmailAddress" + }, + { + "name": "NEXT_PUBLIC_SUPPORT_MAIL_LOGIN", + "accepted_names": [ + "NEXT_PUBLIC_SUPPORT_MAIL_LOGIN" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "supportMailLogin" + }, + { + "name": "NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS", + "accepted_names": [ + "NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "The timeout for the text generation in millisecond", + "code_default": 60000, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "textGenerationTimeoutMs" + }, + { + "name": "NEXT_PUBLIC_TOP_K_MAX_VALUE", + "accepted_names": [ + "NEXT_PUBLIC_TOP_K_MAX_VALUE" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "integer", + "description": "The maximum number of top-k value for RAG.", + "code_default": 10, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "topKMaxValue" + }, + { + "name": "NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON", + "accepted_names": [ + "NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "boolean", + "description": "Disable Upload Image as WebApp icon default is false", + "code_default": false, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "uploadImageAsIcon" + }, + { + "name": "NEXT_PUBLIC_WEB_PREFIX", + "accepted_names": [ + "NEXT_PUBLIC_WEB_PREFIX" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "webPrefix" + }, + { + "name": "NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL", + "accepted_names": [ + "NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "zendeskFieldIdEmail" + }, + { + "name": "NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT", + "accepted_names": [ + "NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "zendeskFieldIdEnvironment" + }, + { + "name": "NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN", + "accepted_names": [ + "NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "zendeskFieldIdPlan" + }, + { + "name": "NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION", + "accepted_names": [ + "NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "zendeskFieldIdVersion" + }, + { + "name": "NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID", + "accepted_names": [ + "NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "zendeskFieldIdWorkspaceId" + }, + { + "name": "NEXT_PUBLIC_ZENDESK_WIDGET_KEY", + "accepted_names": [ + "NEXT_PUBLIC_ZENDESK_WIDGET_KEY" + ], + "runtime": "client", + "visibility": "browser-public", + "type": "string", + "description": "", + "code_default": null, + "required": false, + "injection_mode": "body-dataset", + "dataset_key": "zendeskWidgetKey" + }, + { + "name": "INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH", + "accepted_names": [ + "INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH" + ], + "runtime": "server", + "visibility": "server-only", + "type": "integer", + "description": "Maximum length of segmentation tokens for indexing", + "code_default": 4000, + "required": false, + "injection_mode": "process-env", + "dataset_key": null + }, + { + "name": "NEXT_TELEMETRY_DISABLED", + "accepted_names": [ + "NEXT_TELEMETRY_DISABLED" + ], + "runtime": "server", + "visibility": "server-only", + "type": "boolean", + "description": "Disable Next.js Telemetry (https://nextjs.org/telemetry)", + "code_default": null, + "required": false, + "injection_mode": "process-env", + "dataset_key": null + }, + { + "name": "PORT", + "accepted_names": [ + "PORT" + ], + "runtime": "server", + "visibility": "server-only", + "type": "integer", + "description": "", + "code_default": 3000, + "required": false, + "injection_mode": "process-env", + "dataset_key": null + }, + { + "name": "TEXT_GENERATION_TIMEOUT_MS", + "accepted_names": [ + "TEXT_GENERATION_TIMEOUT_MS" + ], + "runtime": "server", + "visibility": "server-only", + "type": "integer", + "description": "The timeout for the text generation in millisecond", + "code_default": 60000, + "required": false, + "injection_mode": "process-env", + "dataset_key": null + } + ] +} diff --git a/web/docs/frontend-env.reference.md b/web/docs/frontend-env.reference.md new file mode 100644 index 0000000000..e048a6f78f --- /dev/null +++ b/web/docs/frontend-env.reference.md @@ -0,0 +1,64 @@ +# Frontend Env Reference + +> Generated from `web/env.ts`. Do not edit manually. + +This reference documents frontend application env semantics and code defaults only. +Deploy-time defaults, `.env.example`, Docker files, and runtime-effective values are intentionally excluded. +Only env declared in `web/env.ts` is included. Dev-only tooling env outside that file is excluded. + +## Browser-Public Variables + +| Name | Visibility | Type | Default | Injection | Dataset Key | Description | +| --- | --- | --- | --- | --- | --- | --- | +| `NEXT_PUBLIC_ALLOW_EMBED` | `browser-public` | `boolean` | `false` | `body-dataset` | `allowEmbed` | Default is not allow to embed into iframe to prevent Clickjacking: https://owasp.org/www-community/attacks/Clickjacking | +| `NEXT_PUBLIC_ALLOW_INLINE_STYLES` | `browser-public` | `boolean` | `false` | `body-dataset` | `allowInlineStyles` | Allow inline style attributes in Markdown rendering. Self-hosted opt-in for workflows using styled Jinja2 templates. | +| `NEXT_PUBLIC_ALLOW_UNSAFE_DATA_SCHEME` | `browser-public` | `boolean` | `false` | `body-dataset` | `allowUnsafeDataScheme` | Allow rendering unsafe URLs which have "data:" scheme. | +| `NEXT_PUBLIC_AMPLITUDE_API_KEY` | `browser-public` | `string` | `""` | `body-dataset` | `amplitudeApiKey` | The API key of amplitude | +| `NEXT_PUBLIC_API_PREFIX` | `browser-public` | `string` | `""` | `body-dataset` | `apiPrefix` | The base URL of console application, refers to the Console base URL of WEB service if console domain is different from api or web app domain. example: http://cloud.dify.ai/console/api | +| `NEXT_PUBLIC_BASE_PATH` | `browser-public` | `string` | `""` | `body-dataset` | `basePath` | The base path for the application | +| `NEXT_PUBLIC_BATCH_CONCURRENCY` | `browser-public` | `integer` | `5` | `body-dataset` | `batchConcurrency` | number of concurrency | +| `NEXT_PUBLIC_COOKIE_DOMAIN` | `browser-public` | `string` | `""` | `body-dataset` | `cookieDomain` | When the frontend and backend run on different subdomains, set NEXT_PUBLIC_COOKIE_DOMAIN=1. | +| `NEXT_PUBLIC_CSP_WHITELIST` | `browser-public` | `string` | `""` | `body-dataset` | `cspWhitelist` | CSP https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | +| `NEXT_PUBLIC_DEPLOY_ENV` | `browser-public` | `literal["DEVELOPMENT", "PRODUCTION", "TESTING"]` | `""` | `body-dataset` | `deployEnv` | For production release, change this to PRODUCTION | +| `NEXT_PUBLIC_DISABLE_UPLOAD_IMAGE_AS_ICON` | `browser-public` | `boolean` | `false` | `body-dataset` | `disableUploadImageAsIcon` | | +| `NEXT_PUBLIC_EDITION` | `browser-public` | `literal["SELF_HOSTED", "CLOUD"]` | `"SELF_HOSTED"` | `body-dataset` | `edition` | The deployment edition, SELF_HOSTED | +| `NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX` | `browser-public` | `boolean` | `false` | `body-dataset` | `enableSingleDollarLatex` | Enable inline LaTeX rendering with single dollar signs ($...$) Default is false for security reasons to prevent conflicts with regular text | +| `NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL` | `browser-public` | `boolean` | `true` | `body-dataset` | `enableWebsiteFirecrawl` | | +| `NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER` | `browser-public` | `boolean` | `true` | `body-dataset` | `enableWebsiteJinareader` | | +| `NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL` | `browser-public` | `boolean` | `false` | `body-dataset` | `enableWebsiteWatercrawl` | | +| `NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH` | `browser-public` | `integer` | `4000` | `body-dataset` | `indexingMaxSegmentationTokensLength` | The maximum number of tokens for segmentation | +| `NEXT_PUBLIC_IS_MARKETPLACE` | `browser-public` | `boolean` | `false` | `body-dataset` | `isMarketplace` | | +| `NEXT_PUBLIC_LOOP_NODE_MAX_COUNT` | `browser-public` | `integer` | `100` | `body-dataset` | `loopNodeMaxCount` | Maximum loop count in the workflow | +| `NEXT_PUBLIC_MAINTENANCE_NOTICE` | `browser-public` | `string` | `""` | `body-dataset` | `maintenanceNotice` | | +| `NEXT_PUBLIC_MARKETPLACE_API_PREFIX` | `browser-public` | `string` | `""` | `body-dataset` | `marketplaceApiPrefix` | The API PREFIX for MARKETPLACE | +| `NEXT_PUBLIC_MARKETPLACE_URL_PREFIX` | `browser-public` | `string` | `""` | `body-dataset` | `marketplaceUrlPrefix` | The URL for MARKETPLACE | +| `NEXT_PUBLIC_MAX_ITERATIONS_NUM` | `browser-public` | `integer` | `99` | `body-dataset` | `maxIterationsNum` | The maximum number of iterations for agent setting | +| `NEXT_PUBLIC_MAX_PARALLEL_LIMIT` | `browser-public` | `integer` | `10` | `body-dataset` | `maxParallelLimit` | Maximum number of Parallelism branches in the workflow | +| `NEXT_PUBLIC_MAX_TOOLS_NUM` | `browser-public` | `integer` | `10` | `body-dataset` | `maxToolsNum` | Maximum number of tools in the agent/workflow | +| `NEXT_PUBLIC_MAX_TREE_DEPTH` | `browser-public` | `integer` | `50` | `body-dataset` | `maxTreeDepth` | The maximum number of tree node depth for workflow | +| `NEXT_PUBLIC_PUBLIC_API_PREFIX` | `browser-public` | `string` | `""` | `body-dataset` | `publicApiPrefix` | The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from console or api domain. example: http://udify.app/api | +| `NEXT_PUBLIC_SENTRY_DSN` | `browser-public` | `string` | `""` | `body-dataset` | `sentryDsn` | SENTRY | +| `NEXT_PUBLIC_SITE_ABOUT` | `browser-public` | `string` | `""` | `body-dataset` | `siteAbout` | | +| `NEXT_PUBLIC_SOCKET_URL` | `browser-public` | `string` | `""` | `body-dataset` | `socketUrl` | | +| `NEXT_PUBLIC_SUPPORT_EMAIL_ADDRESS` | `browser-public` | `string` | `""` | `body-dataset` | `supportEmailAddress` | | +| `NEXT_PUBLIC_SUPPORT_MAIL_LOGIN` | `browser-public` | `boolean` | `false` | `body-dataset` | `supportMailLogin` | | +| `NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS` | `browser-public` | `integer` | `60000` | `body-dataset` | `textGenerationTimeoutMs` | The timeout for the text generation in millisecond | +| `NEXT_PUBLIC_TOP_K_MAX_VALUE` | `browser-public` | `integer` | `10` | `body-dataset` | `topKMaxValue` | The maximum number of top-k value for RAG. | +| `NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON` | `browser-public` | `boolean` | `false` | `body-dataset` | `uploadImageAsIcon` | Disable Upload Image as WebApp icon default is false | +| `NEXT_PUBLIC_WEB_PREFIX` | `browser-public` | `string` | `""` | `body-dataset` | `webPrefix` | | +| `NEXT_PUBLIC_ZENDESK_FIELD_ID_EMAIL` | `browser-public` | `string` | `""` | `body-dataset` | `zendeskFieldIdEmail` | | +| `NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT` | `browser-public` | `string` | `""` | `body-dataset` | `zendeskFieldIdEnvironment` | | +| `NEXT_PUBLIC_ZENDESK_FIELD_ID_PLAN` | `browser-public` | `string` | `""` | `body-dataset` | `zendeskFieldIdPlan` | | +| `NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION` | `browser-public` | `string` | `""` | `body-dataset` | `zendeskFieldIdVersion` | | +| `NEXT_PUBLIC_ZENDESK_FIELD_ID_WORKSPACE_ID` | `browser-public` | `string` | `""` | `body-dataset` | `zendeskFieldIdWorkspaceId` | | +| `NEXT_PUBLIC_ZENDESK_WIDGET_KEY` | `browser-public` | `string` | `""` | `body-dataset` | `zendeskWidgetKey` | | + +## Server-Only Variables + +| Name | Visibility | Type | Default | Injection | Dataset Key | Description | +| --- | --- | --- | --- | --- | --- | --- | +| `INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH` | `server-only` | `integer` | `4000` | `process-env` | | Maximum length of segmentation tokens for indexing | +| `NEXT_TELEMETRY_DISABLED` | `server-only` | `boolean` | `""` | `process-env` | | Disable Next.js Telemetry (https://nextjs.org/telemetry) | +| `PORT` | `server-only` | `integer` | `3000` | `process-env` | | | +| `TEXT_GENERATION_TIMEOUT_MS` | `server-only` | `integer` | `60000` | `process-env` | | The timeout for the text generation in millisecond | + diff --git a/web/package.json b/web/package.json index 543181bd97..ac7505199c 100644 --- a/web/package.json +++ b/web/package.json @@ -30,6 +30,7 @@ "dev:inspect": "next dev --inspect", "dev:proxy": "tsx ./scripts/dev-hono-proxy.ts", "dev:vinext": "vinext dev", + "env:reference": "node ./scripts/env-reference.mjs", "gen-doc-paths": "tsx ./scripts/gen-doc-paths.ts", "gen-icons": "pnpm --filter @dify/iconify-collections generate && node ./scripts/gen-icons.mjs && eslint --fix app/components/base/icons/src/", "i18n:check": "tsx ./scripts/check-i18n.js", diff --git a/web/scripts/__tests__/env-reference.spec.ts b/web/scripts/__tests__/env-reference.spec.ts new file mode 100644 index 0000000000..caa090bdb2 --- /dev/null +++ b/web/scripts/__tests__/env-reference.spec.ts @@ -0,0 +1,73 @@ +/** + * @vitest-environment node + */ +import { describe, expect, it } from 'vitest' +import { buildFrontendEnvReference, renderFrontendEnvReferenceMarkdown } from '../env-reference.mjs' + +describe('frontend env reference', () => { + it('should derive frontend authority metadata from web/env.ts only', () => { + // Arrange + const reference = buildFrontendEnvReference() + const variables = Object.fromEntries(reference.variables.map(variable => [variable.name, variable])) + + // Assert + expect(reference.authority.source_root).toBe('web') + expect(reference.authority.model).toBe('web/env.ts') + expect(variables.NEXT_PUBLIC_API_PREFIX).toBeDefined() + expect(variables.HONO_PROXY_HOST).toBeUndefined() + expect(variables.HONO_CONSOLE_API_PROXY_TARGET).toBeUndefined() + }) + + it('should export browser-public dataset metadata for client env variables', () => { + // Arrange + const reference = buildFrontendEnvReference() + const variable = reference.variables.find(item => item.name === 'NEXT_PUBLIC_API_PREFIX') + + // Assert + expect(variable).toEqual({ + name: 'NEXT_PUBLIC_API_PREFIX', + accepted_names: ['NEXT_PUBLIC_API_PREFIX'], + runtime: 'client', + visibility: 'browser-public', + type: 'string', + description: 'The base URL of console application, refers to the Console base URL of WEB service if console domain is different from api or web app domain. example: http://cloud.dify.ai/console/api', + code_default: null, + required: false, + injection_mode: 'body-dataset', + dataset_key: 'apiPrefix', + }) + }) + + it('should export server-only process env metadata for server variables', () => { + // Arrange + const reference = buildFrontendEnvReference() + const variable = reference.variables.find(item => item.name === 'PORT') + + // Assert + expect(variable).toEqual({ + name: 'PORT', + accepted_names: ['PORT'], + runtime: 'server', + visibility: 'server-only', + type: 'integer', + description: '', + code_default: 3000, + required: false, + injection_mode: 'process-env', + dataset_key: null, + }) + }) + + it('should render markdown that excludes deploy defaults and explains the scope', () => { + // Arrange + const markdown = renderFrontendEnvReferenceMarkdown(buildFrontendEnvReference()) + + // Assert + expect(markdown).toContain('> Generated from `web/env.ts`. Do not edit manually.') + expect(markdown).toContain('Deploy-time defaults, `.env.example`, Docker files, and runtime-effective values are intentionally excluded.') + expect(markdown).toContain('Only env declared in `web/env.ts` is included. Dev-only tooling env outside that file is excluded.') + expect(markdown).toContain('| `NEXT_PUBLIC_API_PREFIX` | `browser-public` | `string` | `""` | `body-dataset` | `apiPrefix` |') + expect(markdown).toContain('| `PORT` | `server-only` | `integer` | `3000` | `process-env` | | |') + expect(markdown).not.toContain('HONO_PROXY_HOST') + }) +}) diff --git a/web/scripts/env-reference.mjs b/web/scripts/env-reference.mjs new file mode 100644 index 0000000000..46e11261c1 --- /dev/null +++ b/web/scripts/env-reference.mjs @@ -0,0 +1,377 @@ +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..') +const envSourcePath = path.join(projectRoot, 'env.ts') +const docsRoot = path.join(projectRoot, 'docs') +const jsonOutputPath = path.join(docsRoot, 'frontend-env.reference.json') +const markdownOutputPath = path.join(docsRoot, 'frontend-env.reference.md') + +/** + * @typedef {'client' | 'server'} FrontendEnvRuntime + * @typedef {'browser-public' | 'server-only'} FrontendEnvVisibility + * @typedef {'body-dataset' | 'process-env'} FrontendEnvInjectionMode + * + * @typedef {{ + * name: string + * accepted_names: string[] + * runtime: FrontendEnvRuntime + * visibility: FrontendEnvVisibility + * type: string + * description: string + * code_default: string | number | boolean | null + * required: boolean + * injection_mode: FrontendEnvInjectionMode + * dataset_key: string | null + * }} FrontendEnvVariableReference + * + * @typedef {{ + * schema_version: string + * artifact_policy: string + * authority: { + * kind: string + * source_root: string + * model: string + * } + * variables: FrontendEnvVariableReference[] + * }} FrontendEnvReference + */ + +const CLIENT_SCHEMA_START = 'const clientSchema = {' +const CLIENT_SCHEMA_END = '} satisfies ClientSchema' +const SERVER_SCHEMA_START = ' server: {' +const SERVER_SCHEMA_END = ' },\n client: clientSchema,' +const RUNTIME_ENV_START = ' experimental__runtimeEnv: {' +const RUNTIME_ENV_END = ' },\n emptyStringAsUndefined: true,' + +const COMMENT_START = '/**' +const COMMENT_END = '*/' +const PROPERTY_PATTERN = /^\s*([A-Z][A-Z0-9_]+):\s*(.+),\s*$/ +const DATASET_PATTERN = /getRuntimeEnvFromBody\('([^']+)'\)/ +const DEFAULT_PATTERN = /\.default\(([^)]*)\)/ +const ENUM_PATTERN = /z\.enum\(\[(.+?)\]\)/ +const STRING_LITERAL_PATTERN = /^(['"])(.*)\1$/ + +/** + * @param {string} source + * @param {string} startMarker + * @param {string} endMarker + */ +function extractBlock(source, startMarker, endMarker) { + const startIndex = source.indexOf(startMarker) + if (startIndex === -1) + throw new Error(`Missing start marker: ${startMarker}`) + + const contentStart = startIndex + startMarker.length + const endIndex = source.indexOf(endMarker, contentStart) + if (endIndex === -1) + throw new Error(`Missing end marker: ${endMarker}`) + + return source.slice(contentStart, endIndex) +} + +/** + * @param {string} comment + */ +function normalizeDescription(comment) { + return comment + .split('\n') + .map((line) => { + const trimmedLine = line.trim() + if (trimmedLine === '/**' || trimmedLine === '*/') + return '' + + return trimmedLine + .replace(/^\/\*\*\s?/, '') + .replace(/^\*\s?/, '') + .replace(/\s*\*\/$/, '') + }) + .filter(Boolean) + .join(' ') + .replace(/\s+/g, ' ') + .trim() +} + +/** + * @param {string} block + */ +function parseSchemaEntries(block) { + /** @type {{ name: string, expression: string, description: string }[]} */ + const entries = [] + const lines = block.split('\n') + /** @type {string[]} */ + let commentBuffer = [] + let isCollectingComment = false + + for (const line of lines) { + const trimmedLine = line.trim() + if (!trimmedLine) + continue + + if (trimmedLine.startsWith(COMMENT_START)) { + isCollectingComment = true + commentBuffer = [trimmedLine] + if (trimmedLine.endsWith(COMMENT_END)) + isCollectingComment = false + continue + } + + if (isCollectingComment) { + commentBuffer.push(trimmedLine) + if (trimmedLine.endsWith(COMMENT_END)) + isCollectingComment = false + continue + } + + const propertyMatch = line.match(PROPERTY_PATTERN) + if (!propertyMatch) + continue + + const [, name, expression] = propertyMatch + entries.push({ + name, + expression: expression.trim(), + description: normalizeDescription(commentBuffer.join('\n')), + }) + commentBuffer = [] + } + + return entries +} + +/** + * @param {string} block + */ +function parseRuntimeDatasetKeys(block) { + /** @type {Map} */ + const datasetKeys = new Map() + + for (const line of block.split('\n')) { + const propertyMatch = line.match(PROPERTY_PATTERN) + if (!propertyMatch) + continue + + const [, name, expression] = propertyMatch + const datasetMatch = expression.match(DATASET_PATTERN) + if (datasetMatch) + datasetKeys.set(name, datasetMatch[1]) + } + + return datasetKeys +} + +/** + * @param {string} literal + * @returns {string | number | boolean | null} + */ +function parseDefaultLiteral(literal) { + const trimmedLiteral = literal.trim() + if (!trimmedLiteral) + return null + if (trimmedLiteral === 'true') + return true + if (trimmedLiteral === 'false') + return false + if (/^-?\d+$/.test(trimmedLiteral)) + return Number(trimmedLiteral) + + const stringMatch = trimmedLiteral.match(STRING_LITERAL_PATTERN) + if (stringMatch) + return stringMatch[2] + + return null +} + +/** + * @param {string} expression + */ +function inferType(expression) { + if (expression.includes('coercedBoolean')) + return 'boolean' + if (expression.includes('coercedNumber')) + return 'integer' + + const enumMatch = expression.match(ENUM_PATTERN) + if (enumMatch) { + const values = Array.from(enumMatch[1].matchAll(/'([^']+)'|"([^"]+)"/g)) + .map(match => match[1] || match[2]) + return `literal[${values.map(value => JSON.stringify(value)).join(', ')}]` + } + + if (expression.includes('z.email(') || expression.includes('z.url(') || expression.includes('z.string(')) + return 'string' + + if (expression.includes('z.literal(')) { + const literalMatch = expression.match(/z\.literal\(([^)]*)\)/) + if (literalMatch) + return `literal[${JSON.stringify(parseDefaultLiteral(literalMatch[1]))}]` + } + + return 'unknown' +} + +/** + * @param {string} expression + */ +function inferDefault(expression) { + const defaultMatch = expression.match(DEFAULT_PATTERN) + if (!defaultMatch) + return null + return parseDefaultLiteral(defaultMatch[1]) +} + +/** + * @param {string} expression + */ +function inferRequired(expression) { + return !expression.includes('.optional()') && !expression.includes('.default(') +} + +/** + * @param {ReturnType[number]} entry + * @param {Map} datasetKeys + * @returns {FrontendEnvVariableReference} + */ +function toClientVariable(entry, datasetKeys) { + return { + name: entry.name, + accepted_names: [entry.name], + runtime: 'client', + visibility: 'browser-public', + type: inferType(entry.expression), + description: entry.description, + code_default: inferDefault(entry.expression), + required: inferRequired(entry.expression), + injection_mode: 'body-dataset', + dataset_key: datasetKeys.get(entry.name) || null, + } +} + +/** + * @param {ReturnType[number]} entry + * @returns {FrontendEnvVariableReference} + */ +function toServerVariable(entry) { + return { + name: entry.name, + accepted_names: [entry.name], + runtime: 'server', + visibility: 'server-only', + type: inferType(entry.expression), + description: entry.description, + code_default: inferDefault(entry.expression), + required: inferRequired(entry.expression), + injection_mode: 'process-env', + dataset_key: null, + } +} + +/** + * @param {string | number | boolean | null} value + */ +function renderDefault(value) { + if (value === null) + return '`""`' + return `\`${JSON.stringify(value)}\`` +} + +/** + * @param {string | null} value + */ +function markdownCodeCell(value) { + if (!value) + return '' + return `\`${String(value).replace(/\|/g, '\\|').replace(/`/g, '\\`')}\`` +} + +/** + * @param {string} value + */ +function markdownCell(value) { + return value.replace(/\|/g, '\\|').replace(/\s+/g, ' ').trim() +} + +/** + * @param {FrontendEnvReference} reference + */ +export function renderFrontendEnvReferenceMarkdown(reference) { + /** @type {Record} */ + const grouped = { + client: [], + server: [], + } + + for (const variable of reference.variables) + grouped[variable.runtime].push(variable) + + const lines = [ + '# Frontend Env Reference', + '', + '> Generated from `web/env.ts`. Do not edit manually.', + '', + 'This reference documents frontend application env semantics and code defaults only.', + 'Deploy-time defaults, `.env.example`, Docker files, and runtime-effective values are intentionally excluded.', + 'Only env declared in `web/env.ts` is included. Dev-only tooling env outside that file is excluded.', + '', + ] + + for (const runtime of ['client', 'server']) { + const variables = grouped[/** @type {FrontendEnvRuntime} */ (runtime)] + if (!variables.length) + continue + + lines.push(runtime === 'client' ? '## Browser-Public Variables' : '## Server-Only Variables') + lines.push('') + lines.push('| Name | Visibility | Type | Default | Injection | Dataset Key | Description |') + lines.push('| --- | --- | --- | --- | --- | --- | --- |') + + for (const variable of variables) { + lines.push( + `| \`${variable.name}\` | ${markdownCodeCell(variable.visibility)} | ${markdownCodeCell(variable.type)} | ${renderDefault(variable.code_default)} | ${markdownCodeCell(variable.injection_mode)} | ${markdownCodeCell(variable.dataset_key)} | ${markdownCell(variable.description)} |`, + ) + } + lines.push('') + } + + return lines.join('\n') +} + +export function buildFrontendEnvReference() { + const source = readFileSync(envSourcePath, 'utf8') + const clientEntries = parseSchemaEntries(extractBlock(source, CLIENT_SCHEMA_START, CLIENT_SCHEMA_END)) + const serverEntries = parseSchemaEntries(extractBlock(source, SERVER_SCHEMA_START, SERVER_SCHEMA_END)) + const datasetKeys = parseRuntimeDatasetKeys(extractBlock(source, RUNTIME_ENV_START, RUNTIME_ENV_END)) + + return { + schema_version: '1', + artifact_policy: 'committed-generated-artifact', + authority: { + kind: 'frontend-env-schema', + source_root: 'web', + model: 'web/env.ts', + }, + variables: [ + ...clientEntries.map(entry => toClientVariable(entry, datasetKeys)), + ...serverEntries.map(toServerVariable), + ], + } +} + +export function writeFrontendEnvReference() { + const reference = buildFrontendEnvReference() + mkdirSync(docsRoot, { recursive: true }) + writeFileSync(jsonOutputPath, `${JSON.stringify(reference, null, 2)}\n`, 'utf8') + writeFileSync(markdownOutputPath, `${renderFrontendEnvReferenceMarkdown(reference)}\n`, 'utf8') + + return { + jsonOutputPath, + markdownOutputPath, + } +} + +if (process.argv[1] === fileURLToPath(import.meta.url)) { + const { jsonOutputPath: jsonOutput, markdownOutputPath: markdownOutput } = writeFrontendEnvReference() + console.log(`Wrote ${path.relative(projectRoot, jsonOutput)}`) + console.log(`Wrote ${path.relative(projectRoot, markdownOutput)}`) +}