Setup Guide

Install OpenClaw
on Mac

From zero to a working AI agent in 30 minutes. No coding experience needed.

30 minutes macOS Beginner friendly
STEP 01

What you need before starting

  • A Mac (any Mac from the last 5 years. M1/M2/M3/M4 chips are ideal)
  • macOS 13 Ventura or newer
  • At least 8GB RAM (Apple menu → About This Mac to check)
  • A stable internet connection
  • About 30 minutes
Which Mac?

If you want your agent running 24/7, a Mac Mini M4 is the best option. Quiet, efficient, can be tucked away. A MacBook works fine for getting started. You can always move it to dedicated hardware later.

STEP 02

Install Homebrew

Homebrew is the package manager for Mac. Think of it as an app store for developer tools. You install it once and never think about it again.

Open Terminal: press Cmd + Space, type Terminal, press Enter. Then paste:

Terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

It will ask for your Mac login password. Type it and press Enter. You won't see characters as you type — that's normal. Takes a few minutes. Wait for the prompt to return.

Apple Silicon (M1/M2/M3/M4)

Homebrew may print two extra commands after installing. If it does, run them. They look like echo >> ~/.zprofile and eval "$(/opt/homebrew/bin/brew shellenv)".

Verify: run brew --version. You should see Homebrew 5.x.x or similar.

STEP 03

Install Node.js

OpenClaw runs on Node.js. You don't need to know what that means. Just install it.

Terminal
brew install node@22

Wait for it to finish. Verify:

Terminal
node --version

Should show v22.x.x. If you get "command not found":

Terminal
echo 'export PATH="/opt/homebrew/opt/node@22/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
STEP 04

Install OpenClaw

One command:

Terminal
npm install -g openclaw@latest

Verify:

Terminal
openclaw --version
Version matters

Always install openclaw@latest. CVE-2026-25253 was a critical remote code execution vulnerability patched in 2026.1.29. If your version is older than that, update immediately: npm install -g openclaw@latest

STEP 05

Get your AI API key

OpenClaw needs an AI brain. We recommend Claude by Anthropic — the best model for business tasks and writing.

  1. Go to console.anthropic.com
  2. Create an account or sign in
  3. Click API Keys in the left sidebar → Create Key
  4. Name it anything (e.g., "OpenClaw")
  5. Copy the key. Save it — you only see it once.
  6. Go to Billing and set a monthly spending limit while you're learning
Cost

Most people spend $5–30/month. Light use (a few messages a day) is very cheap. The biggest cost mistake is leaving heartbeat on Opus. See the Beginner Playbook for the full cost guide.

Other models

OpenClaw also works with OpenAI GPT, Google Gemini, DeepSeek, and local models via Ollama. Claude is the recommended starting point. You can add more later.

STEP 06

Run the setup wizard

Terminal
openclaw onboard

The wizard guides you through every setting. Key answers for a secure setup:

ModeLocal — keeps everything on your machine
Gateway bind127.0.0.1 — NEVER 0.0.0.0 or LAN
Gateway authToken — enables authentication
DM policyPairing — requires manual approval
SkillsSkip all — install zero skills to start
DaemonYes — keeps agent running 24/7 on restart
Gateway bind is the most important setting

Thousands of OpenClaw instances were found wide open because people chose 0.0.0.0. Always choose 127.0.0.1 (loopback only). This means only your machine can reach the gateway.

STEP 07

Connect Telegram

Telegram is the easiest way to talk to your agent from anywhere. Free, works on every device, supports voice notes.

Create the bot

  1. Open Telegram → search @BotFather (blue verified checkmark)
  2. Tap Start → type /newbot
  3. Give it a name (e.g., "My AI Agent")
  4. Give it a username ending in bot
  5. Copy the token BotFather gives you. Save it.

Connect and pair

Terminal
openclaw gateway start

Message your bot on Telegram. It'll trigger a pairing request. In Terminal:

Terminal
openclaw pairing list telegram
Terminal
openclaw pairing approve telegram YOUR_CODE
Connected

Send another message to your bot. If it responds, Telegram is live. You now have an AI agent you can message from your phone.

STEP 08

Give your agent an identity

This is what makes OpenClaw different from every other AI tool. Six text files in your workspace folder define who your agent is. It reads them fresh at the start of every session.

SOUL.md

Who your agent is. Values, mission, purpose, relationship with you.

IDENTITY.md

How it communicates. Tone, style, what it never says.

USER.md

Who you are. Name, timezone, role, preferences.

AGENTS.md

Operating instructions. Priorities, daily routines, how it handles requests.

MEMORY.md

Long-term memory. Important facts it should always know.

HEARTBEAT.md

Scheduled tasks. Morning briefings, automated checks.

Open the workspace folder:

Terminal
open ~/.openclaw/workspace

Open any of the files in TextEdit and start writing. The simplest place to start is SOUL.md:

SOUL.md example
# SOUL.md You are [Name]'s AI assistant. You help them run their business. You are practical, direct, and always focused on saving time. Write in plain English. No jargon. No filler. You help with: emails, research, scheduling, content. Never make financial decisions without explicit approval. Never contact anyone outside without explicit approval. When in doubt, ask before acting.
The more specific, the better

Every detail you add to SOUL.md and USER.md makes your agent more useful. Tell it about your industry, your clients, your communication style. You can update these files any time.

STEP 09

Start the gateway

The gateway is the engine that runs in the background and routes messages to your agent. If you installed the daemon in Step 6, it's already running and starts on every boot.

Terminal
openclaw gateway status

If it says "running", you're set. If not: openclaw gateway start

Useful commands

openclaw gateway statusCheck if running
openclaw gateway startStart the gateway
openclaw gateway restartRestart after config changes
openclaw security audit --deepSecurity scan
openclaw security audit --fixAuto-fix security issues
openclaw doctorDiagnose problems
openclaw dashboardOpen web control panel
openclaw logs --followWatch live logs
STEP 10

Send your first message

Open Telegram. Message your bot. Start simple:

"Hey, what can you do?"
Your agent will introduce itself based on the identity you set up.

Then try something real:

"Write me a professional email apologising to a client for a scheduling delay. Short and friendly."
"Research the top 3 AI tools for project management and give me a quick comparison."
"Create a simple one-page website for my business with a contact form."
You're live

You have your own AI agent running on your machine. It knows who you are, it's ready to work, and it gets more useful every day you use it. Start with one task. Build from there.

What to do next: read the Beginner Playbook for memory, cost control, and automation.

Read the Beginner Playbook → ← Back to vault