I run 13 AI agents on a single Mac Mini M4. They post to X, write newsletters, research sponsors, monitor analytics, and reply in my community. All from a $500 box that draws less power than a lightbulb. Here is exactly how to set yours up from scratch.
- Why Mac Mini Is Perfect for OpenClaw
- Which Mac Mini Should You Buy for OpenClaw?
- macOS Setup and Security Hardening
- Installing Node.js on Mac Mini
- Installing OpenClaw Step by Step
- How Do You Configure API Keys for OpenClaw?
- Setting Up Mac Mini as a 24/7 Server
- Connecting Telegram to Your AI Agent
- How Do You Access Your Mac Mini Remotely?
- Configuring Your Agent's Personality
- Can You Run Multiple Agents on One Mac Mini?
- Performance Tips and Real Benchmarks
- Mac Mini AI Server: Monthly Costs Breakdown
- Troubleshooting Common Mac Mini Issues
If you haven't decided between Mac Mini and VPS yet, read our complete installation guide first. Already decided? Let's build.
Why Mac Mini Is Perfect for OpenClaw
Most founders try running OpenClaw on a VPS first. It works. But the Mac Mini is better for long-term use, and here is why.
15W idle power draw. The Mac Mini M4 sips electricity. At typical US rates, that is $1 to $3 per month. A VPS costs $5 to $50 per month forever. The Mac Mini pays for itself within a year.
Apple Silicon performance. The M4 chip handles browser automation, file operations, web scraping, and sub-agent coordination without breaking a sweat. OpenClaw does not run LLMs locally (it calls cloud APIs like Claude), so the heavy compute happens elsewhere. Your Mac Mini just needs to be fast at local tasks. And Apple Silicon is very fast at local tasks.
Zero fan noise. The Mac Mini M4 is fanless under normal OpenClaw loads. Stick it on a shelf, in a closet, or under your desk. You will forget it is there.
macOS ecosystem. This is the real advantage. On a Mac Mini, your agent can access Apple Reminders, Apple Notes, iMessage, Calendar, and the full macOS automation stack (AppleScript, Shortcuts). Try that on a Linux VPS. You can't.
No monthly fees. After the one-time hardware purchase ($499 to $699), your only recurring cost is the LLM API credits. Compare that to renting a VPS indefinitely.
Always-on reliability. macOS is rock solid for server-style workloads. With the right settings (covered below), a Mac Mini will run for months without a reboot. Mine has been up for 47 days straight as I write this.
For a deeper comparison of hosting options, check out our VPS installation guide.
Which Mac Mini Should You Buy for OpenClaw?
The Mac Mini M4 with 16GB RAM is the sweet spot. It handles a main agent plus several sub-agents without slowing down. Here is how the tiers break down:
| Tier | Specs | Price | Best For |
|---|---|---|---|
| Minimum | Mac Mini M4, 16GB RAM, 256GB SSD | ~$499 | Single agent, light workloads |
| Recommended | Mac Mini M4, 16GB RAM, 512GB SSD | ~$699 | Multiple agents, transcripts, media files |
| Power User | Mac Mini M4 Pro, 24GB RAM, 512GB SSD | ~$1,399 | 13+ agents, local LLMs via Ollama, heavy browser automation |
Why 16GB RAM matters
OpenClaw itself uses about 200-400MB of RAM. But when your agent spawns sub-agents, runs browser automation, and handles multiple concurrent conversations, memory usage climbs. 8GB works for a single agent doing light tasks. 16GB gives you headroom for real production workloads.
Storage: 256GB vs 512GB
macOS takes about 30GB. OpenClaw and its dependencies take another 2-3GB. The rest is for your agent's workspace: memory files, downloaded transcripts, research documents, screenshots, and logs. If your agent handles podcast transcripts or downloads media files, 256GB fills up faster than you think. The $200 upgrade to 512GB is worth it.
What about the Mac Mini M2?
Still a solid choice if you find one refurbished. The M2 with 16GB RAM handles OpenClaw perfectly well. You lose some single-core speed compared to the M4, but for an always-on agent server, the difference is minimal. Refurbished M2 Mac Minis go for $350 to $450. Great budget option.
You do not need a monitor, keyboard, or mouse after initial setup. The Mac Mini runs headless, managed entirely through Telegram and SSH.
macOS Setup and Security Hardening
Plug in a monitor and keyboard for the first 15 minutes. You will not need them again after this section.
Create a dedicated user account
Never run OpenClaw on your personal account. Your agent will store API keys, access your tools, and manage files. Keep it isolated.
- Open System Settings, then Users & Groups, then click Add User
- Name it something like
clawagentormarc - Make it an Administrator (needed for Homebrew and npm global installs)
- Set a strong password and store it somewhere safe
- Log into this new account for all remaining steps
Enable FileVault disk encryption
Go to System Settings, then Privacy & Security, then FileVault, then Turn On. This encrypts your entire disk. If someone physically takes your Mac Mini, they cannot read your agent's data, API keys, or memory files. Non-negotiable for any machine storing credentials.
Enable the macOS firewall
System Settings, then Network, then Firewall, then Turn On. Block all incoming connections except the ones you explicitly allow. OpenClaw does not need any incoming ports open. It makes outgoing connections to LLM APIs and messaging services.
Enable automatic software updates
System Settings, then General, then Software Update. Turn on automatic updates for macOS and App Store apps. Security patches should install automatically on a server you rarely touch physically.
Installing Node.js on Mac Mini
OpenClaw requires Node.js v18 or later. The cleanest way to install it is through Homebrew.
# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Follow the post-install instructions to add brew to your PATH
# Then install Node.js
brew install node
# Verify the installation
node --version # Should show v18+ (v22+ recommended)
npm --version
Why Homebrew? It handles dependencies cleanly and makes updates simple. One brew upgrade node command and you are on the latest version. No manual downloads, no version conflicts.
If you prefer a version manager (useful if you run other Node.js projects), use nvm or fnm instead:
# Using fnm (fast node manager)
brew install fnm
fnm install --lts
fnm use lts-latest
Installing OpenClaw Step by Step
The fastest path is the interactive installer at installopenclawnow.com. It detects your OS and walks you through everything.
Or install manually in three commands:
# Install OpenClaw globally
npm install -g openclaw
# Run the onboarding wizard with daemon mode
openclaw onboard --install-daemon
The --install-daemon flag is critical. It creates a launchd service that starts OpenClaw automatically on boot. Without this flag, OpenClaw only runs while your terminal is open. With it, OpenClaw survives reboots and runs in the background 24/7.
The onboarding wizard will walk you through:
- Choosing your LLM provider (Anthropic recommended for Claude Opus)
- Entering your API key
- Setting up a messaging channel (Telegram, Discord, or WhatsApp)
- Naming your agent
- Creating the workspace directory at
~/.openclaw/workspace/
For the full walkthrough with screenshots, see our complete OpenClaw installation guide.
How Do You Configure API Keys for OpenClaw?
OpenClaw needs at least one LLM API key to function. The recommended setup is Anthropic's Claude API for the main model.
Getting your Anthropic API key
- Go to console.anthropic.com
- Create an account or sign in
- Navigate to API Keys and create a new key
- Add billing info and load credits ($20 is a good starting amount)
- Copy the key (starts with
sk-ant-)
We have a detailed Anthropic API key setup guide if you need help with billing tiers or usage limits.
Adding the key to OpenClaw
If you used the onboarding wizard, it already prompted you for the key. To add or update keys later:
# Open the OpenClaw config
openclaw config edit
# Or set the key directly
openclaw config set anthropic.apiKey sk-ant-your-key-here
Optional: Add keys for other services
Depending on what your agent does, you might want additional API keys:
| Service | What It Enables | Required? |
|---|---|---|
| Anthropic (Claude) | Main LLM for agent reasoning | Yes |
| OpenAI | Whisper transcription, DALL-E images, GPT fallback | Optional |
| Brave Search | Web search from your agent | Optional (free tier available) |
| ElevenLabs | Text-to-speech voice responses | Optional |
Store these in your TOOLS.md file or in the OpenClaw config. Your agent can reference them when needed.
Setting Up Mac Mini as a 24/7 Server
By default, macOS aggressively sleeps inactive machines. Your agent needs to run around the clock. Here is how to prevent that.
Disable all sleep modes
# Prevent system sleep, display sleep, and disk sleep
sudo pmset -a sleep 0 displaysleep 0 disksleep 0
# Enable auto-restart after power failure
sudo pmset -a autorestart 1
# Disable hibernation (not needed for a desktop)
sudo pmset -a hibernatemode 0
Why autorestart matters: If your home or office loses power for even a second, the Mac Mini boots back up automatically once power returns. OpenClaw's launchd daemon starts with it. Without this flag, you would need to physically press the power button.
Verify your settings:
pmset -g
You should see sleep 0, displaysleep 0, disksleep 0, and autorestart 1.
Enable auto-login
For the Mac Mini to fully boot into your agent's user account without manual input:
- Open System Settings, then Users & Groups
- Click the "i" icon next to your agent user
- Enable "Automatically log in as" and select the agent account
Note: Auto-login requires FileVault to be configured with a recovery key, not an iCloud unlock. The Mac Mini needs to decrypt the disk and log in without human intervention after a power cycle.
Disable screen lock
System Settings, then Lock Screen. Set "Require password after screen saver begins or display is turned off" to Never. On a headless server with no monitor, screen lock just creates problems.
Schedule weekly restarts (optional but recommended)
A fresh reboot once a week clears memory leaks and keeps things snappy:
# Restart every Sunday at 4:00 AM
sudo pmset repeat restart MTWRFSU 04:00:00
OpenClaw's daemon restarts automatically after reboot, so there is zero downtime impact.
Connecting Telegram to Your AI Agent
During onboarding, you will set up a messaging channel. Telegram is the most popular choice, and for good reason. It works on every device, supports rich formatting, and the bot API is free.
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts - Choose a name and username for your bot
- Copy the bot token (looks like
123456:ABC-DEF...) - Paste it into the OpenClaw onboarding wizard when prompted
- Open a chat with your new bot and send "Hello"
Your agent is now live. Message it from your phone while sitting on a beach in Bali and it responds from your Mac Mini at home. That is the setup I run every day.
Want to use Discord instead? Check our OpenClaw Discord bot guide.
How Do You Access Your Mac Mini Remotely?
Once the Mac Mini is headless (no monitor), you need reliable ways to access it from anywhere. There are three methods, and I recommend using all of them.
Method 1: SSH (command line access)
Enable Remote Login in System Settings, then General, then Sharing, then Remote Login. This lets you SSH into the Mac Mini from any other machine on the same network:
# From another Mac on the same network
ssh clawagent@mac-mini.local
# Check OpenClaw status
openclaw gateway status
# View agent logs
openclaw logs
Method 2: Screen Sharing (full desktop access)
Enable Screen Sharing in System Settings, then General, then Sharing. This gives you full graphical access to the Mac Mini desktop. Useful when you need to interact with browser windows or debug visual issues.
From another Mac, open Finder, then Go, then Connect to Server, then enter vnc://mac-mini.local.
Method 3: Tailscale (access from anywhere)
SSH and Screen Sharing work on your local network. But what if you are traveling? Tailscale creates a secure, private network between all your devices. No port forwarding. No exposing anything to the public internet.
# Install Tailscale on the Mac Mini
brew install tailscale
# Authenticate
tailscale up
Install Tailscale on your laptop and phone too. Then you can SSH from anywhere:
# SSH from a coffee shop in Tokyo
ssh clawagent@mac-mini.tail1234.ts.net
# Or use Screen Sharing from anywhere
# Connect to vnc://mac-mini.tail1234.ts.net
Tailscale is free for personal use with up to 100 devices. No credit card required. It is the single best tool for remote Mac Mini management. I have used it daily for over a year.
Configuring Your Agent's Personality
Your agent's workspace lives in ~/.openclaw/workspace/. These markdown files define everything about how your agent thinks, speaks, and operates:
| File | Purpose |
|---|---|
SOUL.md | Your agent's personality, tone, and communication style |
AGENTS.md | Operating rules, boot sequence, safety constraints, workflow SOPs |
USER.md | Everything about you: timezone, goals, preferences, business context |
TOOLS.md | API keys, account details, tool configurations, service notes |
HEARTBEAT.md | Periodic task checklist your agent runs every 30 minutes |
IDENTITY.md | Your agent's name, role, and emoji |
Start with a simple SOUL.md ("Be concise. No corporate speak. Help me ship.") and a USER.md with your timezone and main project. Your agent will help you iterate and expand from there.
Want production-ready templates? Read our guide to running 13 agents on a single Mac Mini. It includes the exact SOUL.md, AGENTS.md, and SOP files I use.
Can You Run Multiple Agents on One Mac Mini?
Yes. And this is where the Mac Mini setup really shines.
A single Mac Mini M4 with 16GB RAM comfortably runs a main agent plus 10 to 15 sub-agents. Each sub-agent is a specialized worker: one for X/Twitter, one for newsletter drafts, one for YouTube research, one for podcast automation, one for community management.
How multi-agent works on one machine
Your main agent is the coordinator. It spawns sub-agents as background processes when tasks come in. Sub-agents do their work, report back, and shut down. The main agent stays running 24/7.
Resource usage for a typical 13-agent setup:
| Resource | Usage | M4 16GB Capacity |
|---|---|---|
| RAM | 2-4GB active | 16GB (plenty of headroom) |
| CPU | 5-15% average | 10-core M4 (barely working) |
| Disk | 10-20GB workspace | 256-512GB SSD |
| Network | Minimal (API calls) | Gigabit Ethernet or WiFi 6E |
Structuring your agent team
Each sub-agent gets its own SOP file in the sops/ directory. The SOP defines exactly what it does, which tools it can use, what cron jobs it runs, and how it reports back to the main agent.
Example structure from my setup:
~/.openclaw/workspace/
├── SOUL.md # Main agent personality
├── AGENTS.md # Coordination rules
├── USER.md # About me (Florian)
├── sops/
│ ├── dan-x-growth.md # X/Twitter posting
│ ├── tyler-newsletter.md # Newsletter drafts
│ ├── jimmy-youtube.md # YouTube optimization
│ ├── bob-ops.md # Operations & dispatch
│ ├── loop-analytics.md # Analytics monitoring
│ └── ... (8 more agents)
Inside OpenClaw Lab, we share the complete multi-agent architecture. SOPs, cron schedules, coordination playbooks, and the exact prompts that make each agent effective. Copy-paste and adapt to your business.
Performance Tips and Real Benchmarks
After running OpenClaw on a Mac Mini M4 for months, here is what I have learned about squeezing out the best performance.
Real-world benchmarks
| Task | Time on Mac Mini M4 | Notes |
|---|---|---|
| Agent cold start | 2-3 seconds | launchd to first response |
| Telegram message response | 3-8 seconds | Depends on Claude API latency |
| Browser automation (full page) | 4-6 seconds | Load + screenshot + parse |
| Sub-agent spawn | 1-2 seconds | Background process creation |
| File search (10K files) | Under 1 second | SSD speed matters here |
The bottleneck is never the Mac Mini. It is always the LLM API response time. Your local machine just needs to be fast enough to run tools, manage files, and handle browser automation. The M4 is more than enough.
Tips for better performance
Use Ethernet instead of WiFi. The Mac Mini M4 has Gigabit Ethernet built in. Plug it in. WiFi adds latency and occasional drops that interrupt agent workflows.
Close unused apps. On a dedicated agent server, nothing else should be running. No Chrome, no Spotify, no Slack. Just OpenClaw and the system processes it needs.
Monitor disk space. When the SSD gets above 80% full, macOS slows down. Set up a cron job in your agent to alert you when disk usage crosses 75%.
Use efficient models for simple tasks. Not every sub-agent needs Claude Opus. For simple formatting, file operations, or template-based work, smaller models reduce API costs and respond faster.
Keep OpenClaw updated. New versions regularly include performance improvements:
# Update OpenClaw to latest
npm update -g openclaw
# Restart the daemon
openclaw gateway restart
Mac Mini AI Server: Monthly Costs Breakdown
| Item | Cost | Notes |
|---|---|---|
| Mac Mini M4 16GB | $499-699 (one-time) | Pays for itself vs VPS in 10-14 months |
| Claude Opus API credits | $20-150/month | Depends on usage volume |
| Electricity (~15W idle) | $1-3/month | Less than charging your phone |
| Tailscale | Free | Personal plan, up to 100 devices |
| Telegram bot | Free | No limits on bot API |
| Total monthly | $21-153/month | After initial hardware purchase |
Compare that to hiring a virtual assistant ($500 to $2,000/month), any SaaS automation platform ($50 to $500/month), or a comparable cloud server ($20 to $100/month with no macOS features).
The Mac Mini is the cheapest way to run a 24/7 AI agent that actually does useful work.
Troubleshooting Common Mac Mini Issues
After helping hundreds of founders set up their Mac Mini servers inside OpenClaw Lab, these are the most common problems and fixes.
Mac Mini goes to sleep despite pmset settings
This usually means Power Nap is still enabled. Disable it:
sudo pmset -a powernap 0
sudo pmset -a proximitywake 0
sudo pmset -a tcpkeepalive 1
Also check that no energy-saving app (like Amphetamine) is overriding your pmset settings with its own schedule.
OpenClaw does not start after reboot
Check that the launchd daemon is loaded:
# Check daemon status
launchctl list | grep openclaw
# If not listed, reload it
openclaw onboard --install-daemon
Make sure auto-login is enabled for the correct user account. The daemon runs in the user context, so the user must be logged in.
SSH connection refused
Verify Remote Login is enabled: System Settings, then General, then Sharing, then Remote Login. Make sure "Allow access for" includes your agent user account or is set to All Users.
High memory usage over time
Long-running browser automation sessions can accumulate memory. The weekly restart schedule mentioned earlier handles this. If you see issues between restarts:
# Check what is using memory
top -l 1 -o mem | head -20
# Restart just the OpenClaw gateway
openclaw gateway restart
Agent stops responding but Mac Mini is online
Usually an API key issue (expired credits) or a network blip. SSH in and check:
# Check gateway status
openclaw gateway status
# Check recent logs for errors
openclaw logs --tail 50
Nine times out of ten, the fix is topping up your Anthropic API credits.
Unplug the Monitor and Ship
You are done with physical access. Disconnect the monitor, keyboard, and mouse. Tuck the Mac Mini on a shelf or behind your router. It draws about 15W idle. Less than a lightbulb. Quieter than a sleeping cat.
From here, everything happens through Telegram. Tell your agent what to do. It does it. 24 hours a day, 7 days a week, from a box that costs less per month than your coffee habit.
That is the setup. Now go build something with it.
Frequently Asked Questions
How do I set up OpenClaw on a Mac Mini?
Install Node.js v18+ via Homebrew, run 'npm install -g openclaw@latest', then run 'openclaw onboard --install-daemon'. Disable sleep in System Settings and enable auto-restart after power failure. Your Mac Mini will run OpenClaw 24/7.
What Mac Mini specs do I need for OpenClaw?
The base Mac Mini M2 or M4 with 8GB RAM is sufficient for OpenClaw. AI processing happens on cloud LLM servers, so you do not need a high-end configuration. The Mac Mini just runs the gateway, tools, and browser automation locally.
Can I run OpenClaw headless on a Mac Mini?
Yes, OpenClaw runs headless on a Mac Mini without a monitor. Access it remotely via SSH or screen sharing. The OpenClaw daemon runs in the background and your agents communicate through messaging channels like Telegram.
How do I keep OpenClaw running after Mac Mini restarts?
Install OpenClaw as a daemon using the onboarding wizard. This creates a launchd service that starts automatically on boot. Enable 'Restart automatically after power failure' in System Settings for maximum uptime.
Is a Mac Mini better than a VPS for OpenClaw?
A Mac Mini is better for long-term use because there are no monthly hosting fees after the initial $300 to $600 purchase. It also supports macOS-specific features like iMessage integration and Apple Reminders. A VPS is better if you want zero hardware maintenance.
I share the exact playbooks, skill files, and workflows behind this system inside OpenClaw Lab. Weekly lives and AMAs with experts.
Join OpenClaw Lab →