Skip to main content

Find Vector Database Configuration in Helm Chart Values

Display Helm Chart Values

helm show values dify/dify

Vector Database Configuration Overview

In the Helm chart values, vector databases are configured through the vectorDB field. Dify supports two deployment modes:
ModeWhen to useToggle field
External connection (recommended for production)Connect to a self-managed or cloud-hosted vector databasevectorDB.useExternal: true
Built-in deployment (testing only)Helm chart provisions an in-cluster vector databasevectorDB.useExternal: false
The 3.9.x chart defaults to useExternal: true + externalType: "qdrant". Out of the box it is in “connect to external Qdrant” mode — you must replace externalQdrant.endpoint / apiKey with your actual cluster values, otherwise the api / worker Pods will fail to start because they cannot reach the vector database.

1. Using a Built-in Vector Database

⚠️ Use with caution in production: Built-in options are only suitable for local trials and feature validation. They do not provide high availability, backups, or capacity scaling. Use the external connection method in section 2 for production environments.
The Helm chart provides two in-cluster vector databases that can be enabled.

Built-in Qdrant

Set vectorDB.useExternal to false and enable qdrant.enabled to use this option.
vectorDB:
  useExternal: false

qdrant:
  enabled: true
  replicaCount: 3
  image:
    repository: langgenius/qdrant
    pullPolicy: IfNotPresent
    tag: "v1.7.3"
  apiKey: "dify123456"
  persistence:
    accessModes: ["ReadWriteOnce"]
    size: 10Gi
  resources: {}
    # limits:
    #   cpu: 100m
    #   memory: 128Mi
    # requests:
    #   cpu: 100m
    #   memory: 128Mi
FieldDescriptionDefault
qdrant.enabledWhether to enable built-in Qdrantfalse
qdrant.replicaCountNumber of replicas3
qdrant.image.repositoryImage repositorylanggenius/qdrant
qdrant.image.tagImage versionv1.7.3
qdrant.apiKeyQdrant API Keydify123456
qdrant.persistence.accessModesPersistent storage access modes["ReadWriteOnce"]
qdrant.persistence.sizePersistent storage size10Gi
qdrant.resourcesResource limits (CPU / memory){}

Built-in Weaviate

weaviate only exposes the enabled toggle in the parent chart’s values.yaml, but it is actually a nested subchart (located at dify/charts/weaviate/ in the chart tarball, with about 947 lines of values). All fields of this subchart can be overridden in your values.yaml as weaviate.<field> — the common ones are listed below.
weaviate:
  enabled: true
  image:
    repo: semitechnologies/weaviate
    tag: "1.18.0"
  replicas: 1
  storage:
    size: 32Gi
    storageClassName: ""
  service:
    type: LoadBalancer  # also accepts ClusterIP / NodePort
  resources: {}
  authentication: {}
  authorization: {}
  modules: {}
FieldDescriptionSubchart default
weaviate.enabledWhether to enable built-in Weaviatefalse
weaviate.image.tagWeaviate image version (recommend pinning in your own values)1.18.0
weaviate.replicasNumber of replicas (scaling is restricted after data is imported, see subchart notes)1
weaviate.storage.sizePVC capacity32Gi
weaviate.storage.storageClassNameStorage class"" (default SC)
weaviate.service.typeService typeLoadBalancer
weaviate.resourcesResource limits{}
weaviate.{startup,liveness,readiness}ProbeProbe configurationSee subchart
weaviate.authentication / authorizationAuthentication configurationSee subchart
weaviate.modulesExtension modules for text/image vectorization (contextionary, img2vec, transformers, etc.)See subchart
💡 To get the complete field list, download the chart and inspect dify/charts/weaviate/values.yaml:
helm pull dify/dify --untar
less dify/charts/weaviate/values.yaml
If you are connecting to an existing external Weaviate cluster, use the externalWeaviate configuration in Weaviate below instead.

2. Using an External Vector Database

To connect to an external vector database, configuration takes two steps: Step 1: Set vectorDB.useExternal to true and specify externalType. The 3.9.x chart already defaults to this state (externalType: "qdrant"), so you only need to override externalType when switching to a different type.
vectorDB:
  useExternal: true
  externalType: "<type>"
Step 2: Based on the chosen type, fill in the corresponding externalXxx configuration block. The values.yaml already provides a default skeleton for each type — you only need to override the fields of your target type; there is no need to delete the other type blocks. See Section 4 Appendix for field examples of each type.

Supported Types

Types officially supported by Dify Enterprise

Dify Enterprise officially supports the following vector databases. You also receive technical support for the database connection (see Section 3).
  • qdrant (recommended)
  • weaviate (optional)
  • elasticsearch (optional)

Community-supported types

Dify Community offers support for the following vector databases. If you want to use these, Dify Enterprise also supports them, but with limited technical support (see Section 3).
  • milvus
  • relyt
  • pgvecto-rs
  • tencent
  • analyticdb
  • opensearch
  • lindorm

3. Enterprise Edition Technical Support Scope

When Dify Enterprise is deployed on a cloud (e.g., AWS) and connects to an external vector database, the entire chain typically involves three parties: Dify, the vector database vendor, and the cloud provider. The Dify support team will first identify which layer the issue belongs to.

Shared Responsibility Model

ScopeResponsible party
Dify-side configuration: database config, connection config, knowledge base configDify
Dify database operation logic: connection, Schema/Collection initialization, write, retrievalDify
Semantics and value constraints of vectorDB.* / externalXxx fields in the Helm chartDify
Vector database itself: cluster availability, sharding/replicas, version upgrades, performance tuning, backup/restoreVector database vendor / managed service provider
Infrastructure: VPC, subnets, security groups, IAM/IRSA, DNS, load balancing, cross-AZ networkCloud provider
Capacity planning and config values: node specs, storage capacity, QPS and concurrency estimationUser (Dify provides recommendations only)

What Dify Does Not Directly Support

The following issues may surface in Dify error messages, but the root cause is not on the Dify side and must be handled by the database vendor, cloud provider, or the user:
  • Vector database operations: restart, upgrade, scaling, backup/restore
  • Index parameter tuning on the database side
  • Network and permission-layer failures: VPC peering, security group rules, IAM/IRSA, TLS certificates
  • Capacity planning and load testing: node specs, storage capacity, QPS limit estimation (Dify only provides Dify-side recommendations)
  • Regressions caused by database version bugs or vendor behavior changes (Dify will follow up, but root-cause fixes are on the vendor side)

Differences Between the Two Support Tiers

Support tierIncluded productsCapabilities provided by Dify
Officially supportedqdrant, weaviate, elasticsearchDify-side connector maintenance, version compatibility testing, Helm config troubleshooting
Community supportedmilvus, relyt, pgvecto-rs, tencent, analyticdb, opensearch, lindormConnector availability, configuration documentation, best-effort troubleshooting; deeper issues should be escalated to the vendor or community first
For more details about the vector databases supported by your Dify Enterprise version, see values.yaml at: https://helm-watchdog.dify.ai/ . Actual technical support coverage will be evaluated by the Dify Enterprise support team based on your specific issue.

4. Appendix: Configuration Examples for Each Vector Database

Qdrant

externalType: "qdrant"
  externalQdrant:
    endpoint: "http://your-qdrant-cluster-url.qdrant.tech/"
    apiKey: "#REPLACE_ME#"
FieldDescriptionExample
endpointQdrant cluster URLhttp://your-qdrant-cluster-url.qdrant.tech/
apiKeyQdrant API Key-

Weaviate

externalType: "weaviate"
  externalWeaviate:
    endpoint: "http://weaviate:8080"
    apiKey: "#REPLACE_ME#"
FieldDescriptionExample
endpointWeaviate service addresshttp://weaviate:8080
apiKeyWeaviate API Key-

Elasticsearch

externalType: "elasticsearch"
  externalElasticsearch:
    host: "127.0.0.1"
    port: 9200
    username: "elastic"
    password: "#REPLACE_ME#"
FieldDescriptionExample
hostElasticsearch host127.0.0.1
portPort9200
usernameUsernameelastic
passwordPassword-

Milvus

externalType: "milvus"
  externalMilvus:
    uri: "http://127.0.0.1:19530"
    token: ""
    user: ""
    password: ""
    database: "default"
FieldDescriptionExample
uriMilvus server connection URIhttp://127.0.0.1:19530
tokenAuth token (optional)-
userUsername (optional)-
passwordPassword (optional)-
databaseDatabase namedefault

Relyt (pgvectors)

externalType: "relyt"
  externalRelyt:
    host: "your-relyt.domain"
    port: 5431
    user: "postgres"
    password: "#REPLACE_ME#"
    database: "pgvectors"
FieldDescriptionExample
hostRelyt hostyour-relyt.domain
portPort5431
userUsernamepostgres
passwordPassword-
databaseDatabase namepgvectors

PgVecto-RS

externalType: "pgvecto-rs"
  externalPgVectoRS:
    host: "your-pgvectors.domain"
    port: 5432
    user: "postgres"
    password: "#REPLACE_ME#"
    database: "pgvectors"
FieldDescriptionExample
hostPgVecto-RS hostyour-pgvectors.domain
portPort5432
userUsernamepostgres
passwordPassword-
databaseDatabase namepgvectors

Tencent VectorDB

externalType: "tencent"
  externalTencentVectorDB:
    host: "your-tencent-vector-db.domain"
    apiKey: "#REPLACE_ME#"
    timeout: 30
    username: "tencent"
    password: "#REPLACE_ME#"
    shard: 1
    replicas: 2
    database: "tencent"
FieldDescriptionExample
hostTencent VectorDB hostyour-tencent-vector-db.domain
apiKeyAPI Key-
timeoutConnection timeout (seconds)30
usernameUsernametencent
passwordPassword-
shardNumber of shards1
replicasNumber of replicas2
databaseDatabase nametencent

OpenSearch

externalType: "opensearch"
  externalOpenSearch:
    host: "your-opensearch.domain"
    port: 9200
    user: ""
    password: "#REPLACE_ME#"
    useTLS: false
FieldDescriptionExample
hostOpenSearch hostyour-opensearch.domain
portPort9200
userUsername (optional)-
passwordPassword-
useTLSWhether to enable TLSfalse

AnalyticDB

externalType: "analyticdb"
  externalAnalyticDB:
    keyID: "#REPLACE_ME#"
    keySecret: "#REPLACE_ME#"
    regionID: "#REPLACE_ME#"
    instanceID: "#REPLACE_ME#"
    account: "#REPLACE_ME#"
    password: "#REPLACE_ME#"
    host: "#REPLACE_ME#"
    port: 5432
    namespace: ""
    namespacePassword: ""
    minConnection: 1
    maxConnection: 5
FieldDescriptionExample
keyIDAlibaba Cloud AccessKey ID-
keySecretAlibaba Cloud AccessKey Secret-
regionIDRegion ID-
instanceIDInstance ID-
accountAccount-
passwordPassword-
hostHost-
portPort5432
namespaceNamespace (optional)-
namespacePasswordNamespace password (optional)-
minConnectionMinimum connections1
maxConnectionMaximum connections5

Lindorm

externalType: "lindorm"
  externalLindorm:
    url: "http://localhost:30070"
    username: "admin"
    password: "admin"
    indexType: "hnsw"
    distanceType: "l2"
    usingUgc: true
    queryTimeout: 2.0
FieldDescriptionExample
urlLindorm search engine URLhttp://localhost:30070
usernameUsernameadmin
passwordPasswordadmin
indexTypeIndex typehnsw
distanceTypeDistance metricl2
usingUgcWhether to use UGC modetrue
queryTimeoutQuery timeout (seconds)2.0