How to Set Up OpenClaw on a Mac Mini

A no-BS guide from someone who actually did it.

Beginner
2-3 hours

I bought a Mac mini M4 specifically to run OpenClaw as a dedicated, always-on AI assistant. Not as a side project on my daily driver — a single-purpose machine that sits on a shelf and works while I sleep.

This is the guide I wish existed when I started. Every step tested on real hardware, with the gotchas I hit along the way.

What you'll end up with: A personal AI assistant running 24/7 on your Mac mini, accessible via Telegram, WhatsApp, or both. It can browse the web, run shell commands, manage files, and extend itself with skills. You message it from your phone while you're out getting coffee and it handles things on the computer in the background.

Time estimate: 2-3 hours, maybe less if you're fast with terminal stuff.

Hardware: Mac mini M4 with at least 24GB unified memory. The base config works fine — OpenClaw itself isn't resource-heavy. The M4 idles at like 3-4 watts, which is comparable to a Raspberry Pi. You can leave this thing running 24/7 and barely notice it on your power bill.


Phase 0: Get Your Stuff Together First

Do all of this from your phone or main computer before you touch the mini. You don't want to be scrambling for API keys mid-install — that's how you end up with credentials in Apple Notes and regret.

Accounts and Keys You Need

A dedicated Apple ID. This is important. OpenClaw has shell access to this machine. You don't want it anywhere near your real Apple account, your iCloud photos, or Apple Pay. Create a fresh Gmail (something like yourname-openclaw@gmail.com) and use that as the Apple ID email.

That same Gmail doubles as your infrastructure account. It handles Google OAuth for LLM authentication, Apple ID recovery, and system-level stuff. Nobody will ever see this email address. It's plumbing.

An Anthropic API key. Go to console.anthropic.com and generate one. While you're in there, set a spending limit. A runaway agent can burn through credits fast and you don't want to find out the hard way. Pick a monthly cap you're comfortable with — you can always raise it later.

A Brave Search API key. Get one at brave.com/search/api. This gives OpenClaw the ability to search the web. It's free for a reasonable number of queries.

A Telegram bot token. Open Telegram on your phone, search for @BotFather (look for the blue checkmark), and type /newbot. Name it whatever you want — this is your assistant's identity. BotFather gives you a token that looks like 7123456789:AAF1x2y3z4ABCDefghIJKlmnOPQrst-uvw. Copy it immediately and put it in a password manager. You only see it once.

Optional but worth doing: type /setdescription and /setuserpic in BotFather to give your bot a description and avatar. Makes it feel like a real thing.

A password manager. Bitwarden is free and works on everything. You're about to generate a lot of credentials and "I'll remember it" is not a strategy that works here.

Pre-Flight Checklist

Before touching the Mac mini, confirm you have all of these saved somewhere that isn't a sticky note:

  • Password manager set up
  • Dedicated Apple ID details ready (email, password, phone number for 2FA)
  • Infrastructure Gmail accessible with 2FA enabled
  • Anthropic API key (with spending limit set)
  • Brave Search API key
  • Telegram bot token from @BotFather
  • Discord bot token (optional — from discord.com/developers/applications)

If you have all of these, you're ready.


Phase 1: Set Up macOS from Scratch

Wipe the Machine

If there's anything on the mini already, wipe it. System Settings > General > Transfer or Reset > Erase All Content and Settings. Start clean. This machine has one job.

Walk Through the Setup Assistant

When the mini restarts into the Setup Assistant:

  • Connect to Wi-Fi
  • Create your dedicated Apple ID when prompted (use the infrastructure Gmail you set up)
  • Create a local admin account (this is your macOS login, separate from the Apple ID)
  • Enable FileVault disk encryption — this is non-negotiable

Decline everything else. Location Services? No. Siri? No. Apple Intelligence? No. Apple Pay? Definitely no — you don't want a payment method on a machine an AI agent has shell access to. Analytics? No. Screen Time? No.

The less this machine phones home or runs background services, the better.

Run System Updates

System Settings > General > Software Update. Install everything. Restart if it asks.

Configure for Always-On Operation

This is a server now, not a desktop. Open System Settings > Energy and enable:

  • "Prevent automatic sleeping when the display is off"
  • "Wake for network access"
  • "Start up automatically after a power failure"

Then install Amphetamine from the Mac App Store (it's free). Launch it, go to Preferences, and enable:

  • "Launch Amphetamine at login"
  • "Start session when Amphetamine launches" → set to Indefinitely
  • "Start session after waking from sleep"

Start a new session set to Indefinitely. The pill icon in the menu bar shows filled when active.

Between the Energy settings and Amphetamine, this machine stays awake through anything short of someone unplugging it. And the "start up automatically after power failure" setting handles that too.


Phase 2: Install Developer Prerequisites

Open Terminal (Applications > Utilities > Terminal). Everything from here is command line.

Xcode Command Line Tools

xcode-select --install

Click "Install" on the dialog. This gets you Git, compilers, and other tools OpenClaw needs under the hood.

Homebrew

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

After it installs, it'll tell you to run a couple of commands to add it to your PATH. On Apple Silicon it's usually:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Verify: brew --version

Node.js 22+

OpenClaw requires Node 22 or later.

brew install node@22

Homebrew installs it as "keg-only" so you need to add it to your PATH:

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

Verify: node --version (should show 22.x or higher)


Phase 3: Install OpenClaw

Go to openclaw.ai and copy the terminal install command. Or just run it directly — the site has it front and center.

The installer walks you through everything interactively. A few things to know going in:

Accept the risk acknowledgment. Yes, it's powerful. Yes, it's inherently risky. That's the deal with giving an AI agent shell access to a computer.

Choose QuickStart for the installation type.

Pick the right model. When the wizard asks, scroll through the list and select Opus 4.5 (the model string is anthropic/claude-opus-4-6). Don't pick an older Opus version — it may not be available on your API tier and it fails silently. You'll just get "(no output)" back and wonder what went wrong.

Use the --install-daemon flag. This sets up a launchd service that keeps OpenClaw running 24/7, even after restarts. That's the whole point of a dedicated machine.

Runtime: Choose Node (not Bun). Some users have reported compatibility issues with Bun when installing skills.

Hooks to Enable

The wizard asks about hooks — automated actions triggered by specific events. Enable these three:

  • Boot hook — runs a startup routine when the gateway starts so the agent can orient itself
  • Session memory — this is the most important one. Without it, long conversations just get truncated and context is lost. With it, the agent writes a summary to its memory files before the context window fills up, so it picks up where it left off in a new session.
  • Command logger — logs all slash commands for debugging and audit trails

Skip individual skill selection for now. Add skills later once the base is stable.

Want this done for you? We deploy production agents starting at $1,500.

Learn About Agent Deployment

Phase 4: Connect Telegram

During onboarding, paste your bot token from @BotFather when prompted.

The username gotcha: When the wizard asks who can DM the bot, it wants to set up an allowlist so random people can't message your AI. Entering your Telegram username might not resolve. If it doesn't work, message @userinfobot on Telegram — it'll reply with your numeric user ID. Enter that number instead.

Send a test message to your bot. If you get a response, you're live.

If you get "(no output)" back, the model selection is probably wrong. Go back and verify you're on Opus 4.6.


Phase 5: Connect WhatsApp (Optional)

The wizard shows you a QR code. Scan it from WhatsApp on your phone the same way you'd set up WhatsApp Web.

One thing to watch out for: if you're doing this headless (no monitor connected to the mini), the QR code rendering in a Terminal over SSH can look garbled. An SSH tunnel or VNC session to see it clearly helps. Or just plug in a monitor for this one step and unplug it after.

Same AI, same memory, regardless of which app you message from. Telegram and WhatsApp are just interfaces.


Phase 6: Security Hardening

This is the part most guides skip. Don't skip it.

Separate User Account

Create a standard (non-admin) macOS user for OpenClaw to run under. Your admin account is for maintenance only — updates, troubleshooting, that kind of thing. OpenClaw shouldn't run with admin privileges it doesn't need.

Credential Isolation

Give OpenClaw its own credentials for everything. Its own Gmail, its own Google Drive access. Share specific docs and sheets with it rather than giving it access to your main accounts.

One approach that works well: store all API keys and secrets in Bitwarden and have OpenClaw pull them via the Bitwarden CLI (bw get). No scattered .env files, no credentials in shell history, no secrets committed to repos. If you need to rotate a key, update it in Bitwarden once and OpenClaw picks it up on the next access.

Firewall

Enable the macOS firewall: System Settings > Network > Firewall. Block incoming connections except what you explicitly need.

Verify Sandbox

After setup, check that isolation is actually working:

openclaw sandbox explain

The "Oh Crap" Buttons

If something weird happens:

# Kill all sandbox containers
openclaw sandbox recreate --all

# Full reset (keeps config, nukes sessions)
openclaw reset --sessions

# Nuclear option (fresh start)
openclaw uninstall
rm -rf ~/.openclaw

Not sure what to deploy? Start with an AI Roadmap Sprint.

Explore the AI Roadmap Sprint

Phase 7: Make It Yours

Set Up a Workspace Directory

Create a dedicated workspace at ~/clawd (or whatever you want to call it). This gives OpenClaw a consistent place to work and keeps things organized.

mkdir -p ~/clawd

Daily Updates

OpenClaw can send you a morning briefing with what happened overnight. If you set it up to handle tasks while you're asleep — checking email, running automations, posting content — the daily update tells you what shipped and what hit a blocker.

If it hits a blocker (missing permissions, failed tests, access issues), it pings you on Telegram and waits instead of spinning its wheels.

API Budget Awareness

OpenClaw can monitor its own API usage and schedule heavy work during off-hours so it doesn't burn through your limits during the day when you're actively using it. Worth configuring if you're on a capped plan.


What NOT to Do

Don't bolt on 15 skills on day one. Start with the basics — message it, have it search the web, check your calendar. Get comfortable with how it thinks. Add complexity when you actually need it.

Don't run it on your daily driver. This is the whole reason you bought a dedicated machine. OpenClaw has shell access, browser control, file system access. You want that on a machine where the blast radius is limited.

Don't skip the spending limit on your API provider. Seriously. Set it before you install. You can always raise it. You can't un-spend money.

Don't store credentials in plaintext. Not in .env files, not in config files, not in Apple Notes. Use a password manager or a secrets manager.


Troubleshooting

"(no output)" responses: Almost always a model selection issue. Verify you selected Opus 4.6 (model string anthropic/claude-opus-4-6). Older Opus versions may not be available on your API tier.

Telegram bot not responding: Check your allowlist configuration. If you entered a username that didn't resolve, get your numeric user ID from @userinfobot and use that instead.

Machine goes to sleep: Check Amphetamine is running (pill icon should be filled). Check Energy settings haven't been reset by a system update.

QR code looks garbled over SSH: The terminal rendering of QR codes doesn't always work cleanly in remote sessions. Plug in a monitor temporarily or use VNC.

Gateway won't start after reboot: Verify the daemon is installed: launchctl list | grep openclaw. If it's not there, reinstall with the --install-daemon flag.

Need a full AI strategy? The AI Audit maps your entire operation.

Learn About the AI Audit

The Bigger Picture

What you've built here is the non-scammy version of what every AI hype project promises. An always-on agent that handles tasks autonomously, learns your preferences, connects to your tools. Except instead of a broken website and a dead crypto token, you've got a real machine on your desk doing real work.

The M4 Mac mini draws less power than a light bulb. It's silent. It's always on. And every morning you wake up to a briefing of what your AI assistant handled overnight.

That's not science fiction. That's a Tuesday.


David Flynn runs Automatic, an AI product studio in Nashville. He builds AI automations and products for businesses that want to stop talking about AI and start using it. DMs open on X if you want to talk through your own setup.