In This Article
Introduction
Mac hardware is the community's first choice for running OpenClaw. The reasons are practical: excellent Node.js performance, Apple Silicon's power efficiency (ideal for 24/7 operation), solid macOS process management tools, and the iMessage integration that's uniquely possible on Apple hardware. A Mac Mini M4 running OpenClaw 24/7 costs roughly $1–2 per month in electricity — a compelling argument for dedicated getting it running.
This guide walks through the complete Mac setup process, from fresh machine to running AI agent, optimized specifically for macOS. Estimated time: 30–45 minutes for most users.
Mac Prerequisites
Before starting, verify your Mac meets these requirements:
- macOS Ventura or later (Sequoia recommended for best performance)
- 8GB RAM minimum (16GB+ recommended if you plan to run local models via Ollama)
- 10GB free disk space minimum for OpenClaw and Node.js dependencies
- Internet connection for initial setup and cloud API usage
You'll also want Homebrew installed — macOS's package manager that makes installing developer tools straightforward. If you don't have it, install it first:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow the prompts. Homebrew installation takes 5–10 minutes. Once done, verify with brew --version.
Installing Node.js
OpenClaw requires Node.js 20 or later. The recommended way to install Node.js on Mac is through Node Version Manager (nvm), which lets you easily switch between Node versions without conflicts:
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Reload your shell configuration
source ~/.zshrc # or ~/.bashrc if using bash
# Install and use Node.js 20
nvm install 20
nvm use 20
nvm alias default 20
# Verify installation
node --version # Should show v20.x.x
npm --version # Should show 10.x.x or later
Alternatively, if you prefer a simpler approach without version management, install Node.js directly via Homebrew: brew install node@20. This works fine for a single-purpose OpenClaw machine where version flexibility isn't needed.
Clone & Configure OpenClaw
Choose where you want OpenClaw to live on your Mac. Many users create a dedicated directory:
# Create and navigate to your chosen directory
mkdir ~/agents && cd ~/agents
# Clone the OpenClaw repository
git clone https://github.com/openclaw-foundation/openclaw.git
cd openclaw
# Install dependencies
npm install
The npm install step may take 1–3 minutes depending on your connection speed. You'll see a progress indicator and a summary of installed packages when complete.
Next, create your configuration file from the template:
cp config.example.yaml config.yaml
Open config.yaml in your editor of choice. On macOS, you can use the built-in TextEdit, VS Code, or any other text editor. Configure your LLM provider — for a first setup, OpenAI is the simplest:
llm:
default_provider: openai
providers:
openai:
api_key: "your-openai-api-key-here"
model: "gpt-4o-mini"
Use GPT-4o Mini for initial testing — it's fast, cheap, and perfectly capable for getting started. You can upgrade to more powerful models once everything is running.
Creating a Telegram Bot
Telegram is the recommended channel for Mac deployments. The setup takes about 5 minutes:
- Open Telegram on your Mac or iPhone
- Search for @BotFather and start a conversation
- Send
/newbot - Choose a display name (e.g., "My OpenClaw Agent")
- Choose a username ending in "bot" (e.g., "my_openclaw_bot") — must be unique globally
- BotFather will send you a token: a long string like
7234567890:AAEXfkjhsdkjf...
Copy that token. Now find your Telegram user ID by messaging @userinfobot — it will reply with your numeric ID.
Add both to your config.yaml:
channels:
telegram:
enabled: true
bot_token: "7234567890:AAEXfkjhsdkjfhskdjfhskdjfhskdjfhsk"
allowed_user_ids:
- 123456789 # Your Telegram user ID
The allowed_user_ids list is a critical security setting. Only listed user IDs can send commands to your agent. Without this, anyone who discovers your bot's username could potentially send it instructions.
Your First Conversation
Start OpenClaw:
npm start
You should see startup messages in the terminal as the service initializes, channels connect, and the agent reports ready. Now open Telegram, find your new bot (search for its username), and start chatting:
- "Hello! What's today's date?" — Confirms basic operation
- "What skills do you have available?" — Lists your installed Skills
- "Remember that my name is [name] and I'm a [your role]" — Tests the memory system
- "Create a note reminding me to follow up with the team on Friday" — Tests task creation
If you receive responses to all of these, your installation is successful. Congratulations — you have a running AI agent on your Mac.
To stop OpenClaw, press Ctrl+C in the terminal. For ongoing use, you'll want it to start automatically (see the next section).
Running 24/7 on a Mac Mini
A Mac Mini is the ideal hardware for a dedicated, always-on OpenClaw getting it running. A few macOS-specific optimizations for 24/7 operation:
Configure Energy Saver: System Settings → Battery/Energy → set "Prevent automatic sleeping" to "Always." Also enable "Start up automatically after a power failure" — important for unattended operation after power outages.
Use launchd for automatic startup: Create a launchd plist to start OpenClaw automatically on boot and restart it if it crashes. Create the file at ~/Library/LaunchAgents/com.openclaw.agent.plist:
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.openclaw.agent</string>
<key>ProgramArguments</key>
<array>
<string>/Users/YOUR_USERNAME/.nvm/versions/node/v20.x.x/bin/node</string>
<string>/Users/YOUR_USERNAME/agents/openclaw/src/index.js</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/YOUR_USERNAME/agents/openclaw</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/openclaw.log</string>
<key>StandardErrorPath</key>
<string>/tmp/openclaw-error.log</string>
</dict>
</plist>
Load it with: launchctl load ~/Library/LaunchAgents/com.openclaw.agent.plist
Monitor with Activity Monitor: Check CPU and RAM usage periodically during the first few days to verify the agent isn't accumulating memory over time. A healthy OpenClaw instance typically uses under 200MB RAM at steady state.
Keep macOS and OpenClaw updated: Enable automatic macOS security updates and periodically update OpenClaw with git pull && npm install. Security patches are important for a machine running an internet-connected service.
Wrapping Up
Setting up OpenClaw on a Mac is straightforward with the right guidance. The process takes under an hour and produces a genuine 24/7 AI agent that you can message from anywhere in the world. The Mac Mini's combination of performance, efficiency, silence, and reliability makes it the community's consensus choice for dedicated getting it running. With launchd managing the service automatically, your agent will be there whenever you need it — and working on your behalf when you don't.