Mautrix/iMessage BlueBubbles Connector with Beeper
In-depth noob guide
Written by @ampersandru + @matchstick Last updated 2/13/2024
Background
Follow this guide if you want to still want a unified chat experience all in Beeper. The core functionality (see bottom of page for working and non-working features of this bridge) of iMessage works very well. This bridge was created by a group of talented individuals in the Mautrix server (see bottom for more info). This guide was built off of the original guide with a bit more detailed instructions for all the newbies.
Using this bridge is as safe as it is having BlueBubbles running. There is no communication to Apple that you are using Beeper. This is just a bridge from your BlueBubbles server to Beeper, and that is inherently safe.
Prerequisites
- Installed Beeper Cloud on Windows, macOS, Android, or iOS and have an account with Beeper
- Installed BlueBubbles Server on a Mac running Sonoma, Ventura, or Monterey for best results
- (Manual only) Download BBCTL from https://nightly.link/beeper/bridge-manager/workflows/go.yaml/main
- If you have an Intel-based mac, download bbctl-macos-amd64, if you have an Apple Silicon-based mac (M1, M2, etc), download bbctl-macos-arm64. Same goes for Linux versions.
The Guide (Automated)
Use the script created by @matchstick to automate the entire install process:
https://github.com/ngencokamin/sh-imessage-setup
The Guide (Manual)
SSH into your Mac or open a new terminal window, then run the following:
- Navigate to your downloads folder with
cd Downloads
- Run
chmod +x bbctl-<your version>
(you can typechmod +x bbctl
and then press tab to autofill the filename) - Run
sudo mv bbctl-<your version> /usr/local/bin/bbctl
(a sudo command may ask for a password, use your mac's login password) - Run
bbctl login
and follow the prompts to log into your Beeper account - Replace with your BB URL for bluebubbles_url (recommend to leave it as localhost:1234) and your BB password for bluebubles_password . Ensure you keep the apostrophes (') around 'bluebubbles_url=http://localhost:1234' and 'bluebubbles_password=YOUR_PASSWORD':
The bridge should then start automatically backfilling your iMessage conversations from the past 7 days. This step may take a bit to complete. If you start seeing "DBG Received ping from BlueBubbles websocket component=bluebubbles" then you should be all set. You may see a popup to give bbctl full disk access. Say Yes and check if it has access in macOS Security & Privacy settings otherwise your bridge may not fully work.
You must either leave this terminal window open, use TMUX, or follow the automating startup guides
Note: iMessages will not have its own chat/service category in Beeper - they will just show up in the inbox. Unforunately, this is how self-hosted bridges work with Beeper.
Note
- Again, be sure you have apostrophes (') around the entire bluebubbles_url and bluebubbles_password variable and the actual value as shown in the example
- It is highly recommended that you use localhost (http://localhost:1234) or local ip (http://192.168.29.XYZ:1234) instead of your cloudflare URL. Using your cloudflare/remote url may cause the bridge to stop responding. Symptom of this would be that you can send iMesssages in Beeper but you won't receive any incoming iMessages anymore
- Some special characters (i.e. @ - etc) may cause issues with the command running. Either try adding " around the password or choose a simpler password
- Just changing the BB url or password within the bbctl command in step 5 will not update the bridge if you have run it before. Additionally, any existing chats may have issues displaying contact names and photos. In either of these instances, kill your bridge in terminal with
ctrl+c
(if currently running, runbbctl delete sh-imessage
, then start fresh from above.
Starting New Conversations with Contacts
Unfortunately, self-hosted bridges do not have integration with Beeper to start new conversations within their app, easily. You have the following options to do this if backfill did not sync a previous conversation or you want to start a new conversation with someone:
- Use the BlueBubbles App to start a new conversation - This new conversation will sync to Beeper
- (If you have your phone number linked to iMessage) Send a SMS within the Beeper app. When they respond, it should go to iMessage instead and show up in Beeper
- Use the Bridge Bot Commands
Automating Startup
As mentioned above, you must leave this bridge runnning. If you restart your machine, you will have to run the command from step 5 again. Or you can use one of the following methods to have it automatically run each time you boot up.
- Using launchd
- Follow this guide by @shadowdrake:beeper.com:
https://rentry.org/bb2hcep6
- Follow this guide by @shadowdrake:beeper.com:
- Using cron
- Follow this guide by David
https://rentry.org/bb-cron
- Follow this guide by David
Optional Features, Settings, & Options
The following are all optional.
Beeper Bot Commands
You are able to search for BlueBubbles contacts and start new iMessage conversations with them using the Beeper bridge bot
- Start a new chat within Beeper with @sh-imessagebot:beeper.local
search-contacts NAME/EMAIL/PHONE
to search for contactspm PHONE/EMAIL
to start a iMessage conversation. Phone numbers should have country code and number (i.e., +14206969696) The bot will respond with a room where you can tap to open and send a message.- You can pin or favorite this bot for later usage.
Backfill Options
If you want to modify the default backfill options from the default 7 days, ctrl+c to stop the bridge, open /Users/USERNAME/Library/Application Support/bbctl/prod/sh-imessage/config.yaml with your favorite editor and find these lines. If you are getting permission errors, you can either copy config.yaml to another folder, edit it and then drag it back or in terminal do sudo nano config.yaml
within that directory
You must update your bridge command to include --no-override-config
otherwise it will overwrite your backfill update:
Increasing Max Attachment Limit
If you want to modify the default attachment limit from the default 50mb, ctrl+c to stop the bridge, open /Users/USERNAME/Library/Application Support/bbctl/prod/sh-imessage/config.yaml with your favorite editor and find these lines. Update imessage_min_size
to whatever you want, in bytes. 1024288000
in the example below is about 975mb. BlueBubbles has a limit of 1gb itself. If you do not change from the default 50mb, anything larger than 50mb (usually videos) will upload to Beeper servers and send the other person a link to the uploaded file.
You must update your bridge command to include --no-override-config
otherwise it will overwrite your attachment limit update:
Custom Startup Command
To add a custom startup command that does not require you re-write your parameters each time, run the following commands
echo alias start-bb-server=\"<your startup command>\" >> ~/.zshrc
(note: you must include the\
before each double quote in the command). Example syntax:
source ~/.zshrc
- You should now be able to start your server using the command
start-bb-server
in your terminal.
Features
For a full list, see: https://github.com/mautrix/imessage/blob/master/ROADMAP.md
The following list compares with the Android BlueBubbles app so you can determine if you still want it installed. The table only compares to the BB server with macOS Ventura or higher with Private API enabled.
Feature | BlueBubbles App (Ventura+ w/ Private API) | BlueBubbles Bridge for Beeper (this guide) |
---|---|---|
Sending / Receiving Messages | ✓ | ✓ |
Sending / Receiving Attachments | ✓ | ✓ |
Sending / Receiving Replies | ✓ | ✓ |
Sending / Receiving Typing Indicators | ✓ | ✓ |
Receiving Delivered / Read Receipts | ✓ | ✓ |
Editing & Unsending Messages | ✓ | ✓ |
Receiving Edited & Unsent Messages | ✓ | ✓ |
Creating Chats/DMs | ✓ | ✓ (Via Bridge Bot) |
Receiving Tapbacks, Stickers, and Mentions | ✓ | ~ (Tapbacks only) |
Sending Tapbacks, Effects, Subjects, Mentions, and Rich Links | ✓ | ~ (Tapbacks only) |
Attachment Limit | Depends (100mb to unlimited) | 50mb (unless you change the default attachment limit) |
Creating Group Chats | ✓ | - |
FindMy Devices & People | ✓ | - |
Marking Chats Read or Unread on the Server Mac | ✓ | - |
Renaming, Adding, or Removing Participants, & Leaving Group Chats | ✓ | - |
Updating Group Chat Photo | ✓ | - |
Receiving Digital Touch & Handwritten Messages | ✓ | - |
Focus Mode | ✓ | - |
Deleting Messages & Chats | ✓ | - |
Checking iMessage / FaceTime Availability | ✓ | - |
Incoming FaceTime Notification | ✓ | - |
Sharing Contact Card | ✓ | - |
Downloading Purged Attachments | ✓ | - |
Getting Phone Number Registration Info | ✓ | - |
Questions, Issues, or Requests?
- In the Beeper Desktop App, click the Settings Gear (Cog) at the top, Join Matrix Room, near the top-ish right, click the drop-down and "Add new server"
- Add a server: maunium.net
- Find the iMessage Room: #imessage:maunium.net
Donate!
None of this would be possible without the recent hard work of Donovon Simpson and Christian Nuss, which built upon the foundational work of Tulir (creator of mautrix-imessage and Beeper Lead Architect) and the BlueBubbles team who supported this project, along with many community members who tested and reported their findings. To acknowledge and support these incredible folks and their continued efforts, you can donate at the following links:
- Tulir: https://github.com/sponsors/tulir
- Donovon Simpson: https://www.buymeacoffee.com/trek.boldly.go or https://github.com/sponsors/trek-boldly-go
- BlueBubbles Team: https://bluebubbles.app/donate
- Christian Nuss: https://github.com/cnuss (awaiting sponsor link)