Install OpenClaw on macOS
Intel & Apple Silicon (M1/M2/M3+) supported.
Requirements
- macOS 11.0+ (Big Sur or later)
- Node.js 18+ (or Docker for Mac)
- Git
- 4+ GB RAM available
Option 1: Using Homebrew (Recommended)
# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Node.js & Git
brew install node git
# Verify installation
node --version # should be 18+
npm --version
# Clone and start OpenClaw
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
openclaw token new
npm startOption 2: Using Docker Desktop for Mac
# Install Docker Desktop from https://www.docker.com/products/docker-desktop
# Then run (same as Linux):
git clone https://github.com/openclaw/openclaw.git
cd openclaw
docker compose up -d
openclaw statusTip: Docker option is easier for M1/M2 Macs (no Node.js compatibility issues).
Option 3: Manual Node.js Install
# Download Node.js 20 LTS from https://nodejs.org/
# (Choose the macOS installer for your chip: Intel or Apple Silicon)
# After installation, verify:
node --version
npm --version
# Clone and start
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
openclaw token new
npm startRunning in the Background (launchd)
To keep OpenClaw running as a background service:
# Create a plist file
mkdir -p ~/Library/LaunchAgents
cat > ~/Library/LaunchAgents/com.openclaw.agent.plist <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.openclaw.agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/npm</string>
<string>start</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/$YOUR_USERNAME/openclaw</string>
<key>StandardOutPath</key>
<string>/tmp/openclaw.log</string>
<key>StandardErrorPath</key>
<string>/tmp/openclaw.err</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
EOF
# Load the service
launchctl load ~/Library/LaunchAgents/com.openclaw.agent.plist
# To stop:
launchctl unload ~/Library/LaunchAgents/com.openclaw.agent.plistTroubleshooting
❌ node: command not found
Use Homebrew to install Node.js: brew install node
❌ Error: EACCES permission denied
sudo chown -R $(whoami) ~/.npm❌ Port 8000 already in use (especially on older Macs with AirPlay)
GATEWAY_PORT=9000 npm start❌ M1/M2 native module issues
Ensure Node.js was installed for Apple Silicon. Check: uname -m (should return arm64)
❌ Homebrew won't install on M1/M2
# Homebrew handles M1/M2 automatically. If issues:
arch -arm64 /bin/bash -c "$(curl -fsSL ...)"