BorisPolonsky/dify-helm

Deploy langgenious/dify, an LLM based app on kubernetes with helm chart.

dify-helm is a Helm chart that lets you deploy Dify — an open-source platform for building LLM-based chatbot applications — onto a Kubernetes cluster. Helm is a tool that packages and manages Kubernetes applications, so this project provides a ready-made configuration to run Dify's many services together.

What you need

  • Kubernetes version 1.23 or newer
  • Helm version 3.12 or newer

How to install

Add the chart repository, update it, then install with a single command:

helm repo add dify https://borispolonsky.github.io/dify-helm
helm repo update
helm install my-release dify/dify

For custom settings, the README points to a more detailed chart-specific guide.

How it works (network architecture)

The chart sets up a Nginx reverse proxy as the main entry point. All incoming traffic goes through this proxy, which then routes requests to different backend services based on the URL path. For example:

  • /api and /console/api go to the API service (port 5001)
  • / (the default) goes to the Web UI (port 3000)
  • /e/ goes to the Plugin Daemon (port 5002)
  • /agent-stub goes to the Agent Backend (port 5050)

The proxy also forwards some paths to external services (like a marketplace API).

Core components

Each component runs as a separate pod (a Kubernetes unit) with a specific role:

Component Image Port Role
API langgenius/dify-api:1.18.0 5001 Main REST API and business logic
Web langgenius/dify-web:1.18.0 3000 Frontend web interface
Worker langgenius/dify-api:1.18.0 – Background task processing (Celery)
Beat langgenius/dify-api:1.18.0 – Schedules periodic tasks (Celery Beat)
Sandbox langgenius/dify-sandbox:0.2.15 8194 Secure code execution environment
Agent Backend langgenius/dify-agent-backend:1.18.0 5050 Orchestrates agent runs
Local Sandbox langgenius/dify-agent-local-sandbox:1.18.0 5004 Executes agent shell commands
Plugin Daemon langgenius/dify-plugin-daemon:0.6.10-local 5002, 5003 Manages and runs plugins
SSRF Proxy ubuntu/squid:latest 3128 Protects against SSRF attacks by proxying external requests
Nginx Proxy nginx:latest 80 Reverse proxy and load balancer

These components talk to each other internally. For instance, the API and Worker use the Sandbox for code execution, and the Agent Backend uses the Local Sandbox for shell operations. They also connect to databases and storage.

Data layer

  • PostgreSQL – main database (port 5432)
  • Redis – caching, sessions, task queues (port 6379)
  • Vector DB – for storing and searching embeddings (supports Weaviate, Qdrant, Milvus, PGVector, etc.)

Storage for files can be local (PVC) or cloud-based (S3, Azure Blob, GCS, etc.).

External services you can plug in

The chart supports using external services instead of the built-in ones:

  • Redis (standalone or Sentinel)
  • Databases: PostgreSQL or MySQL
  • Object storage: Amazon S3, Azure Blob, Alibaba OSS, Google Cloud, Tencent COS, Huawei OBS, Volcengine TOS
  • Vector databases: Weaviate, Qdrant, Milvus, PGVector, Tencent Vector DB, MyScaleDB, TableStore, Elasticsearch

These are optional alternatives — the chart can run with its own internal services if you don't provide external ones.

Summary

In short, dify-helm gives you a one-command way to run the full Dify stack on Kubernetes, with a clear separation of concerns (web, API, background workers, plugins, sandboxes) and flexible options to connect to external databases and storage. The README includes a detailed architecture diagram and traffic routing rules, but the core idea is: install the chart, and you get a working Dify deployment.

Related

  • Project
  • Project
  • Project
  • Project
  • Project