Setup Guide

OpenClaw on Mac M2

Mac M2 handles AI workloads better than almost anything else at its price. Here is how to put that power to use.

10 min read
Mar 24, 2026
Ampere Team

The Mac M2 chip is fast, power-efficient, and built for sustained workloads — which makes it one of the best personal machines for running an AI agent like OpenClaw.

This guide takes you from a fresh Mac M2 to a fully working agent. No prior experience needed. If you prefer cloud hosting over local setup, Ampere.sh lets you skip all of this and get started right away.

Why Mac M2 is Great for OpenClaw

Most personal computers were not built for running background AI services. Mac M2 is different. Here is what makes it a solid choice:

Fast and Responsive
M2 handles Node.js workloads with low latency. Your agent responds quickly even under load.
🔋
Energy Efficient
OpenClaw idles at 150–300 MB of RAM and barely touches the CPU. M2 runs it without heating up.
🔄
Always-On Capable
Mac Mini M2 in particular is designed to sit on a desk and run 24/7 without fan noise or heat.
🧠
Unified Memory
M2 Pro and Max models with 16 GB+ RAM can run multiple agents or larger local models at once.

Mac M2 Requirements for OpenClaw

Check these before starting so the install goes smoothly:

  • macOS version — Ventura 13.0 or newer. Monterey 12.0 also works but Ventura is recommended.
  • RAM — 8 GB is the minimum. 16 GB gives you room for multiple agents or heavier models.
  • Storage — OpenClaw uses under 200 MB. Make sure you have at least 1 GB free.
  • API key — You need one from Anthropic, OpenAI, Google, or another supported provider before you start.
  • Terminal — Open the built-in Terminal app (Applications → Utilities → Terminal) or use iTerm2.

Installing OpenClaw on Mac M2

Step 1 — Run the Installer

Open Terminal and paste this command. It automatically installs OpenClaw along with the right version of Node.js for your M2 chip.

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

The script detects Apple Silicon and installs the native arm64 build. No Rosetta, no compatibility mode.

OpenClaw installer running in Mac Terminal on Apple Silicon M2

Step 2 — Run the Setup Command

Once the install finishes, run this command in Terminal. Do not remove the --install-daemon part — it makes OpenClaw start automatically every time your Mac boots up.

openclaw onboard --install-daemon

Step 3 — Accept the Disclaimer

The setup wizard will show a short disclaimer first. Read it and press Enter to continue.

OpenClaw disclaimer screen in Terminal

Step 4 — Choose Your AI Provider

You will see a list of AI providers. Use the arrow keys to pick one — for example Anthropic, OpenAI, or Google — then press Enter.

Selecting AI provider in OpenClaw setup on Mac M2

Step 5 — Paste Your API Key

Copy your API key from your provider dashboard and paste it when asked. The key will not be visible as you type — that is normal.

Pasting API key in OpenClaw onboarding on Mac M2

Step 6 — Set the Gateway Port

Press Enter to keep the default port 18789. You do not need to change this unless another app is already using that port.

Setting gateway port in OpenClaw setup

Step 7 — Connect a Messaging App

Choose which app you want to use to chat with your agent — Telegram, Discord, WhatsApp, or others. Follow the steps shown on screen to link your account.

Step 8 — Verify the Agent is Live

Run this to confirm everything is working:

openclaw gateway status

You should see the gateway running with a PID and port number. Open the web dashboard to manage your agent from a browser:

openclaw dashboard # Or open: http://127.0.0.1:18789/
openclaw gateway status showing running on Mac M2

Keeping Your Agent Online 24/7

The daemon flag keeps OpenClaw running in the background, but macOS can still put your Mac to sleep and take the agent offline. Fix this in one place:

  • Open System Settings
  • Go to Battery → Options
  • Turn on Prevent automatic sleeping when display is off

On a MacBook M2, keep it plugged in when you want the agent running overnight. On a Mac Mini M2, this setting is all you need — the machine is already always on.

Fixes for Common Issues

Command not found after install

Your shell cannot find the openclaw command even though the install finished. This happens because the PATH was not updated for the current session.

Fix

Reload your shell profile to pick up the new PATH.

source ~/.zprofile # Then try: openclaw --version

Agent goes offline when Mac sleeps

macOS sleeps the machine when idle, which stops all background processes including the OpenClaw gateway.

Fix

Go to System Settings → Battery → Options and turn on Prevent automatic sleeping when display is off.

# Confirm gateway is still running after waking Mac: openclaw gateway status # If not running, start it: openclaw gateway start

API key rejected

The AI provider is returning an authentication error. The key may be wrong, expired, or from a different account.

Fix

Copy the key again from your provider dashboard and re-run onboarding.

openclaw onboard --install-daemon

Something else is broken

Not sure where the problem is — could be config, Node version, network, or something else.

Fix

Run the built-in diagnostic tool. It scans everything and tells you exactly what is wrong.

openclaw doctor

Mac M2 Local Setup vs Ampere.sh

Running OpenClaw on your own Mac M2 gives you full control. Running it on Ampere.sh means you never have to think about uptime again. Here is the tradeoff:

FeatureMac M2 (Local)Ampere.sh
Time to get started15–20 minutes60 seconds
Agent offline when Mac sleeps❌ Yes✅ Never
Setup requiredTerminal + configNone
Agent uptimeDepends on your Mac✅ 24/7 guaranteed
MaintenanceYou manage updatesFully managed
Cost to startAPI key only✅ Free credits

Your Mac M2 is Powerful. Your Agent Should Not Depend on It.

Running OpenClaw locally on Mac M2 works well — until your Mac restarts, the lid closes, or the power goes out. When that happens, your agent goes silent.

Ampere.sh keeps your agent running on dedicated cloud servers — completely separate from your Mac. No config files, no sleep settings, no Terminal required:

  • Your agent answers messages even when your Mac is shut down
  • Nothing to install or maintain — updates happen automatically
  • Start for free, no credit card required
  • Works alongside your local setup or as a full replacement

Frequently Asked Questions

Does OpenClaw run natively on Mac M2?
Yes. OpenClaw is built on Node.js which has full native support for Apple Silicon. It runs without Rosetta and takes full advantage of the M2 chip.
Is Mac M2 better than M1 for running OpenClaw?
Both work great. M2 has faster memory bandwidth and better efficiency, which means lower latency during conversations and slightly less battery usage. For most users the difference is not noticeable in daily use.
Does OpenClaw work on M2 Pro and M2 Max?
Yes. OpenClaw works on all M2 variants — M2, M2 Pro, and M2 Max. More RAM on Pro and Max means you can run more agents or larger models at the same time.
Will my agent stop working if I close the MacBook lid?
Yes, unless you configure Power Nap or connect to a charger and enable Prevent automatic sleeping in System Settings. On a Mac Mini with M2, this is easier since the machine is always plugged in.
How do I update OpenClaw on Mac M2?
Run npm install -g openclaw in Terminal. The update process is the same on all Mac models.
Can I run multiple OpenClaw agents on M2?
Yes. M2 with 16 GB or more RAM handles multiple agents well. Each agent uses around 150 to 300 MB at idle. Keep an eye on memory if you plan to run more than three at the same time.
What is the config file location on Mac M2?
The config file is at ~/.openclaw/openclaw.json. You can edit it directly or re-run openclaw onboard to change settings through the setup wizard.