Skip to content

Environment Variables

Environment variables are set in the .env file at the root of the ClawHalla repository. Docker Compose injects these into the container at startup.

Terminal window
cp .env.example .env

Authentication

ANTHROPIC_API_KEY

Your Anthropic API key for accessing Claude models.

RequiredYes (unless using Claude Max OAuth)
Formatsk-ant-api03-...
Used byOpenClaw Gateway
Terminal window
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here

If using Claude Max OAuth authentication, this variable should be removed or commented out. See the Claude Max setup guide.


OPENAI_API_KEY

Optional API key for OpenAI models (GPT-4, etc.).

RequiredNo
Formatsk-...
Used byOpenClaw Gateway (if OpenAI models are configured)
Terminal window
OPENAI_API_KEY=sk-your-openai-key

Gateway

OPENCLAW_GATEWAY_PORT

The port the OpenClaw gateway listens on.

RequiredNo
Default18789
Used byOpenClaw Gateway, Mission Control
Terminal window
OPENCLAW_GATEWAY_PORT=18789

This port must also be exposed in docker-compose.yml.


OPENCLAW_GATEWAY_TOKEN

Authentication token for gateway connections. Agents and Mission Control must include this token when connecting.

RequiredRecommended
DefaultNone (no auth)
Used byOpenClaw Gateway, Mission Control, all API clients
Terminal window
OPENCLAW_GATEWAY_TOKEN=your-secure-random-token

Generate a secure token:

Terminal window
openssl rand -hex 32

Container

CLAWDBOT_PASSWORD

Password for the clawdbot user inside the Docker container.

RequiredNo
Defaultclawdbot
Used byDockerfile (build arg)
Terminal window
CLAWDBOT_PASSWORD=your-password

Used when you need sudo inside the container or SSH access.


Security

VAULT_KEY

Encryption key for the Mission Control secrets vault. Secrets are encrypted with AES-256-GCM using a key derived from this passphrase.

RequiredNo
DefaultFalls back to GATEWAY_TOKEN, then a built-in default
Used byMission Control vault
Terminal window
VAULT_KEY=your-vault-encryption-key

DB_PATH

Path to the SQLite database used by Mission Control.

RequiredNo
DefaultInternal path within the container
Used byMission Control
Terminal window
DB_PATH=/home/clawdbot/.openclaw/mission-control.db

The database stores tasks, epics, sprints, projects, activities, approvals, cost events, and workspace file metadata.


Channels

TELEGRAM_BOT_TOKEN

Token for your Telegram bot, obtained from @BotFather.

RequiredNo (only for Telegram integration)
Format123456789:ABCdefGhIjKlMnOpQrStUvWxYz
Used byOpenClaw Gateway (Telegram channel)
Terminal window
TELEGRAM_BOT_TOKEN=123456789:ABCdefGhIjKlMnOpQrStUvWxYz

DISCORD_BOT_TOKEN

Token for your Discord bot, from the Discord Developer Portal.

RequiredNo (only for Discord integration)
FormatMTIz...
Used byOpenClaw Gateway (Discord channel)
Terminal window
DISCORD_BOT_TOKEN=MTIzNDU2Nzg5...

Runtime

NODE_ENV

Node.js environment mode.

RequiredNo
Defaultdevelopment
Valuesdevelopment, production, test
Used byMission Control, Node.js runtime
Terminal window
NODE_ENV=production

In production mode, Mission Control enables optimizations and disables development tools.


Mission Control

GATEWAY_URL

URL for the OpenClaw gateway, used by Mission Control to communicate with agents.

RequiredYes (for MC container)
Defaulthttp://127.0.0.1:18789
Used byMission Control
Terminal window
GATEWAY_URL=http://clawhalla:18789

When running MC as a separate container, use the Docker service name (clawhalla) instead of localhost.


GATEWAY_TOKEN

Same as OPENCLAW_GATEWAY_TOKEN, used by Mission Control to authenticate with the gateway.

RequiredYes (if gateway token is set)
Used byMission Control
Terminal window
GATEWAY_TOKEN=${OPENCLAW_GATEWAY_TOKEN}

WORKSPACE_PATH

Override the default workspace path used by Mission Control for reading files.

RequiredNo
Default~/.openclaw/workspace
Used byMission Control (watcher, search, docs, memory)
Terminal window
WORKSPACE_PATH=/home/clawdbot/.openclaw/workspace

Example .env File

.env
# === Authentication ===
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here
# OPENAI_API_KEY=sk-...
# === Gateway ===
OPENCLAW_GATEWAY_PORT=18789
OPENCLAW_GATEWAY_TOKEN=your-secure-random-token
# === Container ===
CLAWDBOT_PASSWORD=your-password
# === Security ===
VAULT_KEY=your-vault-encryption-key
# === Channels (optional) ===
# TELEGRAM_BOT_TOKEN=123456789:ABC...
# DISCORD_BOT_TOKEN=MTIz...
# === Runtime ===
NODE_ENV=production