|
| 1 | +--- |
| 2 | +title: openclaw |
| 3 | +description: A reference page for the openclaw resource |
| 4 | +--- |
| 5 | + |
| 6 | +The openclaw resource installs [OpenClaw](https://docs.openclaw.ai/) — a self-hosted gateway that connects chat channels (Discord, Slack, Telegram, WhatsApp, Signal, iMessage, Matrix, Teams, and more) to AI agents — and manages its configuration. It handles installation via the official installer script and gives you declarative control over the gateway, agents, models, channels, tools, and every other section of the OpenClaw config. |
| 7 | + |
| 8 | +## Parameters |
| 9 | + |
| 10 | +- **settings**: *(object, optional)* Top-level keys to merge into `~/.openclaw/openclaw.json`. On apply, the declared keys are written; on destroy, only the declared keys are removed. Common sections include: |
| 11 | + - `gateway` — `mode` (`"local"` | `"remote"`), `port` (default `18789`), `bind` (`"loopback"` | `"lan"` | `"tailnet"` | `"auto"` | `"custom"`), `auth`, `tls`, `controlUi` |
| 12 | + - `agents` — `defaults.{workspace,model,thinking,heartbeat,memory,media,skills}`, `list[]` for per-agent overrides |
| 13 | + - `models` — `pricing.enabled`, `mode` (`"merge"` | `"replace"`), `providers` (custom/local model providers such as Ollama or LM Studio) |
| 14 | + - `channels` — per-provider sections under `channels.<provider>` (e.g. `discord`, `slack`, `telegram`, `whatsapp`, `signal`, `imessage`, `matrix`, `teams`). A channel starts automatically once its config section exists (unless `enabled: false`). Common fields: `dmPolicy`, `groupPolicy`, `allowFrom`, `mediaMaxMb`, `historyLimit`, plus provider-specific credentials (`token`, `botToken`, `appToken`, etc.) |
| 15 | + - `tools` — `policy.{allow,deny}` lists controlling which tools (`exec`, `read`, `write`, `browser`, `web_search`, `cron`, etc.) agents can call |
| 16 | + - `skills` — `allowBundled`, `load.extraDirs`, `install.nodeManager` |
| 17 | + - `plugins` — `enabled`, `allow`/`deny`, `entries.*` |
| 18 | + - `mcp` — `servers`, `sessionIdleTtlMs` |
| 19 | + - `browser`, `logging`, `cron`, `hooks`, `ui`, `env`, `secrets`, `auth`, `discovery`, `acp` — see the [configuration reference](https://docs.openclaw.ai/gateway/configuration-reference) for the full list of fields |
| 20 | + |
| 21 | +## Example usage |
| 22 | + |
| 23 | +### Install OpenClaw with gateway and agent defaults |
| 24 | + |
| 25 | +```json title="codify.jsonc" |
| 26 | +[ |
| 27 | + { |
| 28 | + "type": "openclaw", |
| 29 | + "settings": { |
| 30 | + "gateway": { "port": 18789, "bind": "loopback" }, |
| 31 | + "agents": { "defaults": { "model": "anthropic/claude-sonnet-4-6" } } |
| 32 | + } |
| 33 | + } |
| 34 | +] |
| 35 | +``` |
| 36 | + |
| 37 | +### OpenClaw with a Telegram channel and restricted tools |
| 38 | + |
| 39 | +```json title="codify.jsonc" |
| 40 | +[ |
| 41 | + { |
| 42 | + "type": "openclaw", |
| 43 | + "settings": { |
| 44 | + "channels": { |
| 45 | + "telegram": { |
| 46 | + "botToken": "<Replace me here!>", |
| 47 | + "dmPolicy": "allowlist", |
| 48 | + "allowFrom": ["123456789"] |
| 49 | + } |
| 50 | + }, |
| 51 | + "tools": { |
| 52 | + "policy": { "allow": ["exec", "read", "write", "web_search"] } |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | +] |
| 57 | +``` |
| 58 | + |
| 59 | +## Notes |
| 60 | + |
| 61 | +- OpenClaw is installed via the official installer (`curl -fsSL https://openclaw.ai/install.sh | bash`) on both macOS and Linux. |
| 62 | +- The configuration file lives at `~/.openclaw/openclaw.json` and uses JSON5 (Codify reads/writes it as plain JSON, so any comments in a hand-edited file will not be preserved). |
| 63 | +- The `settings` parameter merges only the declared top-level keys. Existing sections not in your Codify config are left untouched. |
| 64 | +- After applying settings changes, Codify runs `openclaw gateway restart` so the running gateway picks up the new configuration. |
| 65 | +- On destroy, the declared `settings` keys are removed and the OpenClaw binary, config, and state directory (`~/.openclaw`) are removed. |
| 66 | +- Model provider authentication (API keys) and full guided onboarding are not managed by this resource — configure credentials under `settings.models` / `settings.auth`, or run `openclaw onboard` manually for an interactive setup. |
| 67 | +- See the [OpenClaw configuration reference](https://docs.openclaw.ai/gateway/configuration-reference) for the complete list of configuration sections and fields. |
0 commit comments