BlueBubbles (iMessage)

Connect Hermes to Apple iMessage via BlueBubbles — a free, open-source macOS server that bridges iMessage to any device.

Prerequisites

Setup

1. Install BlueBubbles Server

Download and install from bluebubbles.app. Complete the setup wizard — sign in with your Apple ID and configure a connection method (local network, Ngrok, Cloudflare, or Dynamic DNS).

2. Get your Server URL and Password

In BlueBubbles Server → Settings → API, note:

3. Configure Hermes

Run the setup wizard:

hermes gateway setup

Select BlueBubbles (iMessage) and enter your server URL and password.

Or set environment variables directly in ~/.hermes/.env:

BLUEBUBBLES_SERVER_URL=http://192.168.1.10:1234
BLUEBUBBLES_PASSWORD=your-server-password

4. Authorize Users

Choose one approach:

DM Pairing (recommended): When someone messages your iMessage, Hermes automatically sends them a pairing code. Approve it with:

hermes pairing approve bluebubbles <CODE>

Use hermes pairing list to see pending codes and approved users.

Pre-authorize specific users (in ~/.hermes/.env):

BLUEBUBBLES_ALLOWED_USERS=user@icloud.com,+15551234567

Open access (in ~/.hermes/.env):

BLUEBUBBLES_ALLOW_ALL_USERS=true

5. Start the Gateway

hermes gateway run

Hermes will connect to your BlueBubbles server, register a webhook, and start listening for iMessage messages.

How It Works

iMessage → Messages.app → BlueBubbles Server → Webhook → Hermes
Hermes → BlueBubbles REST API → Messages.app → iMessage

Environment Variables

VariableRequiredDefaultDescription
BLUEBUBBLES_SERVER_URLYesBlueBubbles server URL
BLUEBUBBLES_PASSWORDYesServer password
BLUEBUBBLES_WEBHOOK_HOSTNo127.0.0.1Webhook listener bind address
BLUEBUBBLES_WEBHOOK_PORTNo8645Webhook listener port
BLUEBUBBLES_WEBHOOK_PATHNo/bluebubbles-webhookWebhook URL path
BLUEBUBBLES_HOME_CHANNELNoPhone/email for cron delivery
BLUEBUBBLES_ALLOWED_USERSNoComma-separated authorized users
BLUEBUBBLES_ALLOW_ALL_USERSNofalseAllow all users
BLUEBUBBLES_SEND_READ_RECEIPTSNotrueAuto-mark messages as read

Features

Text Messaging

Send and receive iMessages. Markdown is automatically stripped for clean plain-text delivery.

Rich Media

Tapback Reactions

Love, like, dislike, laugh, emphasize, and question reactions. Requires the BlueBubbles Private API helper.

Typing Indicators

Shows “typing…” in the iMessage conversation while the agent is processing. Requires Private API.

Read Receipts

Automatically marks messages as read after processing. Requires Private API.

Chat Addressing

You can address chats by email or phone number — Hermes resolves them to BlueBubbles chat GUIDs automatically. No need to use raw GUID format.

Private API

Some features require the BlueBubbles Private API helper:

Without the Private API, basic text messaging and media still work.

Troubleshooting

“Cannot reach server”

Messages not arriving

“Private API helper not connected”