iMessage (Legacy)
The legacy iMessage integration runs directly on a macOS machine, accessing the local Messages chat.db to read and send messages.
Prerequisites
Section titled “Prerequisites”- A macOS machine (Mac Mini, MacBook, etc.).
- Messages app signed in with an Apple ID.
- Full Disk Access granted to OpenClaw (to read
chat.db).
Setup Guide
Section titled “Setup Guide”Install the CLI Tool
Section titled “Install the CLI Tool”We use
imsgto bridge OpenClaw to the Messages private API.Terminal window brew install steipete/tap/imsgConfigure OpenClaw
Section titled “Configure OpenClaw”Tell OpenClaw where
imsgand your chat database are located.{channels: {imessage: {enabled: true,// Path to the installed binarycliPath: "/opt/homebrew/bin/imsg",// Your Messages DBdbPath: "/Users/yourname/Library/Messages/chat.db"}}}Grant Permissions
Section titled “Grant Permissions”When you first run OpenClaw:
- macOS will prompt you to grant Full Disk Access to your terminal or the OpenClaw binary. This is required to read
chat.db. - macOS may prompt for Automation permissions to allow sending messages.
- macOS will prompt you to grant Full Disk Access to your terminal or the OpenClaw binary. This is required to read
Pairing
Section titled “Pairing”Send an iMessage to yourself (or the account running the bot).
- The bot will reply with a Pairing Code.
- Run
openclaw pairing approve imessage <code>to authorize.
Remote Setup (Tailscale)
Section titled “Remote Setup (Tailscale)”If you run OpenClaw on Linux but have a Mac for iMessage, you can bridge them via SSH and Tailscale.
Mac: Enable Remote Login (SSH).
Linux: Create a wrapper script to run
imsgremotely./usr/local/bin/imsg-ssh #!/bin/bashssh user@my-mac-mini.tailscale.net "/opt/homebrew/bin/imsg $@"Config:
{channels: {imessage: {cliPath: "/usr/local/bin/imsg-ssh",remoteHost: "user@my-mac-mini.tailscale.net", // For fetching attachmentsincludeAttachments: true}}}
Comparison: Legacy vs. BlueBubbles
Section titled “Comparison: Legacy vs. BlueBubbles”| Feature | Legacy (imsg) | BlueBubbles |
|---|---|---|
| OS Support | macOS Only | Linux, Windows, Docker (via Android/Mac bridge) |
| Reliability | Medium (depends on AppleScript/DB) | High (API based) |
| Attachments | Basic | Full Support |
| Reactions | Read-only | Read/Write |
| Typing Indicators | No | Yes |
We strongly recommend migrating to BlueBubbles for new deployments.