From a970f528f14b4d7fb50a4f2654bc6b7e22d44ada Mon Sep 17 00:00:00 2001 From: BorisPolonsky Date: Thu, 29 Oct 2026 17:27:41 +0800 Subject: [PATCH 1/4] Update image tags to align with Dify 1.18.0 --- README.md | 26 +++++++++---------- charts/dify/values.yaml | 8 +++--- .../values-eso-external-s3-pg-es-redis.yaml | 8 +++--- ci/values/values-eso-otel.yaml | 8 +++--- ci/values/values-eso.yaml | 8 +++--- ci/values/values-legacy-external-all.yaml | 8 +++--- .../values-legacy-external-mysql-all.yaml | 8 +++--- ci/values/values-legacy.yaml | 8 +++--- 8 files changed, 41 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index eaeab65c..1b06de99 100644 --- a/README.md +++ b/README.md @@ -46,22 +46,22 @@ graph TB ProxyPod -->|Agent Stub| AgentBackendService[🤖 Agent Backend Service
Port: 5050] %% Backend Pods - APIService --> APIPod[📦 API Pod
langgenius/dify-api:1.17.0
Port: 5001] - WebService --> WebPod[📦 Web Pod
langgenius/dify-web:1.17.0
Port: 3000] + APIService --> APIPod[📦 API Pod
langgenius/dify-api:1.18.0
Port: 5001] + WebService --> WebPod[📦 Web Pod
langgenius/dify-web:1.18.0
Port: 3000] PluginService --> PluginPod[📦 Plugin Daemon Pod
langgenius/dify-plugin-daemon:0.6.10-local
Ports: 5002, 5003] %% Worker Pod (Background Processing) - WorkerPod[📦 Worker Pod
langgenius/dify-api:1.17.0] + WorkerPod[📦 Worker Pod
langgenius/dify-api:1.18.0] %% Beat Pod (Periodic task scheduler) - BeatPod[📦 Beat Pod
langgenius/dify-api:1.17.0] + BeatPod[📦 Beat Pod
langgenius/dify-api:1.18.0] %% Sandbox Service SandboxService[🏖️ Sandbox Service
Port: 8194] --> SandboxPod[📦 Sandbox Pod
langgenius/dify-sandbox:0.2.15
Port: 8194] %% Agent Stack - AgentBackendService[🤖 Agent Backend Service
Port: 5050] --> AgentBackendPod[📦 Agent Backend Pod
langgenius/dify-agent-backend:1.17.0
Port: 5050] - LocalSandboxService[🐚 Local Sandbox Service
Port: 5004] --> LocalSandboxPod[📦 Local Sandbox Pod
langgenius/dify-agent-local-sandbox:1.17.0
Port: 5004] + AgentBackendService[🤖 Agent Backend Service
Port: 5050] --> AgentBackendPod[📦 Agent Backend Pod
langgenius/dify-agent-backend:1.18.0
Port: 5050] + LocalSandboxService[🐚 Local Sandbox Service
Port: 5004] --> LocalSandboxPod[📦 Local Sandbox Pod
langgenius/dify-agent-local-sandbox:1.18.0
Port: 5004] %% SSRF Proxy Service SSRFService[🛡️ SSRF Proxy Service
Port: 3128] --> SSRFPod[📦 SSRF Proxy Pod
ubuntu/squid:latest
Port: 3128] @@ -190,14 +190,14 @@ The Nginx proxy handles traffic routing with the following rules: | Component | Image | Port | Role | |-----------|-------|------|------| -| **API** | `langgenius/dify-api:1.17.0` | 5001 | RESTful API server, business logic processing | -| **API WebSocket** | `langgenius/dify-api:1.17.0` | 5001 | Socket.IO process for workflow collaboration | -| **Web** | `langgenius/dify-web:1.17.0` | 3000 | Web UI frontend | -| **Worker** | `langgenius/dify-api:1.17.0` | - | Background task processing (Celery) | -| **Beat** | `langgenius/dify-api:1.17.0` | - | Periodic task scheduler (Celery Beat) | +| **API** | `langgenius/dify-api:1.18.0` | 5001 | RESTful API server, business logic processing | +| **API WebSocket** | `langgenius/dify-api:1.18.0` | 5001 | Socket.IO process for workflow collaboration | +| **Web** | `langgenius/dify-web:1.18.0` | 3000 | Web UI frontend | +| **Worker** | `langgenius/dify-api:1.18.0` | - | Background task processing (Celery) | +| **Beat** | `langgenius/dify-api:1.18.0` | - | Periodic task scheduler (Celery Beat) | | **Sandbox** | `langgenius/dify-sandbox:0.2.15` | 8194 | Secure code execution environment | -| **Agent Backend** | `langgenius/dify-agent-backend:1.17.0` | 5050 | Agent run orchestration | -| **Local Sandbox** | `langgenius/dify-agent-local-sandbox:1.17.0` | 5004 | Agent shellctl execution environment | +| **Agent Backend** | `langgenius/dify-agent-backend:1.18.0` | 5050 | Agent run orchestration | +| **Local Sandbox** | `langgenius/dify-agent-local-sandbox:1.18.0` | 5004 | Agent shellctl execution environment | | **Plugin Daemon** | `langgenius/dify-plugin-daemon:0.6.10-local` | 5002, 5003 | Plugin management and execution | | **SSRF Proxy** | `ubuntu/squid:latest` | 3128 | External request security proxy | | **Nginx Proxy** | `nginx:latest` | 80 | Reverse proxy, load balancing | diff --git a/charts/dify/values.yaml b/charts/dify/values.yaml index 31f0a0df..63515c70 100644 --- a/charts/dify/values.yaml +++ b/charts/dify/values.yaml @@ -46,7 +46,7 @@ global: image: api: repository: langgenius/dify-api - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -57,7 +57,7 @@ image: web: repository: langgenius/dify-web - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -112,7 +112,7 @@ image: agentBackend: repository: langgenius/dify-agent-backend - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -123,7 +123,7 @@ image: localSandbox: repository: langgenius/dify-agent-local-sandbox - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. diff --git a/ci/values/values-eso-external-s3-pg-es-redis.yaml b/ci/values/values-eso-external-s3-pg-es-redis.yaml index 798becbd..12c903e2 100644 --- a/ci/values/values-eso-external-s3-pg-es-redis.yaml +++ b/ci/values/values-eso-external-s3-pg-es-redis.yaml @@ -1,12 +1,12 @@ image: api: repository: langgenius/dify-api - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent web: repository: langgenius/dify-web - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent sandbox: @@ -31,12 +31,12 @@ image: agentBackend: repository: langgenius/dify-agent-backend - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent localSandbox: repository: langgenius/dify-agent-local-sandbox - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent api: diff --git a/ci/values/values-eso-otel.yaml b/ci/values/values-eso-otel.yaml index e4909949..4d2a2e17 100644 --- a/ci/values/values-eso-otel.yaml +++ b/ci/values/values-eso-otel.yaml @@ -1,12 +1,12 @@ image: api: repository: langgenius/dify-api - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent web: repository: langgenius/dify-web - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent sandbox: @@ -31,12 +31,12 @@ image: agentBackend: repository: langgenius/dify-agent-backend - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent localSandbox: repository: langgenius/dify-agent-local-sandbox - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent api: diff --git a/ci/values/values-eso.yaml b/ci/values/values-eso.yaml index 674d8644..8654dfce 100644 --- a/ci/values/values-eso.yaml +++ b/ci/values/values-eso.yaml @@ -1,12 +1,12 @@ image: api: repository: langgenius/dify-api - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent web: repository: langgenius/dify-web - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent sandbox: @@ -31,12 +31,12 @@ image: agentBackend: repository: langgenius/dify-agent-backend - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent localSandbox: repository: langgenius/dify-agent-local-sandbox - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent api: diff --git a/ci/values/values-legacy-external-all.yaml b/ci/values/values-legacy-external-all.yaml index 2c6bfec0..12f0c4fb 100644 --- a/ci/values/values-legacy-external-all.yaml +++ b/ci/values/values-legacy-external-all.yaml @@ -1,12 +1,12 @@ image: api: repository: langgenius/dify-api - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent web: repository: langgenius/dify-web - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent sandbox: @@ -31,12 +31,12 @@ image: agentBackend: repository: langgenius/dify-agent-backend - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent localSandbox: repository: langgenius/dify-agent-local-sandbox - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent api: diff --git a/ci/values/values-legacy-external-mysql-all.yaml b/ci/values/values-legacy-external-mysql-all.yaml index a4bdb886..1c4fcb3f 100644 --- a/ci/values/values-legacy-external-mysql-all.yaml +++ b/ci/values/values-legacy-external-mysql-all.yaml @@ -1,12 +1,12 @@ image: api: repository: langgenius/dify-api - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent web: repository: langgenius/dify-web - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent sandbox: @@ -31,12 +31,12 @@ image: agentBackend: repository: langgenius/dify-agent-backend - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent localSandbox: repository: langgenius/dify-agent-local-sandbox - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent api: diff --git a/ci/values/values-legacy.yaml b/ci/values/values-legacy.yaml index 9cd9c032..4ea600f8 100644 --- a/ci/values/values-legacy.yaml +++ b/ci/values/values-legacy.yaml @@ -5,12 +5,12 @@ image: api: repository: langgenius/dify-api - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent web: repository: langgenius/dify-web - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent sandbox: @@ -35,12 +35,12 @@ image: agentBackend: repository: langgenius/dify-agent-backend - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent localSandbox: repository: langgenius/dify-agent-local-sandbox - tag: "1.17.0" + tag: "1.18.0" pullPolicy: IfNotPresent api: From 88324d4e50efc395f494ee12c975b8ee7c4b4690 Mon Sep 17 00:00:00 2001 From: BorisPolonsky Date: Thu, 29 Oct 2026 19:01:56 +0800 Subject: [PATCH 2/4] Default shellctlAuthToken to global.internalApiKey DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN and SHELLCTL_AUTH_TOKEN now fall back to global.internalApiKey when unset, consistent with other internal credentials. --- charts/dify/templates/credentials.tpl | 4 ++-- charts/dify/values.yaml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/dify/templates/credentials.tpl b/charts/dify/templates/credentials.tpl index d2a870d3..ee7f0f84 100644 --- a/charts/dify/templates/credentials.tpl +++ b/charts/dify/templates/credentials.tpl @@ -273,14 +273,14 @@ DIFY_AGENT_INNER_API_KEY: {{ .Values.api.auth.internalApiKey | default .Values.g {{- if .Values.externalE2bSandbox.enabled }} DIFY_AGENT_E2B_API_KEY: {{ .Values.externalE2bSandbox.apiKey | b64enc | quote }} {{- else if .Values.localSandbox.enabled }} -DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN: {{ .Values.agentBackend.auth.shellctlAuthToken | b64enc | quote }} +DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN: {{ .Values.agentBackend.auth.shellctlAuthToken | default .Values.global.internalApiKey | b64enc | quote }} {{- end }} DIFY_AGENT_SERVER_SECRET_KEY: {{ .Values.agentBackend.auth.serverSecretKey | b64enc | quote }} DIFY_AGENT_API_TOKEN: {{ .Values.agentBackend.auth.apiToken | default .Values.global.internalApiKey | b64enc | quote }} {{- end }} {{- define "dify.localSandbox.credentials" -}} -SHELLCTL_AUTH_TOKEN: {{ .Values.agentBackend.auth.shellctlAuthToken | b64enc | quote }} +SHELLCTL_AUTH_TOKEN: {{ .Values.agentBackend.auth.shellctlAuthToken | default .Values.global.internalApiKey | b64enc | quote }} {{- end }} {{- define "dify.pluginDaemon.credentials" -}} diff --git a/charts/dify/values.yaml b/charts/dify/values.yaml index 63515c70..427f2dea 100644 --- a/charts/dify/values.yaml +++ b/charts/dify/values.yaml @@ -1147,6 +1147,7 @@ agentBackend: ## serverSecretKey: "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY" ## @param agentBackend.auth.shellctlAuthToken Shared as agent DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN and localSandbox SHELLCTL_AUTH_TOKEN + ## If not set, uses global.internalApiKey ## shellctlAuthToken: "" From 30f5cc8b22366ef67475f4e8e70e098382978ba0 Mon Sep 17 00:00:00 2001 From: BorisPolonsky Date: Thu, 29 Oct 2026 19:27:57 +0800 Subject: [PATCH 3/4] Enforce auth token for local-sandbox via explicit shellctl serve command --- charts/dify/templates/local-sandbox-deployment.yaml | 4 ++++ charts/dify/values.schema.json | 5 +++++ charts/dify/values.yaml | 3 +++ 3 files changed, 12 insertions(+) diff --git a/charts/dify/templates/local-sandbox-deployment.yaml b/charts/dify/templates/local-sandbox-deployment.yaml index 41501e1e..62d63714 100644 --- a/charts/dify/templates/local-sandbox-deployment.yaml +++ b/charts/dify/templates/local-sandbox-deployment.yaml @@ -67,6 +67,10 @@ spec: - image: "{{ .Values.image.localSandbox.repository }}:{{ default .Chart.AppVersion .Values.image.localSandbox.tag }}" imagePullPolicy: "{{ .Values.image.localSandbox.pullPolicy }}" name: local-sandbox + {{- if .Values.localSandbox.command }} + command: + {{- toYaml .Values.localSandbox.command | nindent 12 }} + {{- end }} {{- if .Values.localSandbox.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.localSandbox.customLivenessProbe "context" $) | nindent 12 }} {{- else if .Values.localSandbox.livenessProbe.enabled }} diff --git a/charts/dify/values.schema.json b/charts/dify/values.schema.json index 6a42ddef..6e27c20c 100644 --- a/charts/dify/values.schema.json +++ b/charts/dify/values.schema.json @@ -1002,6 +1002,11 @@ "affinity": { "type": "object" }, "tolerations": { "type": "array" }, "priorityClassName": { "type": "string" }, + "command": { + "type": "array", + "description": "Default startup command for the local sandbox container.", + "default": ["shellctl", "serve", "--listen", "0.0.0.0:5004", "--require-auth-token"] + }, "shareProcessNamespace": { "type": "boolean", "description": "Share a single process namespace between all of the containers in Dify local sandbox pods.", diff --git a/charts/dify/values.yaml b/charts/dify/values.yaml index 427f2dea..c046525d 100644 --- a/charts/dify/values.yaml +++ b/charts/dify/values.yaml @@ -1175,6 +1175,9 @@ localSandbox: affinity: {} tolerations: [] priorityClassName: "" + ## @param localSandbox.command Default startup command for the local sandbox container + ## + command: ["shellctl", "serve", "--listen", "0.0.0.0:5004", "--require-auth-token"] ## @param localSandbox.shareProcessNamespace Share a single process namespace between all of the containers in Dify local sandbox pods ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ ## From 0c5dab7e0ed576ae885b659fc71d1efce91bb2d8 Mon Sep 17 00:00:00 2001 From: BorisPolonsky Date: Fri, 30 Oct 2026 15:29:34 +0800 Subject: [PATCH 4/4] Default `global.internalApiKey` to non-empty placeholder Dify 1.18.0 local-sandbox runs with --require-auth-token and agentBackend.auth.shellctlAuthToken now falls back to global.internalApiKey; give it a non-empty default so fresh installs work out of the box. --- charts/dify/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/dify/values.yaml b/charts/dify/values.yaml index c046525d..1bf675d1 100644 --- a/charts/dify/values.yaml +++ b/charts/dify/values.yaml @@ -7,9 +7,9 @@ global: edition: "COMMUNITY" # A secret key that is used for securely signing the session cookie and encrypting sensitive information on the database. You can generate a strong key using `openssl rand -base64 42`. appSecretKey: "sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U" - # A global secret key for all inter-component API calls among Dify containers (e.g. `api`, `sandbox`, `pluginDaemon` and `agentBackend`). You can generate a strong key using `openssl rand -base64 42`. + # A global secret key for all inter-component API calls among Dify containers (e.g. `api`, `sandbox`, `pluginDaemon`, `agentBackend` and `localSandbox`). You can generate a strong key using `openssl rand -base64 42`. # Takes no effect when left empty. Can be overridden by component-specific values. - internalApiKey: "" + internalApiKey: "YOUR-INTERNAL-API-KEY" # The backend domain of the console API, used to concatenate the authorization callback. # If empty, it is the same domain. Example: console.dify.ai consoleApiDomain: ""