Skip to content

Repository files navigation

OpenClaw Mission Control

Self-hosted deployment of OpenClaw Mission Control with an integrated OpenClaw Gateway.

Quick Start

# 1. Clone with submodules
git clone --recursive https://github.com/your-username/openclaw-automation.git
cd openclaw-automation

# 2. Configure environment
cp .env.example .env
nano .env  # Set your API keys and tokens

# 3. Initialize gateway pairing (one-time setup)
./scripts/init-pairing.sh

# 4. Start everything
docker compose up -d

That's it! Access the dashboard at http://localhost:3000

What's Included

Service Port Description
Frontend 3000 Mission Control dashboard
Backend 8000 REST API
Gateway 18789 OpenClaw Gateway (WebSocket)
PostgreSQL 5432 Database
Redis 6379 Queue/cache
Worker - Background jobs

Web Interfaces

This setup includes two web interfaces:

Mission Control (localhost:3000)

Management platform for orchestrating work across multiple gateways and agents.

  • Manage multiple gateways
  • Create boards (projects/workflows)
  • Assign tasks to agents
  • Track work across teams
  • Approval workflows and governance

Login: Use LOCAL_AUTH_TOKEN from .env

Gateway Control UI (localhost:18789)

Built-in interface for direct interaction with the gateway's AI agent.

  • Chat directly with the AI agent
  • View agent workspace/files
  • Monitor real-time agent activity
  • Approve tool executions

Login: Use OPENCLAW_GATEWAY_TOKEN from .env

Note: First browser access requires pairing approval. Run ./scripts/approve-browser.sh if prompted.

Aspect Mission Control Gateway Control UI
URL localhost:3000 localhost:18789
Scope Multiple gateways Single gateway
Use case Work orchestration Direct AI chat
Analogy Project dashboard Terminal

Configuration

Edit .env with your settings:

# Required: Auth token (generate with: openssl rand -base64 48)
LOCAL_AUTH_TOKEN=your-50-char-minimum-token

# Required: Gateway token (generate with: openssl rand -hex 32)
OPENCLAW_GATEWAY_TOKEN=your-gateway-token

# Required: LLM API (LiteLLM or OpenAI-compatible)
OPENAI_API_KEY=your-api-key
LITELLM_BASE_URL=https://your-llm-endpoint

# Optional: Model configuration
LITELLM_MODEL_1=gpt-4
LITELLM_MODEL_2=gpt-3.5-turbo

Data Persistence

All data survives container restarts:

./data/
├── postgres/        # Database
├── redis/           # Cache/queue
├── openclaw/        # Gateway data & agent workspaces
└── backend/         # Backend device identity

Common Commands

# Start
docker compose up -d

# Stop
docker compose down

# View logs
docker compose logs -f

# Rebuild after changes
docker compose up -d --build

# Full reset (WARNING: deletes all data)
docker compose down -v
rm -rf ./data
./scripts/init-pairing.sh
docker compose up -d

How It Works

The init-pairing.sh script automates the gateway-backend pairing:

  1. Generates a cryptographic device identity for the backend
  2. Pre-approves it in the gateway's trusted devices list
  3. Both identities persist across restarts

This eliminates the manual "device pairing" step normally required when connecting Mission Control to a gateway.

Architecture

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│   Frontend   │────▶│   Backend    │────▶│   Gateway    │
│    :3000     │     │    :8000     │     │   :18789     │
└──────────────┘     └──────┬───────┘     └──────────────┘
                           │
              ┌────────────┼────────────┐
              │            │            │
        ┌─────▼─────┐ ┌────▼────┐ ┌─────▼─────┐
        │ PostgreSQL│ │  Redis  │ │  Worker   │
        └───────────┘ └─────────┘ └───────────┘

API Usage

# Health check
curl http://localhost:8000/healthz

# List gateways
curl -H "Authorization: Bearer $LOCAL_AUTH_TOKEN" \
  http://localhost:8000/api/v1/gateways

# List boards
curl -H "Authorization: Bearer $LOCAL_AUTH_TOKEN" \
  http://localhost:8000/api/v1/boards

Full API docs: http://localhost:8000/docs

Troubleshooting

Gateway connection fails

# Check gateway logs
docker compose logs gateway

# Re-run pairing setup
./scripts/init-pairing.sh
docker compose restart backend gateway

Permission errors

# Fix data directory ownership
docker run --rm -v ./data:/data alpine chown -R 1000:1000 /data

Port conflicts

# Change ports in .env
FRONTEND_PORT=3001
BACKEND_PORT=8001
GATEWAY_PORT=18790

Links

About

Container Build exploring openclaw application capabilites

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages