Server configuration
Core server settings for port and deployment environment.In production mode (
NODE_ENV=production), detailed error messages are hidden and only logged server-side.Example: Custom port
Resource limits
Control concurrent sessions, tabs, and memory usage.Example: High-concurrency deployment
Timeouts
Fine-tune timeout values for different operations.The browser launches lazily on first request and shuts down after
BROWSER_IDLE_TIMEOUT_MS with no active sessions. This keeps memory at ~40MB when idle.Example: Faster timeouts for speed
Example: Disable idle shutdown
Proxy configuration
Route all browser traffic through a proxy with automatic GeoIP detection.When a proxy is configured, Camoufox’s built-in GeoIP automatically sets browser
locale, timezone, and geolocation to match the proxy’s exit IP. This ensures the browser fingerprint is consistent with the proxy location.Example: Residential proxy
Docker proxy configuration
Security
API keys for protected endpoints (cookie import and server shutdown).Example: Enable cookie import
Why environment variables?
API keys are secrets and should never be stored in plaintext config files (openclaw.json, config.json, etc.). Instead:
- Set in shell profile (
.bashrc,.zshrc) - Use systemd unit files (
Environment=CAMOFOX_API_KEY=...) - Docker/Compose:
env_file:or-eflags - Fly.io/Railway:
fly secrets setor web dashboard
Example: Custom cookies directory
OpenClaw plugin configuration
When running as an OpenClaw plugin, the server subprocess inherits these variables fromlib/config.js: