openclaw
by serhanekicii
Helm chart for deploying OpenClaw on Kubernetes — an AI assistant that connects to messaging platforms and executes tasks autonomously.
About this chart
🦞 OpenClaw Helm Chart
Helm chart for deploying OpenClaw on Kubernetes — an AI assistant that connects to messaging platforms and executes tasks autonomously.
Built on bjw-s app-template. For a detailed walkthrough, see the blog post.
Architecture
OpenClaw runs as a single-instance deployment (cannot scale horizontally):
| Component | Port | Description |
|---|---|---|
| Gateway | 18789 | Main HTTP/WebSocket interface |
| Chromium | 9222 | Headless browser for automation (CDP, optional) |
App Version: 2026.5.22
Installation
Prerequisites
- Kubernetes
>=1.26.0-0 - Helm 3.0+
- API key from a supported LLM provider (Anthropic, OpenAI, etc.)
Steps
- Add the repository:
helm repo add openclaw https://serhanekicii.github.io/openclaw-helm
helm repo update
- Create namespace and secret:
kubectl create namespace openclaw
kubectl create secret generic openclaw-env-secret -n openclaw \
--from-literal=ANTHROPIC_API_KEY=sk-ant-xxx \
--from-literal=OPENCLAW_GATEWAY_TOKEN=your-token
- Get default values:
helm show values openclaw/openclaw > values.yaml
- Reference your secret in values.yaml:
app-template:
controllers:
main:
containers:
main:
envFrom:
- secretRef:
name: openclaw-env-secret
- Install:
helm install openclaw openclaw/openclaw -n openclaw -f values.yaml
- Pair your device:
# Access the web UI
kubectl port-forward -n openclaw svc/openclaw 18789:18789
# Open http://localhost:18789, enter your Gateway Token, click Connect
# Approve the pairing request
kubectl exec -n openclaw deployment/openclaw -c main -- node dist/index.js devices list
kubectl exec -n openclaw deployment/openclaw -c main -- node dist/index.js devices approve <REQUEST_ID>
If you maintain a fork of OpenClaw or build your own image, point to your container registry:
app-template:
controllers:
main:
containers:
main:
image:
repository: ghcr.io/your-org/openclaw-fork
tag: "2026.5.22"
For images hosted in a private registry inside your cluster:
app-template:
controllers:
main:
containers:
main:
image:
repository: registry.internal/openclaw
tag: "2026.5.22"
pullPolicy: Always
Uninstall
helm uninstall openclaw -n openclaw
kubectl delete pvc -n openclaw -l app.kubernetes.io/name=openclaw # optional: remove data
Configuration
All values are nested under app-template:. See values.yaml for full reference.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| app-template.chromiumVersion | string | "148.0.7778.97" | Chromium sidecar image version |
| app-template.configMaps.config.data."openclaw.json" | string | "{\n // Gateway configuration\n \"gateway\": {\n \"port\": 18789,\n \"mode\": \"local\",\n // IMPORTANT: trustedProxies uses exact IP matching only\n // - CIDR notation is NOT supported - list each proxy IP individually\n // - IPv6 exact addresses may work but are untested\n // - Recommend single-stack IPv4 deployments for simplicity\n \"trustedProxies\": [\"10.0.0.1\"]\n },\n\n // Browser configuration (Chromium sidecar)\n \"browser\": {\n \"enabled\": true,\n \"defaultProfile\": \"default\",\n \"profiles\": {\n \"default\": {\n \"cdpUrl\": \"http://localhost:9222\",\n \"color\": \"#4285F4\"\n }\n }\n },\n\n // Agent configuration\n \"agents\": {\n \"defaults\": {\n \"workspace\": \"/home/node/.openclaw/workspace\",\n \"model\": {\n // Uses ANTHROPIC_API_KEY from environment\n \"primary\": \"anthropic/claude-opus-4-6\"\n },\n \"userTimezone\": \"UTC\",\n \"timeoutSeconds\": 600,\n \"maxConcurrent\": 1\n },\n \"list\": [\n {\n \"id\": \"main\",\n \"default\": true,\n \"identity\": {\n \"name\": \"OpenClaw\",\n \"emoji\": \"🦞\"\n }\n }\n ]\n },\n\n // Session management\n \"session\": {\n \"scope\": \"per-sender\",\n \"store\": \"/home/node/.openclaw/sessions\",\n \"reset\": {\n \"mode\": \"idle\",\n \"idleMinutes\": 60\n }\n },\n\n // Logging\n \"logging\": {\n \"level\": \"info\",\n \"consoleLevel\": \"info\",\n \"consoleStyle\": \"compact\",\n \"redactSensitive\": \"tools\"\n },\n\n // Tools configuration\n \"tools\": {\n \"profile\": \"full\",\n \"web\": {\n \"search\": {\n \"enabled\": false\n },\n \"fetch\": {\n \"enabled\": true\n }\n }\n }\n\n // Channel configuration can be added here:\n // \"channels\": {\n // \"telegram\": {\n // \"botToken\": \"${TELEGRAM_BOT_TOKEN}\",\n // \"enabled\": true\n // },\n // \"discord\": {\n // \"token\": \"${DISCORD_BOT_TOKEN}\"\n // },\n // \"slack\": {\n // \"botToken\": \"${SLACK_BOT_TOKEN}\",\n // \"appToken\": \"${SLACK_APP_TOKEN}\"\n // }\n // }\n}\n" | |
| app-template.configMaps.config.data.bash_aliases | string | "alias openclaw='node /app/dist/index.js'\n" | |
| app-template.configMaps.config.enabled | bool | true | |
| app-template.configMaps.scripts.data."init-config.sh" | string | `"log() { echo "[$(date -Iseconds)] [init-config] $*"; }\n\nlog "Starting config initialization"\nmkdir -p /home/node/.openclaw\nCONFIG_MODE="${CONFIG_MODE:-merge}"\n\nif [ "$CONFIG_MODE" = "merge" ] && [ -f /home/node/.openclaw/openclaw.json ]; then\n log "Mode: merge - merging Helm config with existing config"\n if node -e "\n const fs = require('fs');\n // Strip JSON5 single-line comments while preserving // inside strings (e.g. URLs)\n const stripComments = (s) => {\n let r = '', q = false, i = 0;\n while (i < s.length) {\n if (q) {\n if (s[i] === '\\\\') { r += s[i] + s[i+1]; i += 2; continue; }\n if (s[i] === '\"') q = false;\n r += s[i++];\n } else if (s[i] === '\"') {\n q = true; r += s[i++];\n } else if (s[i] === '/' && s[i+1] === '/') {\n while (i < s.length && s[i] !== '\n') i++;\n } else { r += s[i++]; }\n }\n return r;\n };\n let existing;\n try {\n existing = JSON.parse(stripComments(fs.readFileSync('/home/node/.openclaw/openclaw.json', 'utf8')));\n } catch (e) {\n console.error('[init-config] Warning: existing config is not valid JSON, will overwrite');\n process.exit(1);\n }\n const helm = JSON.parse(stripComments(fs.readFileSync('/config/openclaw.json', 'utf8')));\n const deepMerge = (target, source) => {\n for (const key of Object.keys(source)) {\n if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {\n target[key] = target[key] | |
| app-template.configMaps.scripts.data."init-skills.sh" | string | `"log() { echo "[$(date -Iseconds)] [init-skills] $*"; }\n\nlog "Starting skills initialization"\n\n# ============================================================\n# Runtime Dependencies\n# ============================================================\n# Some skills require additional runtimes (Python, Go, etc.)\n# Install them here so they persist across pod restarts.\n#\n# Example: Install uv (Python package manager) for Python skills\n# mkdir -p /home/node/.openclaw/bin\n# if [ ! -f /home/node/.openclaw/bin/uv ]; then\n# log "Installing uv..."\n# curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=/home/node/.openclaw/bin sh\n# fi\n#\n# Example: Install pnpm and packages for interfaces (e.g., MS Teams)\n# The read-only filesystem and non-root UID prevent writing to default\n# pnpm paths (/usr/local/lib/node_modules, ~/.local/share/pnpm, etc.).\n# Redirect PNPM_HOME to the PVC so the binary persists across restarts.\n# The init container's HOME=/tmp ensures pnpm's cache, state, and config\n# writes land on /tmp (writable emptyDir). The store goes on the PVC so\n# hardlinks work (same filesystem as node_modules) and persist.\n# PNPM_HOME=/home/node/.openclaw/pnpm\n# mkdir -p "$PNPM_HOME"\n# if [ ! -f "$PNPM_HOME/pnpm" ]; then\n# log "Installing pnpm..."\n# curl -fsSL https://get.pnpm.io/install.sh |
| app-template.configMaps.scripts.enabled | bool | true | |
| app-template.configMode | string | "merge" | Config mode: merge preserves runtime changes, overwrite for strict GitOps |
| app-template.controllers.main.containers.chromium | object | {"enabled":true,"env":{"XDG_CACHE_HOME":"/tmp"},"image":{"repository":"chromedp/headless-shell","tag":"{{ .Values.chromiumVersion }}"},"probes":{"liveness":{"custom":true,"enabled":true,"spec":{"failureThreshold":6,"httpGet":{"path":"/json/version","port":9222},"initialDelaySeconds":10,"periodSeconds":30,"timeoutSeconds":5}},"readiness":{"custom":true,"enabled":true,"spec":{"httpGet":{"path":"/json/version","port":9222},"initialDelaySeconds":5,"periodSeconds":10}},"startup":{"custom":true,"enabled":true,"spec":{"failureThreshold":12,"httpGet":{"path":"/json/version","port":9222},"initialDelaySeconds":5,"periodSeconds":5,"timeoutSeconds":5}}},"resources":{"limits":{"cpu":"1000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}} | Chromium sidecar for browser automation (CDP on port 9222) |
| app-template.controllers.main.containers.chromium.enabled | bool | true | Enable/disable the Chromium browser sidecar |
| app-template.controllers.main.containers.chromium.image.repository | string | "chromedp/headless-shell" | Chromium image repository |
| app-template.controllers.main.containers.chromium.image.tag | string | "{{ .Values.chromiumVersion }}" | Chromium image tag |
| app-template.controllers.main.containers.main | object | `{"args":["gateway","--bind","lan","--port","18789"],"command":["node","dist/index.js"],"env":{},"envFrom":[],"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/openclaw/openclaw","tag":"{{ .Values.openclawVersion }}"},"probes":{"liveness":{"enabled":true,"spec":{"failureThreshold":3,"initialDelaySeconds":30,"periodSeconds":30,"tcpSocket":{"port":18789},"timeoutSeconds":5},"type":"TCP"},"readine |
Deploy openclaw with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has openclaw on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartopenclaw is pinned at v1.5.40 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply