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
Recommended default (most users)
- 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)
- Install Lume.
lume create openclaw --os macos --ipsw latest- Complete Setup Assistant, then enable Remote Login (SSH).
lume run openclaw --no-display- SSH in, install OpenClaw, and configure channels.
- 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:
- Choose language and region.
- Skip Apple ID (or sign in if you plan to use iMessage later).
- Create a user account (remember the username and password).
- Skip all optional features.
After setup finishes:
- Turn on SSH: go to System Settings -> General -> Sharing, then enable "Remote Login".
- 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:
- Sign in to Messages.
- Install
imsg. - Grant Full Disk Access and Automation permission for the process running OpenClaw or
imsg. - 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
caffeinateif needed
For true always-on operation, consider a dedicated Mac mini or a small VPS. See VPS hosting.
Troubleshooting
| Problem | Solution |
|---|---|
| Cannot SSH into VM | Check that "Remote Login" is enabled in the VM's System Settings |
| VM IP not showing | Wait for the VM to fully boot, then run lume get openclaw again |
| Lume command not found | Add ~/.local/bin to your PATH |
| WhatsApp QR not scanning | Make sure you are logged into the VM (not the host) when running openclaw channels login |
Related docs
- VPS hosting
- Nodes
- Gateway remote
- iMessage channel
- Lume Quickstart
- Lume CLI Reference
- Unattended VM Setup (advanced)
- Docker Sandboxing (alternative isolation approach)