How to Set Up OpenClaw on a Mac Mini: The Complete Checklist

February 14, 2026 • OpenClaw • Code • AI • MacMini ⌇ Connect ↗

Fractal image of a man sitting on a chain surrounded by a pile of money

After setting up multiple OpenClaw agents on dedicated Mac Minis, I condensed every step — including the bugs, silent failures, and undocumented gotchas into one chronological checklist, so you can set this up in the most secure way possible.

The fastest way to use this: open a new Claude conversation, paste this entire article, and tell it your agent’s name, role, and timezone. It’ll walk you through every phase step by step and help you debug when things break.

For official documentation, start with the OpenClaw Getting Started guide, the Security Guide, and the GitHub repository.


Phase 1: Prepare macOS

1.1 Prevent sleep (critical for 24/7 operation)

sudo pmset -a sleep 0 disksleep 0 displaysleep 0
sudo pmset -a hibernatemode 0 powernap 0
sudo pmset -a standby 0 autopoweroff 0
sudo pmset -a autorestart 1

Verify:

pmset -g | grep sleep

All values should be 0.

1.2 Caffeinate (persist across reboots)

cat > ~/Library/LaunchAgents/com.openclaw.caffeinate.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.caffeinate</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/bin/caffeinate</string>
        <string>-s</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>
EOF

launchctl load ~/Library/LaunchAgents/com.openclaw.caffeinate.plist

Verify:

pgrep caffeinate  # Should return a PID

1.3 Auto-login

System Settings -> Users & Groups -> Login Options -> Automatic login: [agent user]

1.4 Firewall

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on

1.5 Disable unnecessary services

sudo mdutil -a -i off
defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES

1.6 File permissions

chmod 700 ~/

1.7 Enable full-disk encryption

System Settings -> Privacy & Security -> FileVault -> Turn On

1.8 Enable Remote Login (optional, for SSH access)

System Settings -> General -> Sharing -> Remote Login -> ON

Restrict to the agent user only.


Phase 2: Install Tailscale

brew install tailscale
tailscale up

Follow the auth URL to join your tailnet. Verify:

tailscale status

IMPORTANT: If the Mac has the App Store version of Tailscale installed, the brew CLI may conflict. The App Store version does not support Tailscale SSH. Use the Mac app for GUI management and the brew CLI for tailscale serve only.


Phase 3: Install Prerequisites

# Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Node 22+
brew install node@22

# Git
brew install git

Verify Node:

node -v  # Must be 22+

3.1 Create a Telegram bot (needed during onboarding)

  1. Message @BotFather on Telegram
  2. Send /newbot -> give it a name and username
  3. Copy the bot token — you’ll paste it during the onboarding wizard

Phase 4: Install OpenClaw

npm install -g openclaw@latest

Run the onboarding wizard

openclaw onboard --install-daemon

The wizard walks through gateway setup, model/auth, channels (select Telegram and paste your bot token from Phase 3.1), skills, and daemon installation.

KNOWN BUG (v2026.2.12+, Issue #16134): The onboarding wizard may SKIP the Model/Auth step entirely. It jumps straight to “How do you want to hatch your bot?” without ever asking for an API key. If this happens, the agent will be unresponsive. Fix in Phase 5.

Verify

openclaw --version
openclaw health

Pair Telegram

After onboarding, message your bot on Telegram. It will send a pairing code. Approve it:

openclaw pairing list --channel Telegram
openclaw pairing approve Telegram <CODE>

Verify:

openclaw health
# Should show: Telegram: ok (@yourbotname)

Phase 5: Configure API Key and Models

5.1 Remove any stale environment variables

The env variable ANTHROPIC_API_KEY overrides OpenClaw’s config and causes silent auth failures if it contains an invalid key.

echo $ANTHROPIC_API_KEY

If it returns anything:

grep -rn ANTHROPIC_API_KEY ~/.zshrc ~/.zprofile ~/.bash_profile ~/.zshenv 2>/dev/null

Remove the line from whichever file it’s in, then:

source ~/.zshrc
unset ANTHROPIC_API_KEY

5.2 Test your API key works

Replace YOUR_KEY with your actual Anthropic API key from console.anthropic.com:

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: YOUR_KEY" \
  -H "content-type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{"model":"claude-sonnet-4-20250514","max_tokens":50,"messages":[{"role":"user","content":"hi"}]}'

You should get a JSON response with Claude’s reply. If you get an error, the key is invalid — get a new one from console.anthropic.com.

5.3 Add API key and model config to openclaw.json

nano ~/.openclaw/openclaw.json

Add the env block at the top level (after the opening {):

"env": {
  "ANTHROPIC_API_KEY": "sk-ant-api03-YOUR_ACTUAL_KEY_HERE"
},

Add the model config inside agents.defaults:

"model": {
  "primary": "anthropic/claude-sonnet-4-5",
  "fallbacks": ["anthropic/claude-opus-4-6"]
},
"heartbeat": {
  "every": "30m",
  "model": "anthropic/claude-haiku-4-5",
  "activeHours": { "start": "08:00", "end": "23:00" }
},

This gives you:

CRITICAL: Do NOT use the setup-token auth flow (openclaw models auth setup-token). It uses OAuth bearer tokens which can cause persistent 401 errors. Use a direct API key in the env block instead.

CRITICAL: If the onboarding wizard created an auth.profiles block with "mode": "token", it may override your env API key and try to authenticate with a stale bearer token. If you get 401 errors, remove the auth.profiles block from openclaw.json AND delete the auth profiles file:

rm ~/.openclaw/agents/main/agent/auth-profiles.json

5.4 Restart and test

openclaw gateway restart
openclaw tui

Type “hello” and confirm you get a response. If you see (no output) or a 401 error, revisit steps 5.1-5.3.


Phase 6: Expose Dashboard via Tailscale Serve

tailscale serve --bg http://127.0.0.1:18789

IMPORTANT: Use http:// not https+insecure://. The gateway serves plain HTTP on the loopback port. Using https+insecure:// causes 502 Bad Gateway errors.

Access from any device on your tailnet:

https://[mac-mini-hostname].tail[xxxxx].ts.net

Verify from another device:

curl -k https://[mac-mini-hostname].tail[xxxxx].ts.net

DANGER: Use Tailscale Serve, NOT Funnel. Serve = tailnet only (private). Funnel = public internet.


Phase 7: Security Hardening

7.1 Run the official security audit

openclaw security audit
openclaw security audit --deep
openclaw security audit --fix

7.2 File permissions

chmod 700 ~/.openclaw
chmod 600 ~/.openclaw/openclaw.json
find ~/.openclaw/credentials -type f -exec chmod 600 {} \;
find ~/.openclaw/agents -name "auth-profiles.json" -exec chmod 600 {} \;
find ~/.openclaw/agents -name "sessions.json" -exec chmod 600 {} \;

7.3 Verify gateway binding

grep '"bind"' ~/.openclaw/openclaw.json
# MUST show "loopback"

7.4 Verify token auth

grep -A 3 '"auth"' ~/.openclaw/openclaw.json
# Should show "mode": "token"

7.5 Verify DM pairing

grep '"dmPolicy"' ~/.openclaw/openclaw.json
# Should show "pairing"

7.6 Verify no insecure auth flags

grep "allowInsecureAuth" ~/.openclaw/openclaw.json
grep "dangerouslyDisableDeviceAuth" ~/.openclaw/openclaw.json
# Both should return nothing

7.7 Run doctor

openclaw doctor --fix

NOTE: gateway.discovery.mode is not a valid config key in v2026.2.13. Do not add it — doctor will flag it and remove it.


Phase 8: Shape the Agent Identity

The onboarding creates default workspace files. The agent is useless until you customize them.

ls ~/.openclaw/workspace/

To shape your agent’s identity, give Claude a prompt like this:

“I’m setting up an OpenClaw agent on a Mac Mini. The agent’s name is [NAME] and its role is [ROLE — e.g., financial analyst, growth engine, executive assistant]. My name is [YOUR NAME], timezone is [TIMEZONE], and I prefer [COMMUNICATION STYLE — e.g., brief bullets, detailed reports, no fluff].

Write me the following workspace files:

The agent must NEVER: edit openclaw.json, share credentials, move money, delete data, post publicly, or communicate with other AI agents without my approval.”

Then paste the generated files into ~/.openclaw/workspace/:

nano ~/.openclaw/workspace/IDENTITY.md
nano ~/.openclaw/workspace/SOUL.md
nano ~/.openclaw/workspace/USER.md
nano ~/.openclaw/workspace/AGENTS.md
nano ~/.openclaw/workspace/HEARTBEAT.md

WARNING: Empty HEARTBEAT.md causes heartbeat to silently skip. It must have real content.

Test comprehension

Send on Telegram:

“Read your workspace files. What are your autonomy zones? What can you do without asking me? What must you never do?”

If it gets the zones right, the identity is set.


Phase 9: Cron Jobs (Optional)

Set up scheduled tasks only if your agent needs them. Always use --session isolated (prevents heartbeat prompt hijacking, bug #3589).

openclaw cron add \
  --name "job-name" \
  --cron "0 7 * * 1-5" \
  --tz "Europe/Vienna" \
  --session isolated \
  --message "Clear, specific instruction here." \
  --model "anthropic/claude-sonnet-4-5" \
  --deliver \
  --channel telegram \
  --best-effort

Verify:

openclaw cron list

Phase 10: Final Verification

# macOS
pmset -g | grep sleep            # all 0
pgrep caffeinate                 # returns a PID
tailscale status                 # online

# OpenClaw
openclaw --version               # v2026.2.6+
openclaw health                  # all ok, Telegram: ok
openclaw security audit          # 0 critical
openclaw system heartbeat last   # not null
openclaw cron list               # your jobs listed

# Security
grep '"bind"' ~/.openclaw/openclaw.json          # loopback
grep '"dmPolicy"' ~/.openclaw/openclaw.json      # pairing

# Tailscale
tailscale serve status           # shows proxy to 127.0.0.1:18789

Behavioral test

Send a task on Telegram. The agent should:

  1. Start working without asking permission
  2. Report results on Telegram
  3. Log work to memory/YYYY-MM-DD.md

Troubleshooting Quick Reference

Symptom Cause Fix
(no output) in TUI, tokens show ?/200k API key not configured or invalid Phase 5 — add key to env block
HTTP 401 authentication_error: Invalid bearer token auth.profiles overriding env key with stale OAuth token Remove auth.profiles block and delete auth-profiles.json
Agent runs complete in <500ms with no LLM call No user message reaching agent, or empty prompt Check session, restart gateway
ANTHROPIC_API_KEY in env overriding config Shell profile has stale export ANTHROPIC_API_KEY Find with grep, remove from .zshrc, unset, restart
Telegram shows “not configured” after doctor Doctor rewrote config and stripped channels Re-add Telegram block to config
502 Bad Gateway on Tailscale Serve URL Using https+insecure:// instead of http:// tailscale serve reset then tailscale serve --bg http://127.0.0.1:18789
Heartbeat prompt hijacks cron jobs Bug #3589 Always use --session isolated on cron jobs
Context exhaustion / heartbeat dies Bug #2935, context compression kills heartbeat Configure daily session reset at 4 AM
gateway.discovery config error Not a valid key in v2026.2.13 Remove it, run openclaw doctor --fix
Tailscale SSH: “sandboxed GUI builds” Mac App Store Tailscale doesn’t support SSH server Use regular macOS SSH instead, or switch to standalone Tailscale

Key Commands

# Gateway
openclaw gateway restart
openclaw gateway status
openclaw dashboard

# Status
openclaw health
openclaw doctor --fix
openclaw system heartbeat last

# Security
openclaw security audit --deep --fix

# Cron
openclaw cron list
openclaw cron add --name "..." --cron "..." --tz "..." --session isolated --message "..."

# Telegram pairing
openclaw pairing list --channel Telegram
openclaw pairing approve Telegram <CODE>

# Models
openclaw models status
openclaw models list

# Config
cat ~/.openclaw/openclaw.json

# Tailscale
tailscale status
tailscale serve status
tailscale serve --bg http://127.0.0.1:18789

Official Documentation


Total cost: a Mac Mini you already have + Anthropic API credits. Setup time: about 2 hours if nothing breaks, 4 if the onboarding wizard decides to skip steps.

Until next time.


squiggly horizontal divider

Connect

Let’s meet on whatever platform serves your desired outcome best. My digital identity holds all platform intentions. Prefer email? Try contact@julianpaul.me.

Want to stay up to date? RSS ↗ and/or subscribe for email updates. ↓

Socialise with me: LinkedIn | Instagram | GitHub | 𝕏 | CV

Julian Paul Logo