Run OpenClaw in a macOS VM for Isolation or iMessage

This page explains when to use a macOS VM with OpenClaw and covers local VM options with Lume on Apple Silicon as well as hosted cloud providers. It is intended for users needing macOS-only features like iMessage or strong separation from their main Mac.

Read this when

  • You want OpenClaw isolated from your main macOS environment
  • You want iMessage integration in a sandbox
  • You want a resettable macOS environment you can clone
  • You want to compare local vs hosted macOS VM options
  • Small Linux VPS for an always-on Gateway with minimal expense. Check VPS hosting.
  • Dedicated hardware (Mac mini or Linux box) when you need full control and a residential IP for browser automation. Data center IPs are frequently blocked, so local browsing tends to be more reliable.
  • Hybrid: host the Gateway on a cheap VPS, then attach your Mac as a node when browser or UI automation is required. Refer to Nodes and Gateway remote.

Only use a macOS VM when you specifically need macOS-only features like iMessage, or want strong separation from your everyday Mac.

macOS VM options

Local VM on your Apple Silicon Mac (Lume)

Run OpenClaw inside a sandboxed macOS VM on your Apple Silicon Mac with Lume. This provides:

  • A complete macOS environment kept separate (your host stays untouched)
  • iMessage support via imsg; the default local path is not available on Linux or Windows
  • Instant rollback by cloning VMs
  • No extra hardware or cloud expenses

Hosted Mac providers (cloud)

If you prefer macOS in the cloud, hosted Mac providers are also an option:

  • MacStadium (hosted Macs)
  • Other hosted Mac vendors work too; follow their VM and SSH instructions

Once you have SSH access to a macOS VM, proceed with Install OpenClaw below.

Quick path (Lume, experienced users)

  1. Install Lume.
  2. lume create openclaw --os macos --ipsw latest
  3. Complete Setup Assistant, then enable Remote Login (SSH).
  4. lume run openclaw --no-display
  5. SSH in, install OpenClaw, and configure channels.
  6. Done.

What you need (Lume)

  • Apple Silicon Mac (M1/M2/M3/M4)
  • macOS Sequoia or later on the host
  • About 60 GB free disk space per VM
  • Roughly 20 minutes

1) Install Lume

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

If ~/.local/bin is not in your PATH:

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

Verify:

lume --version

Docs: Lume Installation

2) Create the macOS VM

lume create openclaw --os macos --ipsw latest

This downloads macOS and creates the VM. A VNC window opens automatically.

Note

The download may take a while depending on your connection speed.

3) Complete Setup Assistant

In the VNC window:

  1. Choose language and region.
  2. Skip Apple ID (or sign in if you plan to use iMessage later).
  3. Create a user account (remember the username and password).
  4. Skip all optional features.

After setup finishes:

  1. Turn on SSH: go to System Settings -> General -> Sharing, then enable "Remote Login".
  2. For headless VM use, enable auto-login: go to System Settings -> Users & Groups, select "Automatically log in as:", and pick the VM user.

4) Get the VM IP address

lume get openclaw

Look for the IP address (usually 192.168.64.x).

5) SSH into the VM

ssh youruser@192.168.64.X

Replace youruser with the account you created, and the IP with your VM's IP.

6) Install OpenClaw

Inside the VM:

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

Follow the onboarding prompts to set up your model provider (Anthropic, OpenAI, etc.).

7) Configure channels

Edit the config file:

nano ~/.openclaw/openclaw.json

Add your channels:

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

Then log in to WhatsApp (scan the QR code):

openclaw channels login

8) Run the VM headlessly

Stop the VM and restart without a display:

lume stop openclaw
lume run openclaw --no-display

The VM runs in the background; OpenClaw's daemon keeps the gateway active. To check status:

ssh youruser@192.168.64.X "openclaw status"

Bonus: iMessage integration

This is the standout advantage of running on macOS. Use iMessage with imsg to add Messages to OpenClaw.

Inside the VM:

  1. Sign in to Messages.
  2. Install imsg.
  3. Grant Full Disk Access and Automation permission for the process running OpenClaw or imsg.
  4. Verify RPC support with imsg rpc --help.

Add to your OpenClaw config:

{
  channels: {
    imessage: {
      enabled: true,
      cliPath: "imsg",
      dbPath: "~/Library/Messages/chat.db",
    },
  },
}

Restart the gateway. Your agent can now send and receive iMessages. Full setup details: iMessage channel.

Save a golden image

Before making further customizations, snapshot your clean state:

lume stop openclaw
lume clone openclaw openclaw-golden

Reset anytime:

lume stop openclaw && lume delete openclaw
lume clone openclaw-golden openclaw
lume run openclaw --no-display

Running 24/7

Keep the VM running by:

  • Keeping your Mac plugged in
  • Disabling sleep in System Settings -> Energy Saver
  • Using caffeinate if needed

For true always-on operation, consider a dedicated Mac mini or a small VPS. See VPS hosting.

Troubleshooting

ProblemSolution
Cannot SSH into VMCheck that "Remote Login" is enabled in the VM's System Settings
VM IP not showingWait for the VM to fully boot, then run lume get openclaw again
Lume command not foundAdd ~/.local/bin to your PATH
WhatsApp QR not scanningMake sure you are logged into the VM (not the host) when running openclaw channels login