OpenClaw connects a messaging channel to an agent and its tools through a Gateway you operate. This walkthrough sets up one personal channel, keeps the control interface private, and ends by testing an identity that should be blocked. Your chosen model provider and tools determine where data goes; self-hosting the Gateway does not make every call local.
Docs: docs.openclaw.ai. Site: openclaw.ai. Licence: MIT; developed in the open with the OpenClaw Foundation (non-profit).
This article gets a personal gateway running. The next articles cover allowlists and pairing and skills, heartbeat, and approvals.
A freshly installed gateway with tools enabled is powerful. Shell, files, and browser capabilities mean a stranger who can message the bot may coerce unsafe actions. Complete install, then apply allowlists and pairing before you connect a public-facing channel or enable elevated tools. See OpenClaw’s security guide.
What the Gateway is (mental model)
Chat apps + plugins → Gateway → agent session / tools
↘ Control UI (browser)
↘ CLI
The Gateway is the single source of truth for sessions, routing, and channel connections. The browser Control UI is for chat, config, and sessions. Config lives at ~/.openclaw/openclaw.json by default.
OpenClaw is not a multi-tenant security boundary for mutually adversarial users sharing one agent. The documented trust model is one trusted operator boundary per gateway. Host multiple trust boundaries as separate gateways (ideally separate OS users or hosts).
Check the runtime before installation
The Node requirements, checked on 28 September 2026, list Node 24.16+ or 26.1+ with a suitable linked SQLite library; Node 26 is recommended. Node 22, 23 and 25 are unsupported. Check node --version and the current compatibility page before installing or upgrading. A version number alone does not establish that a custom runtime has the required SQLite behavior.
Install and establish the local session
Follow Getting started for your operating system and inspect the selected install path before running it. The documented macOS/Linux installer is:
curl -fsSL https://openclaw.ai/install.sh | bash
It downloads and executes code, so use only the official source and an environment whose permissions you intend to give the installer. Complete guided onboarding with your approved provider. The current quick-start flow can reuse detected AI credentials; review that choice instead of assuming it creates a new isolated identity.
For a background Gateway, stop the foreground session after configuration, then follow the service path:
openclaw gateway install
openclaw gateway status
Service startup depends on the operating system and user session. A sleeping laptop cannot process messages. Before adding a channel, run openclaw security audit, inspect enabled tools and confirm the actual listeners. The hardened baseline is a starting configuration, not a substitute for those checks.
Open the Control UI
Default local dashboard:
Or:
openclaw dashboard
Use the UI to send a first message, inspect sessions, and confirm the Gateway is alive. Keep the Control UI on loopback unless you have deliberately set up authenticated remote access. Tailscale and related patterns are documented under OpenClaw’s remote-access guidance; do not expose :18789 to the WAN unauthenticated.
Hardened baseline ideas from the security docs include gateway.mode: "local", bind: "loopback", and token auth for the gateway. Start closed; open deliberately.
Config location and backups
Default config: ~/.openclaw/openclaw.json. Credentials and pairing state also live under ~/.openclaw/. Before experiments:
- Copy the config file to a dated backup outside the sync folder you share with a team.
- Note your Node version (
node -v) next to the backup. - After a bad remote-access change, restore the backup and restart the daemon rather than debugging live with channels open.
Do not commit real tokens to git. Keep a redacted example config in your runbook if multiple operators need the shape.
Common install gotchas
| Symptom | Likely cause |
|---|---|
openclaw not found | npm global bin not on PATH; fix PATH or use full path |
| Onboard fails on Node | Installed version does not meet the current official floor; recheck Getting Started and upgrade |
| Dashboard blank / connection refused | Gateway not running; daemon failed; wrong host/port |
| Works on laptop, not in SSH session | Foreground-only process or inactive service; inspect Gateway status and the documented service setup |
| Channel connects but bot ignores you | Pairing pending or allowlist missing your id |
| Tools run for strangers | DM policy open or allowlist too wide; stop and read security article |
When in doubt, prefer the official Getting Started and troubleshooting entry points over forum folklore.
Updates and recovery
Keep the installation method, OpenClaw version, Node version and redacted configuration together in the setup record. Follow the updater for that method. Before changes that affect storage or service startup, make a protected backup and read the current recovery procedure.
Run openclaw security audit after an update or channel change. Use openclaw doctor --fix only when you intend its documented repairs and have a recovery copy. Inspect changes rather than treating a successful command as proof that all channels and policies still work.
First channel without drama
This example uses Telegram. For that path:
- Create the bot token using Telegram’s current OpenClaw instructions.
- For a one-owner bot, prefer
dmPolicy: "allowlist"with your explicit numeric Telegram user ID inallowFrom. - The default
pairingflow remains valid for onboarding. If you use it, approve yourself withopenclaw pairing list telegramandopenclaw pairing approve telegram <code>. - Treat pairing narrowly: it grants DM access only. The CLI approval path can bootstrap
commands.ownerAllowFromwhen none exists; the Control UI offers a separate owner choice. Group authorization still comes from explicit config allowlists (pairing reference). - Keep groups blocked for the first smoke test. When you enable one, put its stable group chat ID under
channels.telegram.groups, keep sender IDs inallowFromorgroupAllowFrom, and retainrequireMention: true.
Hardened Telegram starting shape, combining the current channel guidance with the current exec-policy surface (replace the example sender ID and keep the live docs open):
{
channels: {
telegram: {
enabled: true,
dmPolicy: 'allowlist',
allowFrom: ['123456789'],
groupPolicy: 'allowlist',
groups: {},
},
},
session: { dmScope: 'per-channel-peer' },
gateway: {
mode: 'local',
bind: 'loopback',
auth: { mode: 'token', token: 'replace-with-a-secret-reference' },
},
tools: {
profile: 'messaging',
deny: [
'group:automation',
'group:runtime',
'group:fs',
'sessions_spawn',
'sessions_send',
],
fs: { workspaceOnly: true },
exec: { mode: 'deny' },
elevated: { enabled: false },
},
}
Details and failure modes belong in allowlists and pairing.
Smoke-test script
- Open
http://127.0.0.1:18789/and send “ping” to yourself in the Control UI. - Confirm a session appears and the model replies.
- Connect one DM channel and confirm your explicitly allowlisted primary identity can message the agent. If you are deliberately testing pairing instead, approve that primary identity first.
- Send a message from a second identity you control. With
dmPolicy: "allowlist", confirm it is blocked; if you are testingpairing, leave its request unapproved and confirm it cannot start a tool-capable turn. - Run
openclaw security auditand fix anything marked open+tools or public bind.
If step 4 fails open (the unknown sender gets a full agent turn with tools), stop and fix DM policy before any further integration work.
Personal setup checklist
- Supported Node version installed
- Official installer (or another documented install path) succeeded
- Onboarding completed and the intended foreground/service lifecycle verified
- Control UI opens on
127.0.0.1:18789 -
openclaw security auditreviewed - First channel uses an explicit DM allowlist or deliberately approved pairing; group authorization is separate
- No WAN bind on Gateway or model ports
- Provider keys stored as secrets, not in chat history
- Second test identity cannot reach tools before approval
Channel history, attachments, and tool outputs may land in Gateway state under
~/.openclaw. Treat that directory like a mailbox and credential store: disk encryption, tight file permissions, and no sync of the state dir into shared cloud folders without a deliberate decision.
Interpret the smoke test
Expected results are deliberately asymmetric: your approved account receives a reply; the second identity receives a block or an unapproved pairing request and cannot start a tool-capable turn. Those are test expectations, not a claim this configuration has run on your machine. If both identities reach the agent, close the channel and inspect its effective access policy.
Retain that result with the setup record. Then use allowlists and revocation before admitting another person, and skills and periodic turns before expanding capabilities.



