A Mac Mini sitting quietly on a shelf, always on, always connected — that's the ideal OpenClaw setup. Low power draw (~5-15 watts idle), silent, reliable, and powerful enough to run everything from AI agents to local models. This guide walks you through the entire process, from a fresh Mac Mini to a fully operational OpenClaw instance with security hardened and channels connected.

Why a Mac Mini?

You could run OpenClaw on anything — a laptop, a VPS, a Raspberry Pi, an old desktop. But the Mac Mini hits a sweet spot that's hard to beat:

  • Always on: Designed to run 24/7, unlike a laptop you close and carry around
  • Silent: No fans at idle, whisper-quiet under load
  • Low power: 5-15W idle, maybe $10-15/year in electricity
  • Apple Silicon is fast: Even the base M4 Mini handles OpenClaw and local models comfortably
  • macOS just works: Homebrew, Node.js, shell tools — everything installs cleanly
  • Compact: Fits literally anywhere — behind a monitor, on a bookshelf, velcroed under a desk

Which Mac Mini to get?

| Budget | Model | RAM | Good For | |--------|-------|-----|----------| | $599 | M4 Mini (base) | 16GB | OpenClaw + API models (Claude, GPT, Gemini) | | $799 | M4 Mini | 24GB | Above + small local models (8B-14B via Ollama) | | $1,399+ | M4 Pro Mini | 24-48GB | Above + serious local models (32B-70B) |

The $599 base model is honestly enough if you're using API models (Claude, OpenRouter, etc.) and not running local LLMs. If you want to experiment with Ollama and local models, spring for the 24GB version.

The One-Prompt Setup (Let Claude Do the Work)

Here's the fun part. Once you have your Mac Mini powered on and connected to your network, you can paste a single prompt into Claude (at claude.ai, or Claude Code, or any Claude interface) and let it handle almost everything.

Open Terminal on your Mac Mini and paste this prompt into a Claude conversation:

I just got a fresh Mac Mini and I want to set up OpenClaw as a 24/7 AI agent.
Please walk me through the complete setup step by step:

1. Install Homebrew if not installed
2. Install Node.js 22+ via Homebrew
3. Install OpenClaw via the official installer script
4. Run the onboarding wizard
5. Set up the gateway as a background service
6. Configure security:
   - Enable the macOS firewall
   - Set up automatic macOS updates
   - Configure SSH key-only auth (disable password SSH)
   - Set spending limits on API providers
7. Set up at least one chat channel (Discord, Telegram, or Signal)
8. Test that everything works
9. Configure Energy Saver so the Mac never sleeps
10. Set up remote access so I can manage it from another machine

I want to use Claude Sonnet as my primary model.
My Anthropic API key is: [PASTE YOUR KEY HERE]

Give me the exact terminal commands for each step.
Explain what each command does before I run it.
Don't skip security — I want this locked down.

Claude will walk you through every step interactively. But if you want to understand what's happening (and you should), keep reading.

Step-by-Step Manual Setup

1. Install the Basics

Open Terminal (Cmd+Space, type "Terminal") and run:

bash
# Install Homebrew (Mac's package manager)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Follow the "Next steps" Homebrew prints to add it to your PATH

# Install Node.js
brew install node@22

# Verify
node --version   # Should show v22.x or higher
npm --version

2. Install OpenClaw

bash
# One-line install
curl -fsSL https://openclaw.ai/install.sh | bash

This downloads the OpenClaw CLI, installs it globally via npm, and launches the onboarding wizard. The wizard will ask you about:

  • AI provider: Pick Anthropic (for Claude) or OpenRouter (for everything)
  • API key: Paste your Anthropic or OpenRouter key
  • Default model: We recommend claude-sonnet-4 to start
  • Chat channels: Skip for now or set up Discord/Telegram/Signal
  • Gateway service: Say yes to install as a background service

If you already ran the installer and want to redo onboarding:

bash
openclaw onboard --install-daemon

3. Verify It's Running

bash
# Check gateway status
openclaw gateway status

# Should show: Gateway is running (PID: XXXXX)

# Open the dashboard in your browser
openclaw dashboard

# Or manually: http://127.0.0.1:18789/

If the dashboard loads and you can chat with it, you're up and running. Everything after this is optimization and security.

Connecting Chat Channels

OpenClaw can connect to Discord, Telegram, Signal, WhatsApp, Slack, and more. You only need one to start.

Discord (easiest for most people): 1. Go to discord.com/developers/applications 2. Create a new application 3. Go to Bot → copy the token 4. Enable Message Content Intent under Privileged Gateway Intents 5. Invite the bot to your server with the OAuth2 URL generator 6. Add the token to your OpenClaw config

Telegram: 1. Message @BotFather on Telegram 2. Send /newbot and follow the prompts 3. Copy the token BotFather gives you 4. Add it to your OpenClaw config

Signal (most private): 1. You'll need signal-cli — install via Homebrew 2. Register a phone number (Google Voice works) 3. Link it to your OpenClaw config

The onboarding wizard handles channel configuration, or you can edit ~/.openclaw/openclaw.json directly. Full docs: [docs.openclaw.ai/channels](https://docs.openclaw.ai/channels)

Security Hardening (Don't Skip This)

Your Mac Mini is a computer on your network running an AI that can execute shell commands. Lock it down.

Firewall

bash
# Enable macOS firewall
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on

# Verify
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate

SSH (for Remote Access)

bash
# Generate an SSH key on your OTHER computer (not the Mini)
ssh-keygen -t ed25519 -C "your@email.com"

# Copy it to the Mini
ssh-copy-id youruser@your-mini-ip

# On the Mini, disable password auth
sudo sed -i '' 's/^#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo sed -i '' 's/^PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config

# Restart SSH
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd

API Spending Limits

This is critical. A misconfigured agent or runaway loop can burn through API credits fast.

  • Anthropic: Go to console.anthropic.com → Settings → Billing → Set monthly spending limit
  • OpenRouter: Go to openrouter.ai → Settings → Credits → Set credit limit
  • OpenAI: Go to platform.openai.com → Settings → Billing → Set monthly budget

Start with $20-50/month. You can always raise it. You can't un-spend money.

Automatic Updates

bash
# Enable automatic macOS updates
sudo softwareupdate --schedule on
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true
defaults write com.apple.SoftwareUpdate AutomaticDownload -bool true

Keep It Running 24/7

By default, Macs sleep when idle. You want the Mini to never sleep:

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

# Verify
pmset -g

Or go to System Settings → Energy → set "Turn display off after" to Never and disable "Put hard disks to sleep."

Auto-restart after power failure:

bash
sudo pmset -a autorestart 1

This way, if the power goes out and comes back, the Mini boots up automatically and the OpenClaw gateway service starts with it.

Remote Management

You probably don't want a monitor permanently connected to the Mini. Here's how to manage it remotely:

From another Mac on the same network:

bash
ssh youruser@your-mini-ip

Check OpenClaw status remotely:

bash
ssh youruser@your-mini-ip 'openclaw gateway status'

Restart the gateway remotely:

bash
ssh youruser@your-mini-ip 'openclaw gateway restart'

From your phone: Most chat channels (Discord, Telegram, Signal) let you interact with your OpenClaw agent from your phone. Set up a channel and you effectively have remote access via natural language.

Screen Sharing: System Settings → General → Sharing → Screen Sharing (for when you need the GUI).

Optional: Local Models with Ollama

If you have 24GB+ RAM, you can run AI models locally for free:

bash
# Install Ollama
brew install ollama

# Start the Ollama service
brew services start ollama

# Pull a model
ollama pull qwen3:14b      # 14B model, needs ~12GB RAM
ollama pull llama3.3:70b    # 70B model, needs ~48GB RAM

# Test it
ollama run qwen3:14b "Hello, what can you do?"

Then add Ollama as a provider in your OpenClaw config. Your agent can use local models for routine tasks (saving API costs) and Claude for complex work.

Full Ollama docs: [ollama.com](https://ollama.com)

Useful Links

  • OpenClaw GitHub: [github.com/openclaw/openclaw](https://github.com/openclaw/openclaw)
  • OpenClaw Docs: [docs.openclaw.ai](https://docs.openclaw.ai)
  • OpenClaw Discord: [discord.com/invite/clawd](https://discord.com/invite/clawd)
  • Anthropic Console (for API keys): [console.anthropic.com](https://console.anthropic.com)
  • OpenRouter (multi-model access): [openrouter.ai](https://openrouter.ai)
  • Ollama (local models): [ollama.com](https://ollama.com)
  • ClawHub (OpenClaw skills): [clawhub.com](https://clawhub.com)

Key Takeaways

  • A $599 Mac Mini is all you need for a 24/7 OpenClaw agent using API models
  • The installer script handles 90% of setup: curl -fsSL https://openclaw.ai/install.sh | bash
  • Use the Claude prompt template above to get walked through setup interactively
  • Don't skip security: firewall, SSH keys, API spending limits
  • Disable sleep and enable auto-restart so it survives power outages
  • Connect at least one chat channel (Discord is easiest) for phone access
  • Add Ollama later if you want free local models on 24GB+ RAM machines

The Bottom Line

Setting up OpenClaw on a Mac Mini takes about 30 minutes and gives you a personal AI agent that runs around the clock. The hardware is affordable, the software is open source, and the setup is genuinely easy — especially if you let Claude walk you through it. The hardest part is remembering to set API spending limits before your curious new agent decides to analyze the entire internet on your dime. Start conservative, expand as you learn, and remember: the best setup is the one that's actually running.

> From The Wire