Beginner guide · OpenClaw

How to set up OpenClaw safely (Mac, Windows, Linux)

Short answer: run the official installer (curl -fsSL https://openclaw.ai/install.sh | bash on a Mac or Linux, or the PowerShell one on Windows), pick Quick start, check openclaw gateway status, open openclaw dashboard and send one test message. Then run openclaw security audit before you connect Telegram or any other app. OpenClaw is free; you pay for the AI model you connect (OpenClaw docs).

Updated · By BotsDoThat

Every command is from OpenClaw's official docs, linked inline and checked Dec 2, 2026. OpenClaw updates often; if a step looks different, follow the linked page.

Before you start

How to set up OpenClaw: 7 steps

  1. Pick the computer it will live on. OpenClaw runs on macOS, Linux or Windows, and its Gateway keeps running in the background so you can message it all day. Security teams advise a spare computer or a separate virtual machine with its own accounts, not the laptop that holds your bank and work logins.
  2. Have an AI model ready. Onboarding can reuse an existing Claude Code or Codex login, or you can paste an API key from a model provider. You pay that provider (or use the plan you already have); OpenClaw itself is free.
  3. Run the installer. macOS, Linux or WSL2: curl -fsSL https://openclaw.ai/install.sh | bash. Windows PowerShell: iwr -useb https://openclaw.ai/install.ps1 | iex. On Windows the docs recommend the Windows Hub desktop app as the easiest route. The installer adds Node if it's missing and starts onboarding.
  4. Choose Quick start in onboarding. Quick start finds the AI access you already have, checks it with a real reply, saves the settings and opens the dashboard. Say Yes to “Keep OpenClaw running in the background?” if you want it always on. Custom setup walks through every option.
  5. Check it's running. Run openclaw gateway status (it should be listening on port 18789), then openclaw dashboard to open the Control UI in your browser and send one test message.
  6. Run the security audit. Run openclaw security audit. The defaults keep the Gateway on your own machine and make strangers who message your bot wait for a pairing code; the audit tells you if a setting has drifted.
  7. Connect one chat app last. Telegram is the fastest (just a bot token). Unknown senders get an 8-character pairing code; approve yourself with openclaw pairing approve telegram <CODE>, and nobody else.

The install commands

macOS, Linux or WSL2

Terminal (macOS, Linux, WSL2)
curl -fsSL https://openclaw.ai/install.sh | bash

Windows (PowerShell)

PowerShell (Windows)
iwr -useb https://openclaw.ai/install.ps1 | iex

Prefer an app? Windows: the Windows Hub companion app (a signed installer). Mac: the menu bar app from OpenClaw's GitHub releases (install docs). Already manage Node yourself? npm install -g openclaw@latest, then openclaw onboard --install-daemon.

Piping a web script into your shell means trusting that site. Copy the command only from the official docs page.

Check it works before you add anything

Run these three
openclaw gateway status
openclaw dashboard
openclaw security audit
  • Status should show the Gateway listening on port 18789.
  • Dashboard opens the Control UI in your browser. Type a message; you should get an AI reply (Getting started).
  • Security audit checks your settings against OpenClaw's safe defaults: Gateway bound to your own machine, unknown DMs answered with a pairing code, groups allowlisted (OpenClaw security).

Connect Telegram (or another chat app)

The docs call Telegram the fastest channel to set up: it only needs a bot token from @BotFather. The default DM policy is pairing: a stranger who messages your bot gets a code and nothing happens until you approve it (OpenClaw Telegram docs).

Approve your own pairing code
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>

Codes are 8 characters and expire after an hour. Approve only yourself. You can also approve in the dashboard under Settings, then Channels, then DM access requests (Pairing docs). Running Hermes Agent instead? Hermes Agent Telegram setup.

Before you let it act: 6 rules

  1. Use a spare machine and separate accounts. Not your main email or bank logins (Microsoft).
  2. Keep the Gateway private. Don't expose it to the internet; if you must reach it remotely, read OpenClaw's exposure runbook first (OpenClaw security).
  3. Keep pairing on. Never set the DM policy to open; approve only people you know.
  4. Treat skills as code. Install only skills from authors you trust and read them first: is OpenClaw safe?
  5. Treat what it reads as untrusted. Emails and web pages can hide instructions for the agent (OpenClaw prompt injection): keep hidden instructions in emails and web pages from steering your bot.
  6. Start read-only, and back it up. A morning summary before anything that sends, buys or deletes; then back up your AI agent so you never lose its memory (and move it to a new computer) and keep an AI agent from deleting your files.

If setup fails

What you seeWhat to do
openclaw not foundnpm's global folder isn't on your PATH. Check node -v and npm prefix -g (install docs)
No reply in the dashboardRun openclaw onboard again to re-check the model sign-in or key
Bot connected, but it ignores youCheck for a pending pairing code: openclaw pairing list telegram
Anything elseopenclaw triage (read-only checks, secrets left out) or openclaw doctor (Getting started)

To remove it: openclaw uninstall --dry-run --all shows what would go, then openclaw uninstall. Move any workspace you want to keep first (Uninstall docs).

What to hand it first

Any of our 12 blueprints works as instructions for OpenClaw. Good first ones: Morning Inbox Briefing and Web Page Watcher. Still choosing? OpenClaw vs Hermes Agent (Hermes has a desktop app: how to install Hermes Agent) or OpenClaw alternatives for beginners. Rather not run a computer at all? Hosted personal agents compared.

Questions

How do I set up OpenClaw?

Install it with the official script (curl -fsSL https://openclaw.ai/install.sh | bash on macOS, Linux or WSL2; iwr -useb https://openclaw.ai/install.ps1 | iex in Windows PowerShell), choose Quick start in onboarding, then check openclaw gateway status and open openclaw dashboard to send a test message. Run openclaw security audit before you connect any chat app.

Is OpenClaw free?

The software is free and open source. The OpenClaw Foundation says it has no paid tier, no hosted service and no token. You pay for the AI model you connect, or reuse a plan you already have (onboarding can use an existing Claude Code or Codex login). A local model can keep everything on your own computer.

How do I install OpenClaw on Windows?

The docs recommend the native Windows Hub companion app (a signed installer) as the easiest desktop route. For the command line, run iwr -useb https://openclaw.ai/install.ps1 | iex in PowerShell. A WSL2 Gateway with the Linux installer also works.

How do I set up OpenClaw on a Mac?

Run curl -fsSL https://openclaw.ai/install.sh | bash in Terminal; it installs Node 26 if you don't have it and starts onboarding. There is also a macOS menu bar app on OpenClaw's GitHub releases page. The background Gateway runs as a LaunchAgent.

How do I connect OpenClaw to Telegram?

Create a bot with Telegram's @BotFather, add its token to OpenClaw (onboarding or openclaw channels add), then message your bot. You'll get a pairing code; approve it with openclaw pairing list telegram and openclaw pairing approve telegram <CODE>. Codes expire after an hour.

Is it safe to set up OpenClaw on my main computer?

Security teams advise against it. Microsoft's security team recommends a dedicated virtual machine or separate device with its own accounts. OpenClaw's defaults are conservative (Gateway on loopback, pairing for unknown senders), but the agent can run tools with whatever access you give it.

OpenClaw setup isn't working. What do I do?

Run openclaw triage: it runs read-only health checks and writes a diagnosis you can read or hand to a coding agent, with secrets left out. openclaw doctor shows the findings directly. If the shell says openclaw isn't found, npm's global folder is usually missing from your PATH.

How do I uninstall OpenClaw?

Run openclaw uninstall --dry-run --all to preview what would be removed, then openclaw uninstall (or --all for everything: service, state, workspace and app). Move any workspace you want to keep first.

Next step

Write your first job's rules in the free bot instructions builder (no sign-up, nothing stored) or with the 6-part AI agent instructions template, then paste them into the dashboard chat.

Sources

BotsDoThat Weekly

Get the free Starter Pack: 7 AI agents you can put on a schedule

Join the BotsDoThat Weekly and we'll send you 7 ready-to-paste setups for ChatGPT, Claude, OpenClaw and Hermes Agent, plus a bonus for power users. Each one asks you before it sends, buys or deletes anything.

We'll email you a confirm button. Click it to confirm and get your Starter Pack. Unsubscribe any time. Privacy

Know someone who'd like this? Forward it, or send them to botsdothat.com/newsletter