OpenClaw Advanced Configuration Guide
This guide is for users who already finished the first install and want safer routing, gateway protection, skills, and browser relay related controls.
Files and workflow
Common config locations:
~/.openclaw/openclaw.json~/.openclaw/.env
Recommended workflow:
- Update config with the CLI when possible
- Confirm values with
openclaw config get - Restart the gateway
- Run a test message
openclaw config set key.value "value"openclaw config get || trueopenclaw gateway restart || openclaw restartRouting and model control
Use advanced configuration when you need:
- primary and fallback models
- provider-specific routing
- stricter channel controls
- workload-specific policies
Example goals:
- cheap default model for daily use
- stronger reasoning model for hard tasks
- fallback provider when the primary provider fails
Gateway token and secure access
The gateway token protects access to the gateway or related control surfaces. Treat it like an API key.
Illustrative structure:
{ "gateway": { "bind": "127.0.0.1", "port": 18789, "token": "REDACTED_TOKEN" }}Best practices:
- keep gateway access on localhost when possible
- store tokens in
.envor another secret store - never commit tokens to git
If you need a quick definition first, read the gateway token glossary term.
Browser relay and network-sensitive workflows
Browser relay refers to the part of your environment that lets OpenClaw coordinate browser-driven actions or bridge browser sessions back to the gateway.
Use browser relay carefully when:
- you depend on browser automation or browser-side validation
- your gateway should only trust authenticated or isolated relay traffic
- you need proxy, sandbox, or tunnel controls for browser-connected workflows
Operational advice:
- keep relay traffic inside a controlled network boundary
- combine relay features with a gateway token and local binding
- verify logs after every change
If you are still learning the concept, read the browser relay glossary term.
Skills, plugins, and custom extensions
OpenClaw skills and plugins expand what your environment can do, but they also increase risk.
Typical pattern:
openclaw plugins install @xxx/yyyopenclaw gateway restart || trueopenclaw logs | tail -n 100For custom repositories:
mkdir -p ~/.openclaw/skillscd ~/.openclaw/skillsgit clone https://github.com/someone/some-skill-repo.gitRules of thumb:
- trust skills like code, not like simple content
- test new skills in isolation first
- combine skills with allowlists, policy controls, and careful logging
Continue with the skills hub if you want to browse examples.
Security and operational checklist
- keep secrets in
.env - use a minimal command allowlist
- avoid public gateway exposure
- restart and re-test after every meaningful config change
- prefer Docker or VPS isolation for long-running setups