Requirements

This is the recommended configuration for testing deployment or staging deployment. You can adjust the configuration based on your requirements.

  • Kubernetes Cluster
    • 1 Worker Nodes: 4 CPU, 16 GB RAM
  • Container Registry
    • AWS ECR(with AK/SK or IRSA)/ Azure ACR / Aliyun ACR / Tencent TCR / Dockerhub
  • Persistence Storage
    • S3 / AWS S3 (with AK/SK or IRSA) / Azure Blob / Aliyun OSS / Tencent COS
    • 100 GB Storage
  • Postgres Database
    • Version 14+
    • 2 CPU, 4 GB RAM
    • 256 GB Storage
  • Redis Database
    • Version 6+
    • 1 GB RAM
  • Vector DB Virtual Machine - Qdrant Single Node
    • 1 Virtual Machines
    • 4 CPU, 8 GB RAM
    • 100 GB Storage

Deployment

1. Get Helm Repository Info

helm repo add dify https://langgenius.github.io/dify-helm
helm repo update

For more information, please refer to the Dify Helm Chart.

2. Save Helm Chart Values

  • Save Helm chart values to a file named values.yaml.
  • Update the values.yaml file with your configuration.
  • Please replace the #REPLACE_ME# placeholders with your actual values.
  • Please replace “dify123456” with your own value.
###################################
# Please replace "dify123456" with your own value
###################################
global:
  appSecretKey: 'dify123456'
  consoleApiDomain: "console.dify.local"
  consoleWebDomain: "console.dify.local"
  serviceApiDomain: "api.dify.local"
  appApiDomain: "app.dify.local"
  appWebDomain: "app.dify.local"
  filesDomain: "upload.dify.local"
  enterpriseDomain: "enterprise.dify.local"

ingress:
  enabled: true
  className: "nginx"
  annotations: {
    # set file upload size limit
    nginx.ingress.kubernetes.io/proxy-body-size: "15m"
  }

api:
  replicas: 3
  serverWorkerAmount: 1
  innerApi:
    apiKey: "dify123456"
worker:
  replicas: 3
  celeryWorkerAmount: 1
web:
  replicas: 1
sandbox:
  replicas: 1
  apiKey: "dify123456"
enterpriseAudit:
  replicas: 1
enterprise:
  replicas: 1
  appSecretKey: "dify123456"
  adminAPIsSecretKeySalt: "dify123456"
  innerApi:
    apiKey: "dify123456"
enterpriseFrontend:
  replicas: 1
ssrfProxy:
  enabled: true
  replicas: 1
unstructured:
  enabled: true
  replicas: 1
plugin_daemon:
  replicas: 1
  apiKey: "dify123456"
plugin_controller:
  replicas: 1
plugin_connector:
  replicas: 1
  apiKey: "dify123456"
gateway:
  replicas: 1

###################################
# Persistence Configration
###################################
persistence:
  type: "s3"
  s3:
    endpoint: "https://xxx.r2.cloudflarestorage.com"
    accessKey: "#REPLACE_ME#"
    secretKey: "#REPLACE_ME#"
    region: "us-east-1"
    bucketName: "your-bucket-name"
    addressType: ""
    useAwsManagedIam: false
    useAwsS3: true

###################################
# External postgres
###################################
externalPostgres:
  enabled: true
  address: "#REPLACE_ME#"
  port: 5432
  credentials:
    dify:
      database: "dify"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    plugin_daemon:
      database: "dify_plugin_daemon"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    enterprise:
      database: "enterprise"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    audit:
      database: "audit"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"

###################################
# External Redis
###################################
externalRedis:
  enabled: true
  host: "#REPLACE_ME#"
  port: 6379
  username: ""
  password: "#REPLACE_ME#"
  useSSL: false

###################################
# External Qdrant
###################################
vectorDB:
  useExternal: true
  externalType: "qdrant"
  externalQdrant:
    endpoint: "http://your-qdrant-cluster-url.qdrant.tech/"
    apiKey: "#REPLACE_ME#"

imagePullSecrets: []

3. Configure Container Registry

4. Configure Persistence Storage

5. Configure External postgres

6. Configure External Redis

7. Configure External Qdrant

8. Configure Ingress Controller

9. Install Dify Helm Chart

helm upgrade -i dify -f values.yaml dify/dify

10. Verify Installation

Advanced Configuration

1. Domain and SSL Certificate

2. Email Provider

3. Performance Tuning

Requirements

This is the recommended configuration for testing deployment or staging deployment. You can adjust the configuration based on your requirements.

  • Kubernetes Cluster
    • 1 Worker Nodes: 4 CPU, 16 GB RAM
  • Container Registry
    • AWS ECR(with AK/SK or IRSA)/ Azure ACR / Aliyun ACR / Tencent TCR / Dockerhub
  • Persistence Storage
    • S3 / AWS S3 (with AK/SK or IRSA) / Azure Blob / Aliyun OSS / Tencent COS
    • 100 GB Storage
  • Postgres Database
    • Version 14+
    • 2 CPU, 4 GB RAM
    • 256 GB Storage
  • Redis Database
    • Version 6+
    • 1 GB RAM
  • Vector DB Virtual Machine - Qdrant Single Node
    • 1 Virtual Machines
    • 4 CPU, 8 GB RAM
    • 100 GB Storage

Deployment

1. Get Helm Repository Info

helm repo add dify https://langgenius.github.io/dify-helm
helm repo update

For more information, please refer to the Dify Helm Chart.

2. Save Helm Chart Values

  • Save Helm chart values to a file named values.yaml.
  • Update the values.yaml file with your configuration.
  • Please replace the #REPLACE_ME# placeholders with your actual values.
  • Please replace “dify123456” with your own value.
###################################
# Please replace "dify123456" with your own value
###################################
global:
  appSecretKey: 'dify123456'
  consoleApiDomain: "console.dify.local"
  consoleWebDomain: "console.dify.local"
  serviceApiDomain: "api.dify.local"
  appApiDomain: "app.dify.local"
  appWebDomain: "app.dify.local"
  filesDomain: "upload.dify.local"
  enterpriseDomain: "enterprise.dify.local"

ingress:
  enabled: true
  className: "nginx"
  annotations: {
    # set file upload size limit
    nginx.ingress.kubernetes.io/proxy-body-size: "15m"
  }

api:
  replicas: 3
  serverWorkerAmount: 1
  innerApi:
    apiKey: "dify123456"
worker:
  replicas: 3
  celeryWorkerAmount: 1
web:
  replicas: 1
sandbox:
  replicas: 1
  apiKey: "dify123456"
enterpriseAudit:
  replicas: 1
enterprise:
  replicas: 1
  appSecretKey: "dify123456"
  adminAPIsSecretKeySalt: "dify123456"
  innerApi:
    apiKey: "dify123456"
enterpriseFrontend:
  replicas: 1
ssrfProxy:
  enabled: true
  replicas: 1
unstructured:
  enabled: true
  replicas: 1
plugin_daemon:
  replicas: 1
  apiKey: "dify123456"
plugin_controller:
  replicas: 1
plugin_connector:
  replicas: 1
  apiKey: "dify123456"
gateway:
  replicas: 1

###################################
# Persistence Configration
###################################
persistence:
  type: "s3"
  s3:
    endpoint: "https://xxx.r2.cloudflarestorage.com"
    accessKey: "#REPLACE_ME#"
    secretKey: "#REPLACE_ME#"
    region: "us-east-1"
    bucketName: "your-bucket-name"
    addressType: ""
    useAwsManagedIam: false
    useAwsS3: true

###################################
# External postgres
###################################
externalPostgres:
  enabled: true
  address: "#REPLACE_ME#"
  port: 5432
  credentials:
    dify:
      database: "dify"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    plugin_daemon:
      database: "dify_plugin_daemon"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    enterprise:
      database: "enterprise"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"
    audit:
      database: "audit"
      username: "postgres"
      password: "#REPLACE_ME#"
      sslmode: "require"

###################################
# External Redis
###################################
externalRedis:
  enabled: true
  host: "#REPLACE_ME#"
  port: 6379
  username: ""
  password: "#REPLACE_ME#"
  useSSL: false

###################################
# External Qdrant
###################################
vectorDB:
  useExternal: true
  externalType: "qdrant"
  externalQdrant:
    endpoint: "http://your-qdrant-cluster-url.qdrant.tech/"
    apiKey: "#REPLACE_ME#"

imagePullSecrets: []

3. Configure Container Registry

4. Configure Persistence Storage

5. Configure External postgres

6. Configure External Redis

7. Configure External Qdrant

8. Configure Ingress Controller

9. Install Dify Helm Chart

helm upgrade -i dify -f values.yaml dify/dify

10. Verify Installation

Advanced Configuration

1. Domain and SSL Certificate

2. Email Provider

3. Performance Tuning