OpenClaw Setup
Run OpenClaw messaging gateway in an isolated macOS VM with Lume
Run OpenClaw in a headless macOS VM to create a unified messaging gateway that bridges WhatsApp, Telegram, iMessage, and more with AI agents.
Why run OpenClaw in a VM?
Running OpenClaw in a macOS VM provides several advantages:
- iMessage integration — Only macOS can run iMessage natively; a VM gives you this capability on any Apple Silicon Mac
- Isolation — Keep your messaging gateway separate from your main system
- Always-on operation — Run the VM headlessly 24/7 without affecting your desktop
- Easy reset — Clone and restore VMs to quickly recover from issues
Quick path (experienced users)
# Install Lume
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"
# Create and setup VM
lume create openclaw --os macos --ipsw latest
# Complete Setup Assistant in VNC window, enable Remote Login (SSH)
# Then run headlessly
lume run openclaw --no-display
# SSH in, install OpenClaw, configure channels
ssh youruser@<VM_IP>
npm install -g openclaw@latest
openclaw onboard --install-daemonRequirements
- Apple Silicon Mac (M1/M2/M3/M4)
- macOS Sequoia or later on the host
- ~60 GB free disk space per VM
Step 1: Install Lume
/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:
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc && source ~/.zshrcVerify the installation:
lume --versionSee Lume Installation for more details.
Step 2: Create the macOS VM
lume create openclaw --os macos --ipsw latestThis downloads macOS and creates the VM. A VNC window opens automatically.
The macOS download can take a while depending on your connection speed.
Step 3: Complete Setup Assistant
In the VNC window:
- Select language and region
- Skip Apple ID (or sign in if you want iMessage later)
- Create a user account (remember the username and password)
- Skip all optional features
After setup completes, enable SSH:
- Open System Settings → General → Sharing
- Enable Remote Login
Step 4: Get the VM's IP address
lume get openclawLook for the IP address in the output (usually 192.168.64.x).
Step 5: SSH into the VM
ssh youruser@192.168.64.XReplace youruser with the account you created, and the IP with your VM's IP.
Step 6: Install OpenClaw
Inside the VM via SSH:
npm install -g openclaw@latest
openclaw onboard --install-daemonFollow the onboarding prompts to set up your model provider (Anthropic, OpenAI, etc.).
Step 7: Configure channels
Edit the config file:
nano ~/.openclaw/openclaw.jsonAdd your channels:
{
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"allowFrom": ["+15551234567"]
},
"telegram": {
"botToken": "YOUR_BOT_TOKEN"
}
}
}Then login to WhatsApp (scan QR):
openclaw channels loginStep 8: Run the VM headlessly
Stop the VM and restart without display:
lume stop openclaw
lume run openclaw --no-displayThe VM runs in the background. OpenClaw's daemon keeps the gateway running.
To check status:
ssh youruser@192.168.64.X "openclaw status"iMessage integration with BlueBubbles
This is the killer feature of running on macOS. Use BlueBubbles to add iMessage to OpenClaw.
Inside the VM:
- Download BlueBubbles from bluebubbles.app
- Sign in with your Apple ID
- Enable the Web API and set a password
- Point BlueBubbles webhooks at your gateway (example:
https://your-gateway-host:3000/bluebubbles-webhook?password=<password>)
Add to your OpenClaw config:
{
"channels": {
"bluebubbles": {
"serverUrl": "http://localhost:1234",
"password": "your-api-password",
"webhookPath": "/bluebubbles-webhook"
}
}
}Restart the gateway. Now your agent can send and receive iMessages.
Save a golden image
Before customizing further, snapshot your clean state:
lume stop openclaw
lume clone openclaw openclaw-goldenReset anytime:
lume stop openclaw && lume delete openclaw
lume clone openclaw-golden openclaw
lume run openclaw --no-displayRunning 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.
Troubleshooting
| Problem | Solution |
|---|---|
| Can't SSH into VM | Check "Remote Login" is enabled in VM's System Settings |
| VM IP not showing | Wait for VM to fully boot, run lume get openclaw again |
| Lume command not found | Add ~/.local/bin to your PATH |
| WhatsApp QR not scanning | Ensure you're logged into the VM (not host) when running openclaw channels login |
Next steps
- VM Management — Learn more about managing VMs
- Unattended Setup — Automate VM creation without manual steps
- HTTP Server — Control VMs programmatically via API
Was this page helpful?