Platform setup
How to Install OpenClaw on macOS
Browse more in Platform setup.
All platform setup guides →This guide walks you through installing OpenClaw on a sandboxed macOS VM running on your Apple Silicon Mac using Lume. You’ll create an isolated macOS environment, SSH into it, install OpenClaw, and wire up chat channels like WhatsApp or Telegram.
By the end, you’ll have an always-on OpenClaw gateway running inside a macOS VM that you can manage headlessly.
Prerequisites
- ✓An Apple Silicon Mac (M1/M2/M3/M4).
- ✓The host Mac running macOS Sequoia or later.
- ✓Around 60 GB free disk space per VM.
- ✓About 20 minutes of setup time.
- ✓npm available on the VM so you can run `npm install -g openclaw@latest`.
Steps
- 1
Install Lume on your Apple Silicon Mac
Lume is the VM runtime that gives you an isolated macOS environment where OpenClaw runs without touching your main system. Install it on the host first, then fix your PATH so the `lume` command works in every terminal, and verify the install before you move on.
bash/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)" - 2
Add Lume to your PATH and verify the CLI
local/bin` but that directory isn’t on your PATH, your shell won’t find the `lume` command. Append it to your shell config, reload, and confirm that Lume is available before you try to create a VM.
bashecho 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc && source ~/.zshrc lume --version - 3
Create the macOS VM for OpenClaw
Now you create a dedicated macOS VM named `openclaw` that will host the gateway. This command downloads the latest macOS IPSW, provisions the VM, and opens a VNC window so you can walk through Apple’s Setup Assistant.
bashlume create openclaw --os macos --ipsw latest - 4
Complete macOS Setup Assistant and enable SSH
Use the VNC window to finish the standard macOS setup so the VM has a user account you can SSH into. At the end, enable Remote Login so the host can connect over SSH; without this, all later steps that run inside the VM will fail.
- 5
Get the VM IP address from Lume
You need the VM’s internal IP to SSH in from your host. x` range) for the next step.
bashlume get openclaw - 6
SSH into the macOS VM
With SSH enabled and the IP in hand, connect from your host into the VM’s shell. Use the username you created during Setup Assistant and the IP from `lume get` so you’re installing OpenClaw in the right environment.
bashssh youruser@192.168.64.X - 7
Install OpenClaw inside the VM and run onboarding
All OpenClaw installation happens inside the VM so the gateway stays sandboxed. Install the latest OpenClaw globally with npm, then run the onboarding flow to configure your model provider and install the daemon that keeps the gateway running.
bashnpm install -g openclaw@latest openclaw onboard --install-daemon - 8
Configure OpenClaw channels in the VM
OpenClaw reads its channel configuration from a JSON file in your home directory. Edit this file to add WhatsApp and Telegram (or other channels), then run the login flow from inside the VM so browser-based QR flows happen in the right place.
bashnano ~/.openclaw/openclaw.json - 9
Add WhatsApp and Telegram channel config
Define which phone numbers can DM your agent on WhatsApp and add your Telegram bot token. This JSON snippet lives in the same config file you opened in the previous step and controls how OpenClaw exposes your agent over chat.
json{ channels: { whatsapp: { dmPolicy: "allowlist", allowFrom: ["+15551234567"], }, telegram: { botToken: "YOUR_BOT_TOKEN", }, }, } - 10
Log in to WhatsApp from inside the VM
To bind your WhatsApp account, you need to run the login command from the VM so the QR code session is tied to the sandboxed browser. If you run this on the host by mistake, the QR flow won’t connect to the OpenClaw instance that’s actually handling messages.
bashopenclaw channels login - 11
Run the macOS VM headlessly with OpenClaw in the background
Once everything is configured, you can shut down the VNC UI and run the VM without a display. Lume keeps the VM alive in the background, and the OpenClaw daemon inside the VM keeps your gateway up so you can treat it like a small always-on server.
bashlume stop openclaw lume run openclaw --no-display ssh youruser@192.168.64.X "openclaw status" - 12
Snapshot a golden image of your clean OpenClaw VM
After you have a working OpenClaw setup, clone the VM into a golden image so you can reset quickly if you break something later. You can then delete and recreate the working VM from this snapshot instead of reinstalling macOS and OpenClaw from scratch.
bashlume stop openclaw lume clone openclaw openclaw-golden lume stop openclaw && lume delete openclaw lume clone openclaw-golden openclaw lume run openclaw --no-display
Configuration
| Option | Description | Example |
|---|---|---|
| channels.whatsapp.dmPolicy | Controls how WhatsApp DMs are handled, such as restricting who can message your agent. | allowlist |
| channels.whatsapp.allowFrom | List of phone numbers allowed to DM your agent on WhatsApp when dmPolicy is set to allowlist. | ["+15551234567"] |
| channels.telegram.botToken | The Telegram bot token used by OpenClaw to connect to your Telegram bot. | YOUR_BOT_TOKEN |
| channels.bluebubbles.serverUrl | The local BlueBubbles server URL that exposes your iMessage Web API. | http://localhost:1234 |
| channels.bluebubbles.password | The API password you configure in BlueBubbles for securing the Web API. | your-api-password |
| channels.bluebubbles.webhookPath | The HTTP path on your OpenClaw gateway that BlueBubbles sends webhooks to. | /bluebubbles-webhook |
Troubleshooting
You can’t SSH into the VM even though it looks like it’s running.
The VM probably doesn’t have Remote Login enabled inside macOS, so the SSH daemon never starts. Open the VNC window, go to System Settings → General → Sharing, and enable “Remote Login”, then try SSH again from the host.
The VM IP is not showing when you run `lume get openclaw`.
Lume only reports the IP after the VM fully boots and macOS brings up networking. x` address.
lume get openclawRunning `lume` prints `command not found` in your terminal.
local/bin`, but that directory isn’t on your PATH, so your shell can’t find it. zshrc`, reload your shell, and verify with `lume --version`.
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc && source ~/.zshrcThe WhatsApp QR code isn’t scanning or linking to the right session.
You likely ran `openclaw channels login` on the host instead of inside the VM, so the browser session doesn’t match the OpenClaw instance that handles WhatsApp. SSH into the VM and rerun `openclaw channels login` there so the QR flow is bound to the sandboxed environment.
ssh youruser@192.168.64.X
openclaw channels loginFrequently asked questions
Powered by Mem0
Add persistent memory to OpenClaw
Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.