Prerequisites
Mission Control requires Node.js 20+ (LTS recommended) and pnpm for dependency management.
Node.js
Install Node.js 20 or later from nodejs.org or use a version manager:pnpm
Mission Control uses pnpm for fast, efficient dependency management. Install pnpm using one of these methods:Native Build Tools
Mission Control usesbetter-sqlite3 which requires native compilation. Install build tools for your platform:
Development Setup
Install Dependencies
The
better-sqlite3 module is compiled during installation. If compilation fails, ensure you have the required build tools installed.Configure Environment
Copy the example environment file:Edit
.env with your configuration. See Environment Variables for details.Start Development Server
Production Deployment
Direct Deployment
Build and run Mission Control directly on your server:Install Dependencies
--frozen-lockfile flag ensures reproducible builds by using the exact versions in pnpm-lock.yaml.Build Application
.next/. Build time is typically 2-3 minutes.Docker Deployment
Deploy Mission Control using Docker for isolation and portability:The Docker image uses a multi-stage build with
node:20-slim, compiles native modules inside the container, and runs as non-root user nextjs.Persistent Data
Mount a volume to persist the SQLite database across container restarts:docker-compose
Createdocker-compose.yml:
docker-compose.yml
Environment Variables
Configure Mission Control via environment variables in.env:
Authentication
| Variable | Required | Default | Description |
|---|---|---|---|
AUTH_USER | No | admin | Initial admin username (seeded on first run) |
AUTH_PASS | Yes | - | Initial admin password |
AUTH_PASS_B64 | No | - | Base64-encoded password (overrides AUTH_PASS) |
API_KEY | Yes | - | API key for headless/programmatic access |
AUTH_SECRET | No | - | Legacy cookie secret (backward compatibility) |
#, quote it or use base64 encoding:
Network Access
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | No | 3000 (Docker) / 3005 (direct) | HTTP server port |
MC_ALLOWED_HOSTS | No | localhost,127.0.0.1 | Comma-separated host allowlist for production |
MC_ALLOW_ANY_HOST | No | false | Bypass host allowlist (development only) |
MC_TRUSTED_PROXIES | No | - | Comma-separated IPs for X-Forwarded-For parsing |
In production mode, Mission Control blocks requests unless the
Host header matches MC_ALLOWED_HOSTS. Use wildcards like *.example.com or 100.* for Tailscale IPs.OpenClaw Integration
| Variable | Required | Default | Description |
|---|---|---|---|
OPENCLAW_HOME | No* | - | Path to .openclaw directory |
OPENCLAW_GATEWAY_HOST | No | 127.0.0.1 | Gateway WebSocket host |
OPENCLAW_GATEWAY_PORT | No | 18789 | Gateway WebSocket port |
OPENCLAW_GATEWAY_TOKEN | No | - | Server-side gateway auth token |
NEXT_PUBLIC_GATEWAY_TOKEN | No | - | Browser-side gateway auth token |
OPENCLAW_MEMORY_DIR | No | - | Agent memory directory (see note below) |
OPENCLAW_HOME is required for memory browser, log viewer, and gateway config features. Point to your OpenClaw installation directory.$OPENCLAW_HOME/memory/. Set OPENCLAW_MEMORY_DIR to your agents root:
MEMORY.md, and other markdown files from all agent workspaces.
Data Paths
| Variable | Required | Default | Description |
|---|---|---|---|
MISSION_CONTROL_DATA_DIR | No | .data | Data directory (database, logs) |
MISSION_CONTROL_DB_PATH | No | .data/mission-control.db | SQLite database path |
MISSION_CONTROL_TOKENS_PATH | No | .data/mission-control-tokens.json | Token usage log path |
Google OAuth (Optional)
| Variable | Required | Default | Description |
|---|---|---|---|
GOOGLE_CLIENT_ID | No | - | Server-side Google OAuth client ID |
NEXT_PUBLIC_GOOGLE_CLIENT_ID | No | - | Browser-side Google OAuth client ID |
Create OAuth credentials in Google Cloud Console. Set authorized origins to your Mission Control URL and redirect URI to
https://yourdomain.com/api/auth/google.Claude Code Integration (Optional)
| Variable | Required | Default | Description |
|---|---|---|---|
MC_CLAUDE_HOME | No | ~/.claude | Path to Claude Code home directory |
~/.claude/projects/ and extracts token usage from JSONL transcripts.
Data Retention (Optional)
Control how long Mission Control retains historical data (in days, 0 = keep forever):Reverse Proxy Setup
Caddy (Recommended)
Caddy automatically provisions TLS certificates via Let’s Encrypt:Caddyfile
nginx
Configure nginx with manual certificate management:nginx.conf
.env
Troubleshooting
”Module not found: better-sqlite3”
Native compilation failed. Install build tools:“Invalid ELF header” or “Mach-O” errors
The native binary was compiled on a different platform. Rebuild on the target OS:Database locked errors
Only one Mission Control instance can access the SQLite database at a time. Ensure no other processes are using.data/mission-control.db.
”Gateway error: origin not allowed”
The gateway is rejecting connections from Mission Control. Add your dashboard URL to the gateway’s allowed origins inopenclaw.json:
openclaw.json
”Gateway error: device identity required”
Device identity signing requires a secure browser context (HTTPS or localhost). Access Mission Control over HTTPS or uselocalhost instead of 127.0.0.1.
Development Commands
Mission Control includes several development commands:Run
pnpm quality:gate before submitting pull requests to ensure all checks pass.Next Steps
Quickstart
Register your first agent and explore the dashboard
API Reference
Complete documentation for all 66 REST endpoints
Security Guide
Security best practices and hardening
Integrations
Connect OpenClaw, Claude Code, and custom agents