Skip to content

How to Run OpenClaw in a Sandboxed macOS VM

I hate it when a new project clutters my main machine with dependencies and configuration files. Sometimes you just want a clean environment where you can test things, break them, and reset everything in seconds without worrying about your host system.

If you want to keep your host clean or specifically need macOS-only features like iMessage, running OpenClaw in a VM is the way to go. I recommend this approach if you want strict isolation or need to use BlueBubbles for iMessage automation.

  • Apple Silicon Mac (M1/M2/M3/M4)
  • macOS Sequoia or later on the host
  • ~60 GB free disk space per VM
  • ~20 minutes
  1. Install Lume.
  2. Run lume create openclaw --os macos --ipsw latest.
  3. Complete the Setup Assistant and enable Remote Login (SSH).
  4. Run lume run openclaw --no-display.
  5. SSH in, install OpenClaw, and configure your channels.

First, get Lume installed on your host Mac:

Terminal window
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"

If ~/.local/bin isn’t in your PATH, run this:

Terminal window
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc && source ~/.zshrc

Verify it works:

Terminal window
lume --version

This command downloads macOS and sets up the environment. A VNC window will open automatically.

Terminal window
lume create openclaw --os macos --ipsw latest

In the VNC window that popped up:

  1. Select your language and region.
  2. Skip Apple ID (unless you need iMessage right away).
  3. Create your user account.
  4. Skip the optional features to speed things up.

Once you hit the desktop, enable SSH so you can manage it from your terminal:

  1. Open System Settings → General → Sharing.
  2. Turn on Remote Login.

Back on your host terminal, find the VM’s IP:

Terminal window
lume get openclaw

Look for an IP like 192.168.64.x. Now, SSH into the VM:

Terminal window
ssh youruser@192.168.64.X

Now that you are inside the VM, install the OpenClaw CLI and start the onboarding process:

Terminal window
npm install -g openclaw@latest
openclaw onboard --install-daemon

Follow the prompts to connect your model provider (like OpenAI or Anthropic).

Open your config file:

Terminal window
nano ~/.openclaw/openclaw.json

Add your channel settings. For example, to use WhatsApp and Telegram:

{
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"allowFrom": ["+15551234567"]
},
"telegram": {
"botToken": "YOUR_BOT_TOKEN"
}
}
}

Then log in to WhatsApp by scanning the QR code:

Terminal window
openclaw channels login

You don’t need the VNC window open all the time. Stop the VM and restart it in the background:

Terminal window
lume stop openclaw
lume run openclaw --no-display

You can check if things are running fine via SSH:

Terminal window
ssh youruser@192.168.64.X "openclaw status"

This is the killer feature of using a macOS VM. You can use BlueBubbles to bring iMessage to OpenClaw.

Inside the VM:

  1. Install BlueBubbles and sign in with your Apple ID.
  2. Enable the Web API and set a password.
  3. Point webhooks at your gateway: https://your-gateway-host:3000/bluebubbles-webhook?password=<password>.

Add this to your openclaw.json:

{
"channels": {
"bluebubbles": {
"serverUrl": "http://localhost:1234",
"password": "your-api-password",
"webhookPath": "/bluebubbles-webhook"
}
}
}

I recommend saving a clean state of your VM so you can reset it instantly if something goes wrong:

Terminal window
lume stop openclaw
lume clone openclaw openclaw-golden

If you need to reset:

Terminal window
lume stop openclaw && lume delete openclaw
lume clone openclaw-golden openclaw
lume run openclaw --no-display
ProblemSolution
Can’t SSH into VMCheck “Remote Login” is enabled in VM’s System Settings
VM IP not showingWait for VM to fully boot, run lume get openclaw again
Lume command not foundAdd ~/.local/bin to your PATH
WhatsApp QR not scanningEnsure you’re logged into the VM (not host) when running openclaw channels login

Need more help? Check out the AI Setup Assistant.

OpenClaw

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.