AI Agents Intermediate

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.

1–2 hours Octacer Team September 27, 2026
Stand Up OpenClaw for Your Business

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

  1. 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.
  2. Model access — Anthropic/OpenAI API key or an existing Claude Code / Codex CLI login the onboarding wizard can reuse.
  3. Team chat — Slack: ability to create a Slack app (bot + app-level token for Socket Mode), or Telegram: BotFather token (fastest first channel).
  4. Ingress plan for the Control UI — Prefer Tailscale Serve on a company tailnet, or Cloudflare Access (identity-aware proxy) in front of the Gateway.
  5. Password manager for: host SSH, API keys, Slack tokens, Gateway auth token, pairing approvals.
  6. 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:

  1. Complete Quick start (or Custom setup for full options).
  2. Stop the foreground Gateway with Ctrl+C when ready for background mode.
  3. 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:

  1. Install Tailscale on the host; join your company tailnet.
  2. Enable Serve to the local Gateway / Control UI per OpenClaw’s Tailscale guidance.
  3. Prefer gateway.auth.allowTailscale so each teammate signs in with their Tailscale identity (audit-friendly) instead of one shared secret.

Option B — Cloudflare Access

  1. Put Cloudflare Access in front of the Gateway URL.
  2. Follow OpenClaw Trusted proxy auth so the Gateway trusts the proxy’s identity headers.
  3. Only allow your company email domain.

Step 4 — Connect Slack (Socket Mode) or Telegram

Slack (business default)

  1. Create a Slack app; enable Socket Mode; create an App Token with connections:write.
  2. Create a Bot Token with the scopes your workspace policy allows (start minimal: channels history, chat write, app mentions, slash commands as needed).
  3. Install the app to the workspace; invite the bot to one private #ops-openclaw channel first.
  4. Put tokens in the environment (or OpenClaw’s env provider), e.g. SLACK_BOT_TOKEN, SLACK_APP_TOKEN.
  5. 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 },
      },
    },
  },
}
  1. Restart the Gateway: openclaw gateway restart.

Telegram (fastest smoke test)

  1. Create a bot with BotFather; copy the token into config/env.
  2. Message the bot; it returns a pairing code.
  3. On the host: openclaw pairing approve telegram <CODE> (same pattern for Slack DMs: openclaw pairing approve slack <CODE>).
  4. 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)

  1. Pairing — leave DM pairing on; approve only known teammates.
  2. Allowlists — do not set group policy to “everyone” in public channels.
  3. 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).
  4. 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).
  5. Security audit — run openclaw security audit and fix inbound/exposure findings.
  6. Model strength — shared gateways see more prompt-injection attempts; use a current strong model.
  7. Secrets — tokens in env/secret store; never paste bot tokens into the chat channel.
  8. Backups — back up OpenClaw state dir (OPENCLAW_STATE_DIR / default under the service account home) on a schedule; test restore.
  9. Updates — pin or deliberately upgrade openclaw; read release notes before npm update.

Go-live checklist

  • [ ] openclaw gateway status healthy 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 audit clean 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.

Ready to Implement This Playbook?

Our team can implement these strategies for you, tailored to your specific business needs.

Schedule Consultation