Setting up OpenClaw on a Mac Mini gives you a powerful, always-on AI agent system. This guide walks you through the complete installation process, from installing prerequisites with Homebrew to configuring auto-start with launchd. Whether you have an M1, M2, or M4 Mac Mini, you'll have a production-ready OpenClaw instance running in under an hour.
Why This Is Hard to Do Yourself
These are the common pitfalls that trip people up.
macOS dependency maze
Homebrew, Xcode CLT, Node.js version conflicts
Gateway configuration confusion
Undocumented ENV vars and config file format
Firewall & network issues
macOS firewall blocks OpenClaw by default
Auto-start on boot
No built-in service management on macOS
Step-by-Step Guide
Install prerequisites with Homebrew
Install Node.js 20+, Git, and dependencies.
brew install node@20 git
node --version # Should be 20.x+Clone and install OpenClaw
Clone from GitHub and install.
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm installConfigure environment variables
Copy .env.example and set API keys.
cp .env.example .env
nano .env # Set ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.Warning: Never commit .env files to Git. Add .env to .gitignore if not already present.
Configure OpenClaw Gateway
Set up gateway config for local access.
cp gateway.example.yaml gateway.yaml
# Edit gateway.yaml to set port, auth, and allowed originsStart OpenClaw and verify
Launch and test the installation.
npm start
# Or for development:
npm run devSet up auto-start with launchd
Create a macOS launch agent.
# Create ~/Library/LaunchAgents/com.openclaw.agent.plist
# Set ProgramArguments to npm start in your openclaw directory
launchctl load ~/Library/LaunchAgents/com.openclaw.agent.plistSkip the Setup Hassle
Our Mac Mini specialists handle full OpenClaw deployments โ including gateway config, auto-start, and a complete runbook.
Get matched with a specialist who can help.
Sign Up for Expert Help โ