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

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.
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.
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
System Settings -> Users & Groups -> Login Options -> Automatic login: [agent user]
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on
sudo mdutil -a -i off
defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES
chmod 700 ~/
System Settings -> Privacy & Security -> FileVault -> Turn On
System Settings -> General -> Sharing -> Remote Login -> ON
Restrict to the agent user only.
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 serveonly.
# 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+
/newbot -> give it a name and usernamenpm install -g openclaw@latest
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.
openclaw --version
openclaw health
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)
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
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.
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-tokenauth flow (openclaw models auth setup-token). It uses OAuth bearer tokens which can cause persistent 401 errors. Use a direct API key in theenvblock instead.
CRITICAL: If the onboarding wizard created an
auth.profilesblock with"mode": "token", it may override yourenvAPI key and try to authenticate with a stale bearer token. If you get 401 errors, remove theauth.profilesblock from openclaw.json AND delete the auth profiles file:
rm ~/.openclaw/agents/main/agent/auth-profiles.json
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.
tailscale serve --bg http://127.0.0.1:18789
IMPORTANT: Use
http://nothttps+insecure://. The gateway serves plain HTTP on the loopback port. Usinghttps+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.
openclaw security audit
openclaw security audit --deep
openclaw security audit --fix
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 {} \;
grep '"bind"' ~/.openclaw/openclaw.json
# MUST show "loopback"
grep -A 3 '"auth"' ~/.openclaw/openclaw.json
# Should show "mode": "token"
grep '"dmPolicy"' ~/.openclaw/openclaw.json
# Should show "pairing"
grep "allowInsecureAuth" ~/.openclaw/openclaw.json
grep "dangerouslyDisableDeviceAuth" ~/.openclaw/openclaw.json
# Both should return nothing
openclaw doctor --fix
NOTE:
gateway.discovery.modeis not a valid config key in v2026.2.13. Do not add it — doctor will flag it and remove it.
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:
- IDENTITY.md — who the agent is
- SOUL.md — behavioral principles (no performative helpfulness, have opinions, write everything down, etc.)
- USER.md — who I am and how I work
- AGENTS.md — operating rules with DO / DRAFT / NEVER autonomy zones, boot sequence, principal authority, task completion checklist, untrusted content rules
- HEARTBEAT.md — what to check each heartbeat cycle
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.
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.
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
# 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
Send a task on Telegram. The agent should:
memory/YYYY-MM-DD.md| 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 |
# 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
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.
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
