养虾指南
OpenClaw System Guide
Native macOS

Install OpenClaw on Mac

Native macOS installation via Homebrew and Node.js — free, private, with full Apple Silicon support.

Install OpenClaw locally on Mac — completely free with full data privacy. Supports Apple Silicon (M1/M2/M3/M4) and Intel Macs. Set up in 15 minutes with Homebrew and Node.js. A Mac Mini is a popular 'sweet spot' setup for many users.

Prerequisites

  • macOS 12 (Monterey) or later
  • Homebrew package manager
  • Node.js 22+ (LTS version)
  • Git (usually pre-installed on macOS)
  • At least one LLM API key
Don't have Homebrew? Open Terminal (Cmd+Space, search "Terminal") and paste: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
1

Install Node.js 22

Install Node.js 22 LTS using Homebrew:

Terminal
brew install node@22

Verify the installation:

Terminal
node --version\nnpm --version
If you use nvm, you can also run nvm install 22 && nvm use 22. Make sure Node.js version >= 22.0.0.
2

Clone the OpenClaw Repository

Clone the OpenClaw source code from GitHub:

Terminal
git clone https://github.com/openclaw/openclaw.git
If GitHub access is slow, you can use a mirror: git clone https://ghproxy.com/https://github.com/openclaw/openclaw.git
3

Install Dependencies

Navigate to the project and install all dependencies (may take a few minutes):

Terminal
cd openclaw && npm install
Apple Silicon (M1/M2/M3/M4) users need no extra configuration. All dependencies natively support the ARM64 architecture.
4

Configure Environment Variables (.env file)

Copy the example environment file and edit it with your API keys:

Terminal
cp .env.example .env

Open .env with your preferred editor (VS Code, nano, vim, etc.) and set at least one model API key:

.env
# OpenClaw 环境变量配置
OPENAI_API_KEY=sk-your-openai-api-key
# ANTHROPIC_API_KEY=sk-ant-your-key
# DEEPSEEK_API_KEY=your-deepseek-key

DEFAULT_MODEL=gpt-4o
ACCESS_CODE=your-secure-password
PORT=3210
Always set ACCESS_CODE! Without it, any device on your Wi-Fi network can access your OpenClaw instance.
5

Start OpenClaw

Start the OpenClaw service:

Terminal
npm start

Once started, open your browser and visit:

Browser
http://localhost:3210
If you see the OpenClaw interface, installation is complete! Log in with ACCESS_CODE and start configuring. Next time, just run npm start in the project directory.

Apple Silicon Compatibility & Performance

OpenClaw fully supports Apple Silicon (M1, M2, M3, M4 series). The installation process is identical to Intel Macs. All npm dependencies provide native ARM64 builds — no Rosetta translation needed.

OpenClaw runs excellently on Apple Silicon Macs. Thanks to the unified memory architecture and efficient ARM instruction set, local inference is faster and more power-efficient. A Mac Mini (M4) + OpenClaw is widely regarded as the 'sweet spot' setup.

If you plan to use your Mac as a long-term server, keep it plugged in and disable 'Automatic Sleep' in System Settings to prevent service interruption.

Installed! Next: Feed Your Agent

Your agent is installed but can't think or talk yet — configure an LLM API and messaging tool to bring it alive.

Feed Your Agent