.env.example to .env.local (development) or .env (production) and customize as needed.
Authentication
string
default:"admin"
required
Admin username seeded on first run (only if no users exist in the database).
string
required
Admin password for the initial user.
string
Base64-encoded admin password. Overrides
AUTH_PASS if set.Generate with:string
required
API key for headless/external access. Send via
x-api-key header for programmatic access.Generate a secure random key:
string
default:"random-secret-for-legacy-cookies"
Secret for legacy cookie authentication (backward compatibility).
Session & Cookie Security
boolean
Enable secure cookies (HTTPS-only). Defaults to
true in production unless overridden.string
default:"strict"
SameSite cookie attribute. Valid values:
strict, lax, none.Network Access Control
Mission Control implements host-based access control to prevent unauthorized access.boolean
default:"false"
Bypass host restrictions and allow any host to access the application.
string
default:"localhost,127.0.0.1"
Comma-separated list of allowed hostnames or patterns.Supported patterns:
- Exact hosts:
app.example.com - Subdomains:
*.example.com(matchesa.example.combut not bareexample.com) - Prefix wildcard:
100.*(useful for Tailscale IPs like100.64.0.1)
Google OAuth Integration
string
Server-side Google OAuth client ID for Sign-In approval workflow.Create in Google Cloud Console as a Web application and configure authorized origins/redirect URIs.
string
Client-side Google OAuth client ID (exposed to browser).
OpenClaw Gateway
string
Path to
.openclaw home directory. Required for memory browser, gateway config, and logs.Example: /home/user/.openclawstring
Explicitly point to
openclaw.json instead of deriving from OPENCLAW_HOME.string
default:"127.0.0.1"
Gateway host for server-side connections.
number
default:"18789"
Gateway port for server-side connections.
string
Authentication token for server-side gateway calls (optional).
Frontend Gateway Configuration
These variables are prefixed withNEXT_PUBLIC_ and are exposed to the browser.
string
Gateway hostname for browser WebSocket connections.
number
default:"18789"
Gateway port for browser WebSocket connections.
string
WebSocket protocol:
ws or wss. Defaults based on page protocol.string
Complete gateway WebSocket URL. Overrides individual host/port/protocol settings.
string
Client-side gateway authentication token (if required by gateway).
Coordinator Identity
string
default:"coordinator"
Server-side coordinator agent identifier for chat status replies.
string
default:"coordinator"
Client-side coordinator agent identifier for UI.
Gateway Defaults
string
default:"primary"
Default gateway name used for
/api/gateways seeding if database is empty.Data Paths
All paths default to.data/ in the project root if not specified.
string
default:".data"
Root directory for all Mission Control data files.
string
default:".data/mission-control.db"
SQLite database file path.
string
default:".data/mission-control-tokens.json"
Token storage file path.
OpenClaw Paths
These paths are derived fromOPENCLAW_HOME if not explicitly set.
string
Directory containing OpenClaw logs.Default:
{OPENCLAW_HOME}/logsstring
Directory containing agent memory files.
OpenClaw does NOT store agent memory markdown files under
OPENCLAW_HOME/memory/ by default.Agent memory lives in each agent’s workspace (e.g., ~/clawd-agents/{agent}/memory/).Point this at your agents root to make the Memory Browser useful:string
Directory containing soul templates.Default:
{OPENCLAW_HOME}/templates/soulsstring
default:"openclaw"
OpenClaw CLI binary name or path.
1Password Integration
string
default:"default"
Vault name for 1Password CLI pulls (used by Integrations panel).
Super Admin / Provisioning
These variables are only required if using super-admin provisioning helpers.string
Path to the Mission Control repository root.
string
Path to template
openclaw.json used to seed new tenant state (required for tenant bootstrap).string
default:"/home"
Base path for provisioned Linux user homes.
string
default:"workspace"
Workspace directory name under each tenant user home.
Data Retention
All retention periods are in days. Set to0 to keep data forever.
number
default:"90"
Activity log retention period.
number
default:"365"
Audit log retention period.
number
default:"30"
Application log retention period.
number
default:"60"
Notification retention period.
number
default:"90"
Pipeline run history retention period.
number
default:"90"
Token usage statistics retention period.
Server Configuration
number
default:"3005 (direct) / 3000 (Docker)"
HTTP server port.Example:
string
default:"0.0.0.0"
Bind address for the HTTP server. Set in Dockerfile for containerized deployments.
string
default:"development"
Node.js environment. Set to
production for production deployments.