๐Ÿฆž OpenClaw
Blog โ€บ Setup Guide

How to Set Up OpenClaw on a Mac Mini (Complete 2026 Guide)

Go from unboxing to a fully running AI agent. Channels, memory, remote access, always-on โ€” the whole thing. No fluff. Just the steps.

Updated March 2026 ~20 min read Covers OpenClaw v1.x

What Is OpenClaw?

OpenClaw is an open-source framework that turns large language models into persistent, always-on AI agents. Unlike ChatGPT or Claude's web apps โ€” where conversations end when you close the tab โ€” OpenClaw runs on your hardware, stays online 24/7, and connects to your real life through channels like Telegram, Discord, and WhatsApp.

Think of it as the operating system for a personal AI. It handles:

  • โ†’ Multi-channel messaging โ€” talk to your agent from Telegram, Discord, WhatsApp, or all three simultaneously
  • โ†’ Memory and continuity โ€” your agent remembers context across sessions, days, and weeks
  • โ†’ Tool use โ€” browse the web, read files, run code, manage calendars, send emails
  • โ†’ Proactive behavior โ€” heartbeats let your agent check your inbox, calendar, and more without being asked
  • โ†’ Personality โ€” define who your agent is with a SOUL.md file, not just what it does

It's the difference between a chatbot and an assistant. An assistant that's always there, knows your preferences, and can actually do things.

Hardware Requirements

OpenClaw itself is lightweight โ€” it's a Node.js process that orchestrates API calls, not a local model runner. The hardware requirements are modest:

Recommended: Mac Mini (M-series)

  • Mac Mini M2 or M4 โ€” the sweet spot. Silent, sips power (~5-10W idle), and macOS gives you native access to Apple ecosystem tools
  • 8GB RAM โ€” plenty for OpenClaw + background services
  • 256GB storage โ€” more than enough unless you're storing large files
  • Ethernet recommended โ€” more reliable than Wi-Fi for an always-on service

Also Works On

  • Any Mac โ€” MacBook, iMac, Mac Studio. If it runs macOS, it works.
  • Linux โ€” Ubuntu 22.04+, Debian 12+, or any distro with Node.js 20+. Great on a VPS like Hetzner or DigitalOcean ($5-10/mo).
  • Raspberry Pi 5 โ€” works, but memory-constrained. Fine for a lightweight setup.

Why Mac Mini? It's not required, but it's the best bang-for-buck always-on machine. Silent, extremely low power, runs macOS (which means screen sharing, Shortcuts, and Apple-native integrations). A used M2 Mac Mini goes for ~$400 and will run OpenClaw for years.

Installation Step by Step

1 Install Prerequisites

You need Node.js 20+ and npm. On macOS, the easiest path is Homebrew:

# Install Homebrew (if you don't have it)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Node.js
brew install node

# Verify
node --version   # Should be v20+
npm --version

On Linux: use nvm or your distro's package manager. Just make sure you get Node 20 or newer.

2 Create a Dedicated User (Recommended)

Run OpenClaw under its own user account. This keeps things isolated and makes permissions cleaner:

# On macOS: System Settings โ†’ Users & Groups โ†’ Add User
# Name: openclaw
# Account type: Standard

# On Linux:
sudo adduser openclaw
sudo usermod -aG sudo openclaw

You can run it under your own account, but a dedicated user is cleaner for a server that stays on.

3 Install OpenClaw

npm install -g openclaw

That's it. One command. Verify with:

openclaw --version

4 Initialize Your Workspace

openclaw init

This creates ~/.openclaw/ with the default workspace structure: config files, a workspace directory, and template files for SOUL.md, USER.md, and AGENTS.md.

Initial Configuration

OpenClaw's brain lives in ~/.openclaw/openclaw.yaml (or .json โ€” YAML is more readable). This is where you wire up your AI provider, channels, and behavior.

The Essentials

# ~/.openclaw/openclaw.yaml

# Your AI provider โ€” OpenClaw works with any OpenAI-compatible API
ai:
  provider: anthropic          # or openai, openrouter, etc.
  model: claude-sonnet-4-20250514     # default model for conversations
  apiKey: sk-ant-xxxxx         # or use ANTHROPIC_API_KEY env var

# Gateway โ€” the service that manages connections
gateway:
  bind: 127.0.0.1:3000         # local only by default
  # remote:
  #   url: https://your-domain.com  # for remote access

# Agent identity
agent:
  name: "MyAgent"
  workspace: ~/.openclaw/workspace

Security tip: Never commit API keys to git. Use environment variables or a .env file. OpenClaw reads from ~/.openclaw/.env automatically.

Environment Variables

Create ~/.openclaw/.env for your secrets:

# ~/.openclaw/.env
ANTHROPIC_API_KEY=sk-ant-your-key-here
OPENAI_API_KEY=sk-your-key-here        # optional, for tool use
TELEGRAM_BOT_TOKEN=123456:ABC-xyz      # we'll set this up next

Setting Up Channels

Channels are how you talk to your agent. You can set up one or all of these โ€” they work independently.

๐Ÿ“ฑ Telegram (Recommended Starting Point)

Telegram is the easiest channel to set up and the best for personal use. Fast, reliable, supports reactions and inline buttons.

  1. Message @BotFather on Telegram
  2. Send /newbot and follow the prompts
  3. Copy your bot token (looks like 123456:ABC-DEF1234)
  4. Add it to your config:
# In openclaw.yaml under channels:
channels:
  telegram:
    botToken: ${TELEGRAM_BOT_TOKEN}
    allowedUsers:
      - 123456789    # Your Telegram user ID
    # Get your ID: message @userinfobot on Telegram

Important: Always set allowedUsers. Without it, anyone who finds your bot can talk to your agent (and through it, access your files, email, etc.).

๐Ÿ’ฌ Discord

Great for group settings โ€” your agent can participate in server channels alongside humans.

  1. Go to the Discord Developer Portal
  2. Create a new application โ†’ Bot โ†’ Copy the token
  3. Enable Message Content Intent under Privileged Gateway Intents
  4. Invite the bot to your server with appropriate permissions
channels:
  discord:
    botToken: ${DISCORD_BOT_TOKEN}
    allowedGuilds:
      - "YOUR_SERVER_ID"

๐Ÿ“ฒ WhatsApp

WhatsApp requires a bit more setup via the WhatsApp Business API or a bridge service. Check the OpenClaw docs for current WhatsApp integration options โ€” the landscape here changes frequently.

Writing Your SOUL.md

This is what makes OpenClaw different from a generic chatbot. SOUL.md defines your agent's personality, values, and behavior. It's loaded at the start of every session and shapes every response.

Your SOUL.md lives at ~/.openclaw/workspace/SOUL.md. Here's what a good one covers:

# SOUL.md โ€” Who You Are

## Personality
- Direct and concise. No filler words.
- Has opinions. Disagrees when warranted.
- Dry humor. Never forces jokes.

## Principles
- Be resourceful before asking questions.
- Actions over words โ€” do the thing, don't talk about doing the thing.
- Private things stay private. Always.

## Communication Style
- Match the user's energy. Short question โ†’ short answer.
- Use code blocks for anything technical.
- In group chats: contribute, don't dominate.

## Boundaries
- Never send emails or public posts without explicit confirmation.
- Ask before any destructive operation.
- When uncertain, say so.

Free tool: Not sure where to start? Use our SOUL.md Generator โ€” answer a few questions and get a ready-to-use personality file for your agent.

You'll also want to fill in USER.md (info about yourself โ€” name, timezone, preferences) and IDENTITY.md (your agent's name, emoji, and vibe). These give the agent context about who it's helping.

Configuring Heartbeats and Cron Jobs

Heartbeats are what make your agent proactive instead of purely reactive. At a configurable interval, OpenClaw pings your agent and says "anything to do?" The agent can then check email, scan calendars, follow up on tasks, or just go back to sleep.

Heartbeat Configuration

# In openclaw.yaml
heartbeat:
  enabled: true
  interval: 30m              # How often to ping
  prompt: |
    Read HEARTBEAT.md if it exists. Follow it strictly.
    If nothing needs attention, reply HEARTBEAT_OK.
  channels:
    - telegram:direct:YOUR_USER_ID   # Where proactive messages go

Create a HEARTBEAT.md in your workspace to tell the agent what to check:

# HEARTBEAT.md
- Check email for anything urgent
- Check calendar for events in the next 2 hours
- If it's morning (8-9 AM), give a brief day overview

Cron Jobs

For tasks that need exact timing โ€” "every Monday at 9 AM, send me a weekly summary" โ€” use cron jobs instead of heartbeats:

# In openclaw.yaml
cron:
  weekly-summary:
    schedule: "0 9 * * 1"     # Every Monday at 9 AM
    prompt: "Write a brief summary of last week's activity and upcoming events."
    channel: telegram:direct:YOUR_USER_ID
    model: claude-sonnet-4-20250514        # Can use a different model per job

Rule of thumb: Use heartbeats for "check a few things every 30 min" work. Use cron for "do exactly this at exactly this time" work. Batch related checks into heartbeats to save API calls.

Setting Up Memory and Persistence

Every time your agent starts a new session, it wakes up fresh โ€” no memory of previous conversations. That's where the memory system comes in. OpenClaw uses plain Markdown files for memory, which means it's transparent, versionable, and you can read it yourself.

How Memory Works

  • โ†’ Daily notes (memory/YYYY-MM-DD.md) โ€” raw logs of what happened each day. Created automatically by the agent.
  • โ†’ Long-term memory (MEMORY.md) โ€” curated insights, preferences, and important context. The agent distills daily notes into this periodically.
  • โ†’ Session startup โ€” each session, the agent reads SOUL.md, USER.md, today's and yesterday's daily notes, and MEMORY.md. This is how it "remembers."

Directory Structure

~/.openclaw/workspace/
โ”œโ”€โ”€ SOUL.md           # Agent personality
โ”œโ”€โ”€ USER.md           # About you
โ”œโ”€โ”€ IDENTITY.md       # Agent's name/avatar
โ”œโ”€โ”€ MEMORY.md         # Long-term memory (curated)
โ”œโ”€โ”€ AGENTS.md         # Workspace rules and conventions
โ”œโ”€โ”€ HEARTBEAT.md      # What to check on heartbeats
โ”œโ”€โ”€ TOOLS.md          # Local tool configuration notes
โ””โ”€โ”€ memory/
    โ”œโ”€โ”€ 2026-03-19.md # Daily notes
    โ”œโ”€โ”€ 2026-03-20.md
    โ””โ”€โ”€ 2026-03-21.md

The beauty of file-based memory: you can git init the workspace and track changes over time. You can read exactly what your agent remembers. No opaque vector databases โ€” just Markdown.

Remote Access (Tailscale + DeskPad + Screen Sharing)

If your Mac Mini is running headless in a closet (as it should be), you'll want remote access for maintenance. Here's the battle-tested stack:

Tailscale โ€” Secure Networking

Tailscale creates a private network between your devices. No port forwarding, no dynamic DNS, no firewall holes.

# Install Tailscale
brew install --cask tailscale

# Or download from https://tailscale.com/download/mac
# Sign in and connect โ€” that's it.

Once connected, your Mac Mini gets a stable IP on your Tailscale network (like 100.x.x.x). You can SSH into it from anywhere:

ssh openclaw@100.x.x.x

DeskPad โ€” Virtual Display

A headless Mac has no display, which means screen sharing shows nothing useful. DeskPad creates a virtual display:

brew install --cask deskpad

Launch DeskPad, and it creates a virtual screen you can connect to via Screen Sharing or VNC.

Screen Sharing

Enable in System Settings โ†’ General โ†’ Sharing โ†’ Screen Sharing. Then from any other Mac:

# In Finder: Go โ†’ Connect to Server
vnc://100.x.x.x    # Your Tailscale IP

Now you can manage your Mac Mini's GUI from your laptop, phone, or anywhere with Tailscale access.

Preventing Sleep for Always-On Operation

An agent that sleeps isn't much of an agent. Here's how to keep your Mac Mini awake and OpenClaw running:

Disable Sleep

# Prevent sleep entirely
sudo pmset -a sleep 0
sudo pmset -a disablesleep 1
sudo pmset -a displaysleep 0

# Verify settings
pmset -g

Also go to System Settings โ†’ Energy and uncheck "Put hard disks to sleep when possible" and enable "Start up automatically after a power failure."

Auto-Start OpenClaw

Use a Launch Agent to start OpenClaw on boot:

# Create the plist
cat > ~/Library/LaunchAgents/com.openclaw.gateway.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.openclaw.gateway</string>
  <key>ProgramArguments</key>
  <array>
    <string>/opt/homebrew/bin/openclaw</string>
    <string>gateway</string>
    <string>start</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>StandardOutPath</key>
  <string>/tmp/openclaw.log</string>
  <key>StandardErrorPath</key>
  <string>/tmp/openclaw-error.log</string>
</dict>
</plist>
EOF

# Load it
launchctl load ~/Library/LaunchAgents/com.openclaw.gateway.plist

With KeepAlive set to true, macOS will restart the OpenClaw gateway if it crashes. Combined with "Start up after power failure," your agent will survive reboots and power outages.

Start the Gateway

If you want to start manually first (recommended for initial testing):

# Start the gateway
openclaw gateway start

# Check status
openclaw gateway status

# View logs
tail -f /tmp/openclaw.log

Common Issues and Troubleshooting

Agent isn't responding to messages

  • Check openclaw gateway status โ€” is the gateway running?
  • Verify your bot token is correct and the bot isn't blocked
  • Check allowedUsers โ€” is your user ID in the list?
  • Look at logs: tail -50 /tmp/openclaw-error.log

API errors / rate limits

  • Verify your API key is valid and has credits
  • Check if you've hit rate limits โ€” OpenClaw logs these
  • Try a different model temporarily to isolate the issue

Agent lost memory / seems confused

  • Check that MEMORY.md and daily files exist in the workspace
  • Ensure workspace path is correct in openclaw.yaml
  • Long conversations can exceed context windows โ€” the agent may need to be more aggressive about writing to files

Mac Mini went to sleep

  • Re-run the pmset commands above
  • Check for macOS updates that may have reset energy settings
  • Install KeepingYouAwake as a belt-and-suspenders measure

Can't connect remotely

  • Is Tailscale running on both machines? Check tailscale status
  • Is Screen Sharing enabled? System Settings โ†’ General โ†’ Sharing
  • Try SSH first โ€” if that works, the network is fine and it's a Screen Sharing config issue

Node connection / pairing failures

  • If QR code or setup code fails, check that your gateway's bind address is accessible
  • For remote connections via VPS or Tailscale, verify gateway.remote.url is set correctly
  • Check that pairing tokens haven't expired โ€” regenerate if needed
  • Ensure your firewall allows the gateway port

Next Steps

If you've followed this guide, you should have a fully running OpenClaw agent. It responds to messages, has a personality, checks in proactively, remembers things, and survives reboots. That's a real agent.

From here, you can explore:

  • โ†’ Skills โ€” install community skills from ClawHub for GitHub, email, weather, Obsidian, and more
  • โ†’ Multiple channels โ€” add Discord for group chats, WhatsApp for mobile
  • โ†’ Sub-agents โ€” spawn background agents for coding tasks, research, or long-running jobs
  • โ†’ Voice โ€” add TTS for spoken responses (great for stories and summaries)
  • โ†’ Home automation โ€” connect to HomeKit, cameras, smart devices

The workspace files are yours to evolve. The more you use your agent, the more it learns about you, and the more useful it becomes. That's the whole point.

Don't Want to Do This Yourself?

We set up AI agents for a living. Get a fully configured OpenClaw instance โ€” installed, tested, and personalized โ€” without touching a terminal.

Mac Mini sourcing ยท Installation ยท Channel setup ยท Personality tuning ยท Remote access ยท Ongoing support

This guide is maintained by the OpenClaw team and updated as the platform evolves. Last updated March 2026. Found an error? Open an issue on GitHub.