You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All environment variables recognized by GoClaw, organized by category.
Overview
GoClaw reads environment variables at startup and applies them on top of config.json. Environment variables always take precedence over file values. Secrets (API keys, tokens, DSN) should never go in config.json — put them in .env.local or inject them as environment variables in your deployment.
# Load secrets and startsource .env.local && ./goclaw
# Or pass inline
GOCLAW_POSTGRES_DSN="postgres://..." GOCLAW_GATEWAY_TOKEN="..." ./goclaw
Gateway
Variable
Required
Description
GOCLAW_GATEWAY_TOKEN
Yes
Bearer token for WebSocket and HTTP API authentication
GOCLAW_ENCRYPTION_KEY
Yes
AES-256-GCM key for encrypting provider API keys in the database. Generate with openssl rand -hex 32
GOCLAW_CONFIG
No
Path to config.json. Default: ./config.json
GOCLAW_HOST
No
Gateway listen host. Default: 0.0.0.0
GOCLAW_PORT
No
Gateway listen port. Default: 18790
GOCLAW_OWNER_IDS
No
Comma-separated user IDs with admin/owner access (e.g. user1,user2)
GOCLAW_AUTO_UPGRADE
No
Set to true to auto-run DB migrations on gateway startup
GOCLAW_DATA_DIR
No
Data directory for gateway state. Default: ~/.goclaw/data
GOCLAW_MIGRATIONS_DIR
No
Path to migrations directory. Default: ./migrations
GOCLAW_GATEWAY_URL
No
Full gateway URL for auth CLI commands (e.g. http://localhost:18790)
GOCLAW_ALLOWED_ORIGINS
No
Comma-separated CORS allowed origins (overrides config file). Example: https://app.example.com,https://admin.example.com
Global skills directory. Default: ~/.goclaw/skills
GOCLAW_BUILTIN_SKILLS_DIR
Path to built-in skill definitions. Default: ./builtin-skills
GOCLAW_BUNDLED_SKILLS_DIR
Path to bundled skill packages. Default: ./bundled-skills
Runtime Packages (Docker v3)
These variables configure where on-demand runtime packages (pip/npm) are installed inside the container. Set automatically by the Docker entrypoint — only override if you have a custom install layout.
Variable
Default (Docker)
Description
PIP_TARGET
/app/data/.runtime/pip
Directory where pip installs Python packages at runtime
PYTHONPATH
/app/data/.runtime/pip
Python module search path — must include PIP_TARGET so installed packages are importable
NPM_CONFIG_PREFIX
/app/data/.runtime/npm-global
npm global prefix for runtime Node.js package installs
These directories are mounted on the data volume so packages survive container recreation. The pkg-helper binary (runs as root) manages system (apk) packages; pip/npm installs run as the goclaw user.
Sandbox (Docker)
Variable
Description
GOCLAW_SANDBOX_MODE
"off", "non-main", or "all"
GOCLAW_SANDBOX_IMAGE
Docker image for sandbox containers
GOCLAW_SANDBOX_WORKSPACE_ACCESS
"none", "ro", or "rw"
GOCLAW_SANDBOX_SCOPE
"session", "agent", or "shared"
GOCLAW_SANDBOX_MEMORY_MB
Memory limit in MB
GOCLAW_SANDBOX_CPUS
CPU limit (float, e.g. "1.5")
GOCLAW_SANDBOX_TIMEOUT_SEC
Exec timeout in seconds
GOCLAW_SANDBOX_NETWORK
"true" to enable container network access
Concurrency / Scheduler
Lane-based limits for concurrent agent runs.
Variable
Default
Description
GOCLAW_LANE_MAIN
30
Max concurrent main agent runs
GOCLAW_LANE_SUBAGENT
50
Max concurrent subagent runs
GOCLAW_LANE_DELEGATE
100
Max concurrent delegated agent runs
GOCLAW_LANE_CRON
30
Max concurrent cron job runs
Telemetry (OpenTelemetry)
Requires build tag otel (go build -tags otel).
Variable
Description
GOCLAW_TELEMETRY_ENABLED
"true" to enable OTLP export
GOCLAW_TELEMETRY_ENDPOINT
OTLP endpoint (e.g. localhost:4317)
GOCLAW_TELEMETRY_PROTOCOL
"grpc" (default) or "http"
GOCLAW_TELEMETRY_INSECURE
"true" to skip TLS verification
GOCLAW_TELEMETRY_SERVICE_NAME
OTEL service name. Default: goclaw-gateway
Tailscale
Requires build tag tsnet (go build -tags tsnet).
Variable
Description
GOCLAW_TSNET_HOSTNAME
Tailscale machine name (e.g. goclaw-gateway)
GOCLAW_TSNET_AUTH_KEY
Tailscale auth key — never stored in config.json
GOCLAW_TSNET_DIR
Persistent state directory
Debugging & Tracing
Variable
Description
GOCLAW_TRACE_VERBOSE
Set to 1 to log full LLM input in trace spans
GOCLAW_BROWSER_REMOTE_URL
Connect to a remote browser via Chrome DevTools Protocol URL. Auto-enables browser tool
GOCLAW_REDIS_DSN
Redis connection string (e.g. redis://redis:6379/0). Requires build with -tags redis
Minimal .env.local
Generated by goclaw onboard. Keep this file out of version control.