Stand Up OpenClaw for Your Business
Install OpenClaw on an always-on host, run the Gateway as a service, connect Slack or Telegram with allowlists and pairing, and put the Control UI behind Tailscale or Cloudflare Access.
- Time needed
- 1–2 hours
- Sections
- 12
- Level
- Intermediate
What you will have live
By the end of this playbook you will have:
- OpenClaw installed on an always-on host (VPS or office Mac/Linux)
- Gateway running as a background service (systemd / LaunchAgent)
- A team chat channel connected (Slack Socket Mode or Telegram) with allowlisted rooms and mention-required replies
- DM pairing so random strangers cannot drive your agent
- Authenticated access to the Control UI (Tailscale Serve or Cloudflare Access — not a naked public bind)
- A first business outcome: the bot answers an ops question in
#ops(or a Telegram group) using your connected tools, without writing to CRM until you deliberately enable that later
Prerequisites
- Always-on host — Ubuntu 24.04 VPS (2 GB+ RAM) or a Mac mini that stays awake. OpenClaw recommends Node.js 26 (or supported 24.16+ / 26.1+). Check with
node --version. - Model access — Anthropic/OpenAI API key or an existing Claude Code / Codex CLI login the onboarding wizard can reuse.
- Team chat — Slack: ability to create a Slack app (bot + app-level token for Socket Mode), or Telegram: BotFather token (fastest first channel).
- Ingress plan for the Control UI — Prefer Tailscale Serve on a company tailnet, or Cloudflare Access (identity-aware proxy) in front of the Gateway.
- Password manager for: host SSH, API keys, Slack tokens, Gateway auth token, pairing approvals.
- Optional: domain if you use HTTP webhook mode for Slack (Socket Mode avoids a public webhook URL).
Step 1 — Install OpenClaw on the host
curl -fsSL https://openclaw.ai/install.sh | bash
Or with a managed Node install:
npm install -g openclaw@latest
# On npm 12 / 11.16+ you may need: --allow-scripts=openclaw
openclaw --version
node --version
Step 2 — Onboard and install the Gateway service
openclaw onboard --install-daemon
If the installer already opened Quick start in the foreground:
- Complete Quick start (or Custom setup for full options).
- Stop the foreground Gateway with Ctrl+C when ready for background mode.
- Install the service:
openclaw gateway install
openclaw gateway status
You should see the Gateway listening on port 18789 (loopback by default).
Open the dashboard:
openclaw dashboard
Send a test message in the Control UI chat. If it replies, core auth + model path works.
Step 3 — Put the Control UI behind authenticated ingress (do this before Slack)
Do not bind the Gateway to 0.0.0.0 on the public internet.
Pick one:
Option A — Tailscale Serve (recommended for small teams)
- Install Tailscale on the host; join your company tailnet.
- Enable Serve to the local Gateway / Control UI per OpenClaw’s Tailscale guidance.
- Prefer
gateway.auth.allowTailscaleso each teammate signs in with their Tailscale identity (audit-friendly) instead of one shared secret.
Option B — Cloudflare Access
- Put Cloudflare Access in front of the Gateway URL.
- Follow OpenClaw Trusted proxy auth so the Gateway trusts the proxy’s identity headers.
- Only allow your company email domain.
Step 4 — Connect Slack (Socket Mode) or Telegram
Slack (business default)
- Create a Slack app; enable Socket Mode; create an App Token with
connections:write. - Create a Bot Token with the scopes your workspace policy allows (start minimal: channels history, chat write, app mentions, slash commands as needed).
- Install the app to the workspace; invite the bot to one private
#ops-openclawchannel first. - Put tokens in the environment (or OpenClaw’s env provider), e.g.
SLACK_BOT_TOKEN,SLACK_APP_TOKEN. - Configure channel policy — allowlist + mention required (from OpenClaw team docs):
{
channels: {
slack: {
enabled: true,
mode: "socket",
appToken: { source: "env", provider: "default", id: "SLACK_APP_TOKEN" },
botToken: { source: "env", provider: "default", id: "SLACK_BOT_TOKEN" },
groupPolicy: "allowlist",
channels: {
"<SLACK_CHANNEL_ID>": { requireMention: true },
},
},
},
}
- Restart the Gateway:
openclaw gateway restart.
Telegram (fastest smoke test)
- Create a bot with BotFather; copy the token into config/env.
- Message the bot; it returns a pairing code.
- On the host:
openclaw pairing approve telegram <CODE>(same pattern for Slack DMs:openclaw pairing approve slack <CODE>). - Until approved, the bot ignores that DM — this is intentional.
Step 5 — First business outcome
In the allowlisted Slack channel, mention the bot:
@OpenClaw Summarize open items in our ops runbook folder / what is blocked for the Acme renewal?
Pass criteria:
- Bot only replies when mentioned (or per your policy)
- Answer is useful or clearly says it lacks access — no invented CRM stages
- Session appears in Control UI; a second teammate (if ingress is ready) can open the same session
Step 6 — Team harden (roles, pairing, audit)
- Pairing — leave DM pairing on; approve only known teammates.
- Allowlists — do not set group policy to “everyone” in public channels.
- Roles — define operator roles (maintainer vs guest) so guests cannot change Gateway config; use sandbox-required for lower-trust operators (see OpenClaw Named operator roles).
- One trust boundary — everyone who can message a tool-enabled agent shares that agent’s tool power. Untrusted tenants → separate gateways (separate OS users/hosts).
- Security audit — run
openclaw security auditand fix inbound/exposure findings. - Model strength — shared gateways see more prompt-injection attempts; use a current strong model.
- Secrets — tokens in env/secret store; never paste bot tokens into the chat channel.
- Backups — back up OpenClaw state dir (
OPENCLAW_STATE_DIR/ default under the service account home) on a schedule; test restore. - Updates — pin or deliberately upgrade
openclaw; read release notes beforenpm update.
Go-live checklist
- [ ]
openclaw gateway statushealthy on 18789 - [ ] Control UI only via Tailscale/CF Access (not public)
- [ ] Slack/Telegram connected; allowlisted room only
- [ ] Mention-required replies confirmed
- [ ] At least one DM pairing approved; unknown DMs ignored
- [ ] First useful ops answer in the team channel
- [ ]
openclaw security auditclean enough for your risk bar - [ ] State directory backup exists off-box
- [ ] Named owner for the host + who may approve pairings
Pitfalls
- Public Gateway bind — scanners will find it. Loopback + authenticated ingress only.
- Skipping pairing — open DMs turn your agent into a free tool API for the internet.
- One gateway for customers + staff — wrong trust model; split gateways per tenant.
- WhatsApp/Telegram on Bun — OpenClaw warns Bun has issues; run the Gateway on Node.
- God-mode tools on day one — start read-only; add writes with operator approval scopes.
- Shared secret forever — fine for a spike; bad for audit. Move to Tailscale/CF identity.
FAQ
OpenClaw vs n8n?
OpenClaw is the chat-native agent gateway (brain in Slack/Telegram). n8n is the workflow runtime (hands for CRM/ERP APIs, schedules, HITL tool gates). Many teams run both — see our OpenClaw + n8n MCP stack playbook.
Do I need Docker?
Not required. Official path is the install script + gateway install. Docker/Nix are documented alternatives on the Install page.
Next step
Add durable workflow hands with Self-Host n8n and Ship a Production AI Ops Agent, wire OpenClaw + n8n over MCP, or deepen write gates with n8n HITL Approval Gates.
For governed production design: Solutions, Architecture, or contact Octacer.
Keep going
More playbooks
Want it running on your stack?
We implement this playbook for clients — tailored to your stack, your data, and your team's workflow, and handed over documented.