Deploy an OpenClaw gateway on a Linux server and use Tailscale to create a secure tunnel to your Mac. This setup lets you control iMessage on your Mac through the OpenClaw gateway.
Architecture
┌──────────────────────────────┐ SSH (imsg rpc) ┌──────────────────────────┐
│ Gateway host (Linux/VM) │──────────────────────────────────▶│ Mac with Messages + imsg │
│ - clawdbot gateway │ SCP (attachments) │ - Messages signed in │
│ - channels.imessage.cliPath │◀──────────────────────────────────│ - Remote Login enabled │
└──────────────────────────────┘ └──────────────────────────┘
▲
│ Tailscale tailnet (hostname or 100.x.y.z)
▼
user@gateway-hostBilling
Deploying and using the OpenClaw service on a Simple Application Server instance incurs the following fees:
Simple Application Server fees: For more information, see Simple Application Server billing overview.
By default, OpenClaw invokes models from Alibaba Cloud Model Studio. Model invocations are billed in two primary ways:
Coding Plan AI coding plan (recommended): This plan uses a fixed monthly fee model with a monthly request quota. Calls that exceed the quota return an error and incur no charge, which helps you avoid unexpected costs.
The Coding Plan currently supports models such as
qwen3.5-plus,kimi-k2.5,MiniMax-M2.5, andglm-5. For the full list of supported models, see Coding Plan overview.Pay-as-you-go (by token): By default, the
OpenClaw 2026.2.26version uses theqwen3.5-plusmodel for text and image processing. For billing details, see Qwen-Plus.For the default models and billing details of other versions, see Default models of other versions.
ImportantEnable Stop on Free Quota Exhaustion (Singapore region only): When you first activate Alibaba Cloud Model Studio (in the Singapore region), a free trial quota for new users is automatically issued for each model. After the free quota is exhausted, billing is based on usage at the prices listed in the model list. We recommend that you enable the Stop on Free Quota Exhaustion feature to avoid unexpected charges. For more billing information, see OpenClaw (formerly Moltbot, Clawdbot) purchasing and billing FAQ.
Procedure
Tailscale configuration
Set up Tailscale on both your Mac and your server to establish a network connection. First, register for an account at Tailscale.
Download and install Tailscale on your Mac from the download page.

After installation, start Tailscale from the command line:
/Applications/Tailscale.app/Contents/MacOS/Tailscale upTo install Tailscale on your Linux server, go to the admin console to get the installation script. Then, run the script on your Linux server.


After the script finishes, your Mac and Linux server are on the same local area network.

Tailscale might overwrite the DNS settings on your Linux server, which can cause network issues. To fix this, configure a new nameserver. For example, you can use
1.1.1.1or8.8.8.8.

Mac configuration
Enable remote connections on your Mac. Go to .
Grant permissions to sshd-keygen-wrapper. Go to .
Make sure you are signed in to iMessage on your Mac.
Clawdbot configuration
Edit the configuration file at
/root/.clawdbot/clawdbot.jsonand add thechannelconfiguration.{ "channels": { "imessage": { "enabled": true, "cliPath": "/root/.clawdbot/scripts/imsg-ssh", "dbPath": "/Users/{{YOUR_USER_NAME}}/Library/Messages/chat.db", "remoteHost": "{{YOUR_USER_NAME}}@{{YOUR_MAC_MAGIC_DNS}}", "dmPolicy": "pairing", "groupPolicy": "allowlist", "includeAttachments": true } } }Note the following parameters:
YOUR_USER_NAME: Replace with your Mac's username.
YOUR_MAC_MAGIC_DNS: Replace with the Magic DNS name for your Mac from your Tailscale network.
To find your Magic DNS name:

Create a new file at
/root/.clawdbot/scripts/imsg-ssh. This script forwards commands to your Mac usingssh. Replace {{YOUR_USER_NAME}}@{{YOUR_MAC_MAGIC_DNS}} with the value from the previous step. After creating the file, make it executable.#!/usr/bin/env bash exec ssh -T {{YOUR_USER_NAME}}@{{YOUR_MAC_MAGIC_DNS}} /usr/local/bin/imsg "$@"You should now be able to connect to your Mac from your Linux server with
ssh {{YOUR_USER_NAME}}@{{YOUR_MAC_MAGIC_DNS}}and a password. You can also configure passwordless access by setting up SSH key authentication from the Linux server to the Mac.Start and initialize the gateway:
cd /home/clawdbot/ pnpm clawdbot onboard --install-daemon
Results
Connect to Chat through the text-based user interface (TUI).
Input: Send a poem to +86188xxxxxxxx using iMessage. Your Mac will send a poem to the specified phone number.
