๐Ÿ  Home๐Ÿ”ง Tools๐Ÿ“ Blog๐Ÿ‘‹ About๐Ÿ“ฌ Contactโšก All Free Tools
๐Ÿฆ€ OpenClaw Tool

OpenClaw JSON Config Generator

Build a valid openclaw.json config visually. Configure every section โ€” gateway, models, agents, channels, cron, sandbox and logging โ€” with a live JSON preview and one-click download. Zero schema errors guaranteed.

๐ŸŽ›๏ธ Visual Form Builder๐Ÿ‘๏ธ Live JSON Previewโœ… Schema Validationโฌ‡๏ธ Download Ready๐Ÿ”’ Env Var Safe๐Ÿ”’ 100% Private
Config completeness0%
๐ŸŒGatewayRequired
โ–ผ
Default: 18789. Do not change unless port is in use.
โš ๏ธ Always use loopback on VPS. Setting all without a token exposes your gateway to the internet and leaks API keys.
Leave empty if using loopback only. Required if bind = all.
๐Ÿ›ก๏ธ Allow Tailscale IPs (bypass token check)
๐Ÿ–ฅ๏ธ Enable Control UI
๐Ÿค–Models & ProvidersRequired
โ–ผ
Models tried in order when primary fails or hits rate limits.
๐Ÿฆ™ Enable Ollama (local model server)
๐Ÿ•ต๏ธAgentsRequired
โ–ผ
4โ€“8 is safe. Higher = more parallel tasks but risk of runaway retries.
Context Pruning
โœ‚๏ธ Enable Context Pruning (strongly recommended)
Compaction
๐Ÿ—œ๏ธ Enable Memory Flush on Compaction
Additional Agents
A "main" agent is always included. Add additional agents here.
๐Ÿ“กChannelsOptional
โ–ผ
๐Ÿ”’Session & PrivacyRequired
โ–ผ
โš ๏ธ Use per-channel-peer for any multi-user setup. With "main", all users share one session โ€” a data leak.
โฐCron JobsOptional
โ–ผ
๐ŸงชSandbox (Docker)Optional
โ–ผ
๐Ÿ”งToolsOptional
โ–ผ
๐Ÿ“‹LoggingOptional
โ–ผ
โœ… Config structure is valid
๐Ÿ“„ openclaw.json Preview
โšก Quick Actions
๐Ÿ“‚ Save to: ~/.openclaw/openclaw.json
๐Ÿ” Then run: openclaw doctor --fix

๐Ÿฆ€ What Is the OpenClaw JSON Config Generator?

The OpenClaw JSON Config Generator is a free visual tool that builds a complete, schema-valid openclaw.json configuration file for the OpenClaw AI agent gateway. Instead of manually writing JSON and risking the Zod schema validation errors that prevent the gateway from starting, you fill out a structured form and the tool generates correct, ready-to-use JSON in real time.

OpenClaw's config file controls every aspect of the system: the gateway port and binding, which LLM models to use with automatic fallback, agent workspace and context pruning settings, messaging channels like Telegram and Discord, cron job automation, Docker sandbox isolation and logging. All of these can be configured visually here and downloaded as a single file. [web:26]

๐Ÿ“ฆ Config Sections Explained

๐ŸŒ

gateway

Port, bind address, auth token and reload mode. Always use bind: loopback on a VPS to prevent internet exposure.

๐Ÿค–

models

Primary LLM, fallback chain, API keys via ${ENV_VAR} references, and local model servers (Ollama, LM Studio).

๐Ÿ•ต๏ธ

agents

Workspace path, concurrency limits, context pruning (prevents token overflow), compaction and heartbeat interval.

๐Ÿ“ก

channels

Telegram and Discord bot integration with DM policy control โ€” allowlist to restrict access to your account only.

๐Ÿ”’

session

DM scope (critical for privacy), session reset schedule and thread bindings. Use per-channel-peer to isolate users.

โฐ

cron

Enable scheduled automation tasks. Set maxConcurrentRuns low (2โ€“3) to avoid runaway retries burning your quota.

๐Ÿงช

sandbox

Docker isolation for subagents. Use non-main mode to sandbox cron jobs and subagents while keeping your main session on the host.

๐Ÿ“‹

logging

Log level, console log level and sensitive data redaction. Use redactSensitive: tools to keep API keys out of logs.

โš ๏ธ Critical Rules for openclaw.json

๐Ÿ’ฐ Cost Optimization Tips

โ“ Frequently Asked Questions

What is the openclaw.json file?+
openclaw.json is the single configuration file for OpenClaw, the AI agent gateway. It lives at ~/.openclaw/openclaw.json and controls the gateway port, LLM models, agent settings, messaging channels (Telegram, Discord), cron jobs, sandbox isolation, and logging. The file is validated by Zod at startup โ€” any unknown key causes the gateway to refuse to start.
Why does my openclaw.json prevent the gateway from starting?+
OpenClaw uses strict Zod schema validation โ€” unknown keys cause the Gateway to refuse to start with no graceful fallback and no warning mode. The most common cause is manually editing the file and adding a key that no longer exists in the schema after an upgrade. Run openclaw doctor --fix after every edit or upgrade. Use this generator to build a config from scratch with only schema-valid keys.
How do I add API keys securely to openclaw.json?+
Never hardcode API keys directly in the config file. Use ${ENV_VAR} syntax in the JSON โ€” for example "apiKey": "${ANTHROPIC_API_KEY}" โ€” and store the actual key values in ~/.openclaw/.env or your system environment. This generator outputs environment variable placeholders by default. After editing, run openclaw security audit --deep to check for exposed credentials.
What is the difference between contextPruning and compaction?+
contextPruning runs before each LLM call and trims old tool results from the in-memory context to prevent token overflow. It only affects what gets sent to the model, not the session file on disk. compaction runs when the full context window approaches its limit and summarizes the entire conversation history. Without contextPruning, sessions with many tool calls can silently exceed the model's 200k token limit and stop responding. Both should be enabled in production.
Which settings require a full gateway restart?+
Only a few settings require a full restart: gateway.port, gateway.bind, gateway.reload, gateway.remote, sandbox Docker image/network config, and plugin installation or removal. Most other settings โ€” model changes, agent config, channel policies, cron jobs, heartbeat intervals and logging โ€” hot-reload without a restart.
What should gateway.bind be set to?+
Always use bind: "loopback" (binds to 127.0.0.1 only) on VPS deployments. Setting bind: "all" exposes the gateway to the internet on 0.0.0.0. Exposed OpenClaw gateways have leaked API keys, OAuth tokens and full session histories. If you need external access, use a reverse proxy (nginx/Caddy) with HTTPS in front of the local gateway instead of binding directly.