Skip to content

Repository files navigation

OpenClaw Docker Image

Docker image for OpenClaw - your personal AI assistant.

Built for use with Umbrel and other self-hosted platforms.

View available tags - follows OpenClaw's release cycle using calendar versioning (e.g., v2026.1.30).

Quick Start

Using Docker Compose (Recommended)

  1. Clone this repository
  2. Copy .env.example to .env and add your API keys
  3. Run:
docker compose up -d
  1. Open http://localhost:18789/chat

Using Docker Run

docker run -d \
-p 18789:18789 \
-e ANTHROPIC_API_KEY=your-key \
-e TELEGRAM_BOT_TOKEN=your-bot-token \
-v openclaw-data:/home/openclaw/.openclaw \
-v openclaw-workspace:/home/openclaw/clawd \
ghcr.io/zot24/openclaw-docker:latest

Supported Channels

ChannelEnvironment VariablesNotes
TelegramTELEGRAM_BOT_TOKENGet token from @BotFather
WhatsAppWHATSAPP_ENABLED=trueRequires QR code linking
DiscordDISCORD_BOT_TOKENFrom Discord Developer Portal
SlackSLACK_APP_TOKEN, SLACK_BOT_TOKENSocket mode required
MS TeamsMSTEAMS_APP_ID, MSTEAMS_APP_PASSWORDAzure AD app registration
SignalSIGNAL_NUMBERRequires signal-cli (not included)

Supported LLM Providers

ProviderEnvironment VariablesModel Example
AnthropicANTHROPIC_API_KEYanthropic/claude-sonnet-4
MiniMaxMINIMAX_API_KEYminimax/MiniMax-M2.1
OpenAIOPENAI_API_KEYopenai/gpt-4o
OpenRouterOPENROUTER_API_KEYopenrouter/anthropic/claude-sonnet-4
MoonshotMOONSHOT_API_KEYmoonshot/moonshot-v1-128k
GLMGLM_API_KEYglm/glm-4-plus
Local (Ollama, etc.)OPENCODE_BASE_URLopencode/llama3.1

The image auto-selects a model based on available API keys. Override with OPENCLAW_MODEL.

Environment Variables

LLM Providers

VariableRequiredDescription
ANTHROPIC_API_KEYOne provider requiredAnthropic API key
MINIMAX_API_KEYMiniMax API key
OPENAI_API_KEYOpenAI API key
OPENAI_ORG_IDOpenAI organization ID
OPENAI_BASE_URLOpenAI-compatible endpoint
OPENROUTER_API_KEYOpenRouter API key
MOONSHOT_API_KEYMoonshot API key
GLM_API_KEYGLM/ChatGLM API key
OPENCODE_BASE_URLLocal model endpoint (e.g., Ollama)
OPENCODE_API_KEYAPI key for local endpoint
OPENCODE_MODELModel name for local provider
OPENCLAW_MODELOverride auto-selected model

Channels

VariableDefaultDescription
TELEGRAM_BOT_TOKENTelegram bot token
TELEGRAM_ALLOWED_USERSComma-separated user IDs
OPENCLAW_DM_POLICYpairingDM policy: pairing, allowlist, open
WHATSAPP_ENABLEDfalseEnable WhatsApp channel
WHATSAPP_DM_POLICYpairingDM policy
WHATSAPP_GROUP_POLICYdisabledGroup policy: disabled, allowlist
WHATSAPP_ALLOWED_NUMBERSComma-separated phone numbers
WHATSAPP_GROUPSGroup IDs or * for all
DISCORD_BOT_TOKENDiscord bot token
DISCORD_ALLOWED_USERSComma-separated user IDs
DISCORD_DM_POLICYpairingDM policy
SLACK_APP_TOKENSlack app token (xapp-...)
SLACK_BOT_TOKENSlack bot token (xoxb-...)
SLACK_ALLOWED_USERSComma-separated user IDs
MSTEAMS_APP_IDAzure AD app ID
MSTEAMS_APP_PASSWORDAzure AD app password
SIGNAL_NUMBERSignal phone number

Gateway

VariableDefaultDescription
OPENCLAW_GATEWAY_TOKENAuto-generatedAuthentication token
OPENCLAW_GATEWAY_PORT18789Gateway port
GATEWAY_MODElocalGateway mode: local, cloud
GATEWAY_BINDlanBind mode: lan, loopback, tailnet

Agent Runtime

VariableDefaultDescription
AGENT_TIMEOUT600Agent timeout in seconds
AGENT_TIMEZONEUTCTimezone for agent
ENABLE_MEMORY_SEARCHfalseEnable memory search
ENABLE_BROWSERtrueEnable browser automation
ENABLE_EXECtrueEnable shell execution
EXEC_TIMEOUT30000Exec timeout in milliseconds

Text-to-Speech (sag)

VariableDefaultDescription
ELEVENLABS_API_KEYElevenLabs API key for TTS
SAG_VOICE_IDDefault voice ID for sag

Data Directories

VariableDefaultDescription
OPENCLAW_DATA_DIR/home/openclaw/.openclawConfig and credentials
OPENCLAW_WORKSPACE/home/openclaw/clawdWorkspace, memory, skills

Ports

  • 18789: Gateway (HTTP + WebSocket + WebChat at /chat)
  • 18790: Bridge (TCP for mobile nodes)

Volumes

  • /home/openclaw/.openclaw: Configuration and credentials
  • /home/openclaw/clawd: Workspace, memory, and skills

Channel Setup

Telegram

  1. Message @BotFather on Telegram
  2. Create a new bot with /newbot
  3. Copy the bot token
  4. Set TELEGRAM_BOT_TOKEN=your-token

WhatsApp

  1. Set WHATSAPP_ENABLED=true
  2. Start the container
  3. Run docker exec -it <container> node dist/index.js channels login
  4. Scan the QR code with WhatsApp

Discord

  1. Go to Discord Developer Portal
  2. Create a new application
  3. Go to Bot section, create a bot
  4. Copy the token and set DISCORD_BOT_TOKEN=your-token
  5. Enable required intents (Message Content, etc.)
  6. Invite bot to your server with appropriate permissions

Slack

  1. Create a new Slack App at api.slack.com
  2. Enable Socket Mode
  3. Add required scopes: chat:write, app_mentions:read, im:history, etc.
  4. Install to workspace
  5. Copy App Token (xapp-...) and Bot Token (xoxb-...)
  6. Set both SLACK_APP_TOKEN and SLACK_BOT_TOKEN

MS Teams

  1. Register an app in Azure AD
  2. Configure Bot Framework registration
  3. Set MSTEAMS_APP_ID and MSTEAMS_APP_PASSWORD

Using Local Models (Ollama)

On Host Machine

To use Ollama running on your host machine:

docker run -d \
-p 18789:18789 \
-e OPENCODE_BASE_URL=http://host.docker.internal:11434/v1 \
-e OPENCODE_MODEL=llama3.1 \
-e TELEGRAM_BOT_TOKEN=your-token \
-v openclaw-data:/home/openclaw/.openclaw \
-v openclaw-workspace:/home/openclaw/clawd \
ghcr.io/zot24/openclaw-docker:latest

On Umbrel (Ollama in Another Container)

When running both OpenClaw and Ollama as Umbrel apps, they communicate via Docker's internal network.

1. Find the Ollama container name:

docker ps | grep ollama

Look for something like ollama_server_1 or ollama_web_1.

2. Find the Umbrel network:

docker network ls | grep umbrel

3. Get Ollama's network details:

docker inspect <ollama-container-name>| grep -A5 Networks

4. Configure OpenClaw:

Set these environment variables in your OpenClaw configuration:

OPENCODE_BASE_URL=http://<ollama-container-name>:11434/v1
OPENCODE_MODEL=llama3.1

Replace <ollama-container-name> with the actual container name from step 1 (e.g., ollama_server_1).

5. Ensure both containers are on the same network:

If OpenClaw can't reach Ollama, connect it to Umbrel's network:

docker network connect <umbrel-network><openclaw-container>

Tip: You can also use Ollama's internal IP address instead of the container name if DNS resolution doesn't work.

Security

This image runs as a dedicated non-root user (openclaw, UID 1000) for enhanced security:

  • Principle of Least Privilege: The container process has only the permissions it needs, not full root access
  • Container Escape Mitigation: If an attacker exploits a vulnerability in the application, they gain limited user privileges rather than root
  • Host System Protection: Volume mounts and any potential breakouts are constrained to non-root permissions
  • Compliance: Many security frameworks (CIS Docker Benchmark, PCI-DSS) require or recommend non-root containers
  • Defense in Depth: Adds another security layer on top of container isolation

The container uses UID/GID 1000, which matches the default user on most Linux systems, making volume permission management straightforward.

Features

  • Browser Automation: Playwright with Chromium for web scraping
  • Voice Messages: FFmpeg for audio processing
  • Image Processing: ImageMagick for image manipulation
  • Shell Execution: Run commands via the exec tool
  • Memory Search: Semantic search over conversation history
  • Text-to-Speech: ElevenLabs TTS via sag
  • Speech-to-Text: OpenAI Whisper for transcription
  • MCP Tools: mcporter for Model Context Protocol servers
  • Python Tools: uv/uvx for running Python MCP tools
  • GitHub CLI: gh for GitHub operations

Building Locally

# Build with docker-compose
docker compose build
# Or build directly
docker build -t openclaw:local .

The Dockerfile uses a multi-stage build for optimal caching:

  1. deps: System packages, Go, Python, global tools (cached)
  2. builder: Clone and build OpenClaw (rebuilds on version changes)
  3. runtime: Final image with all tools

Included Tools

ToolPurpose
Playwright + ChromiumBrowser automation and web scraping
FFmpegAudio/video processing
ImageMagickImage manipulation
sagElevenLabs TTS CLI
whisperOpenAI speech-to-text
mcporterMCP server management
uv/uvxPython tool runner
ghGitHub CLI
xvfbVirtual framebuffer for headless browsers

Image Size

The full-featured image is approximately 1.5-2GB due to:

  • Node.js runtime
  • Go runtime and sag binary
  • Python and uv
  • Chromium browser
  • FFmpeg and ImageMagick
  • OpenClaw and dependencies

License

This Docker image builds OpenClaw from source. See the original repository for licensing information.

About

Docker image for OpenClaw

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages