Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
How can you support the project?
Donate Here (PayPal; One-Time)
Sponsor Us Here (GitHub; Recurring)
Donate via Venmo (One-Time)
QR Code (Click to Expand):
Username: @bluebubblesmessaging
If you're even looking at this page, thank you! We appreciate any donations made to this effort, large or small! Any donations made will go directly to the main developers, split evenly. If more developers choose to contribute, we will happily split the donations with them.
Our developers have put hundreds of hours into the research, design, and creation of the BlueBubbles App ecosystem. All donations will help compensate the developers for their time. All developers are doing this as a side project, in their free time.
This app is in no way affiliated with or endorsed by Apple and / or their affiliate(s), it provided is for educational purposes only. Apple, macOS, and iMessage are trademarks of Apple Inc., registered in the U.S. and other countries.
Tools and some image resources are under the Apache license, version 2.0.
Set up BlueBubbles without signing into your Google account
On the macOS device you'd like to use for the server, open the . Scroll to the bottom and download the .dmg file.
Locate the downloaded .dmg in your Downloads folder in Finder. Right click (or Ctrl + Left click) the .dmg file to Open the app. (Do not open the .dmg from the Downloads Center in the Dock!)
Apple disabled our Developer Account with no further explanation. As a result, the server app is now unsigned. The above process is required to install the unsigned app without visiting the security menus in System Preferences.
Drag the app icon to the applications folder when prompted. Right click (or Ctrl + Left click) the popup to Eject it. Finally, open the app from the applications folder, and you will be greeted with the welcome screen.
Proceed through the Intro, and Permissions steps, following the on-screen guide to enable accessibility and full disk access. Note that accessiblity is not required for BlueBubbles to function.
Once full disk access is enabled, proceed to the Notifications step. Switch to the Manual Setup tab to avoid signing in with Google.
The name of the project does not have to be BlueBubblesApp if you already have a project by that name.
Click Create a Project and enter BlueBubblesApp as the name. Disable Google Analytics (why do you want Google spying on you?) and wait for the project to be created.
In the tabs on the far left, click Build > Firestore Database.
Next, Create database and press Next > Enable. You can change the database location if you are not based in North America so it is closer to you.
If Cloud Firestore glitches and does not show you the database page, simply refresh the page.
In the tabs near the top, click Rules
Set the rule's condition from allow read, write: if false;
to allow read, write: if true;
(Change false to true) and click Publish.
Click the gear cog in the top left and click Project Settings.
In the tabs near the top, navigate to Service Accounts. Generate a new private key and save this locally. This will download file 1 / 2 needed for the manual setup.
Next, navigate to the General tab.
Scroll to the bottom of the page and click the Android icon to add an Android app. Set the package name to com.bluebubbles.messaging
and leave the other fields blank.
Click Register app, then Download google_services.json. This will download file 2 / 2 needed for the manual setup.
After getting the downloaded files, drag and drop them into the fields shown above.
Proceed to the Connection step.
Set a strong server password, and make sure to use the floppy disk icon to save it.
In most cases, Cloudflare is the proxy service you should use. If you experience any issues with it, please try the following:
Cycle your wifi connection on the client device (not the server Mac)
Restart the server app to get a new URL and repeat step 1 if necessary
Set Cloudflare DNS (one.one.one.one
) in your phone's Private DNS setting
If these fail, you can switch to Ngrok using the Proxy Service dropdown from the server settings. Ngrok may have increased outages and more rate limiting compared to Cloudflare.
Proceed to the Private API step.
Do not enable the Private API checkbox unless your requirements are passing and you have completed the setup.
Proceed to the Finish step. Here, you can customize any server settings to your liking, these are mostly cosmetic.
Be sure to visit any of our Basic or Advanced guides in the sidebar for even further configuration and customization possibilities!
You are now ready to download the app on your Android or PC!
Open the app, making sure to grant all permissions and disable battery optimizations. On the server connection step, you can use the QR code button on the server homepage to quickly connect, or type your URL and password manually. Sync your messages, and you're ready to use BlueBubbles!
On your Mac, open the and login with your Google account. Create a Firebase account and generate google_services.json
and firebase-adminsdk.json
by following the below video or written tutorial.
The Private API setup (along with its requirements) is optional! If you would like to immediately set up the Private API, please follow .
Download and install the app for your desired device from the links on our .
If you want to change the Mac server that your BlueBubbles Server runs on, you've come to the right place!
This guide does not cover redoing the Private API setup. You will need to do that on your own if you want to use those features.
On your old BlueBubbles Mac, backup the following folder:
~/Library/Application\ Support/bluebubbles-server
Open the Messages
app Settings
from the macOS status bar.
Navigate to the iMessage
tab
Turn on Enable Messages in iCloud
to backup your messages to iCloud
If you do not care to backup your messages to iCloud, skip this step
If the option wasn't already enabled, click the Sync Now
button and give your Mac some time to fully sync the messages (~24 hrs to be safe)
On your new BlueBubbles Mac, sign into iMessage and wait for your messages to sync
Note: It's always good to confirm you can send iMessages using the native Messages app before proceeding.
On your new BlueBubbles Mac, copy the bluebubbles-server
folder that you backed up, back to the ~/Library/Application\ Support/
folder.
Re-download and install the latest BlueBubbles Server from the GitHub Releases page
Run the BlueBubbles Server
If everything is running properly, you can shutdown your old Mac
Once this process is complete, make sure you reset your BlueBubbles clients! The underlying macOS database differs from one Mac to another and issues will arise if you do not perform a reset/re-sync on the client-side
If done correctly, your BlueBubbles server should use the same settings from your old Mac, including your Firebase setup, Certificates, etc.
Enjoy!
This guide helps you run BlueBubbles for multiple people on the same Mac
Create another user account on your Mac, preferably with admin capabilities
Turn on "Fast Login Switching"
When you switch between accounts on the Mac, you will want to use the Switch accounts using the menu bar method
Setup BlueBubbles on the new user
You will need to provide a different Firebase JSON and Admin SDK JSON for this user
You will need to provide a different Ngrok auth token for this user
You will need to provide a different port number for the server to use
The other user should now be able to use BlueBubbles simultaneously with the original BlueBubbles user!
You will not be able to auto-login multiple users. You can only select one user to be auto logged in when macOS first boots up, or after a power outage.
This guide will show you how to port-forward using your home's router, so you can connect directly to your BlueBubbles server using a Dynamic DNS. No need for a third-party proxy service.
Before you begin, make sure that the following pre-requisites apply to you. If any of them do not apply to you, this will not be possible for you, and you may need to stick to the build-in proxy services, pay for one, or self-host a reverse proxy.
You have access to your network's router
This doesn't need to be physical access
You will need to know how to login to your router's UI via your browser. This guide will walk you through part of it but will not provide you with the required authentication information. You must already know this.
This will not work on school or work networks
Your macOS device must already be setup (physical or VM)
Your macOS device must have a static IP Address.
If you don't already have a static IP, learn how to set one here
Read these notes before you begin, just in case...
If you are running macOS in a VM, make sure the network adapter is configured as "Bridged".
This means that the VM will connect directly to your router, rather than through the host computer.
This allows external connections to connect directly to your mac server.
By default, this setup utilizes HTTP, not HTTPS. In order to use HTTPS, you will need to know how to setup a certificate with your dynamic DNS provider. Whether that be via your router, or manual using Let's Encrypt.
This implies that your data is unencrypted when no certificate is implemented.
You can utilize the Encrypt Messages
option in the BlueBubbles server settings to protect some of your data, but not all.
If no certificate is implemented, and you are connecting over HTTP, BlueBubbles Web will not be usable. This is because browsers now require a secure connection when making API calls to a server.
Now that you've read the pre-requisites and the "before you begin" notes, you can start the setup.
Get the IP of both your router and your macOS device (or VM).
To get this information, open System Preferences
and find the Network
settings.
Click on the connected Ethernet
or WiFi
device on the left sidebar.
On the right-hand side, find the IP Address
entry, and under that, the Router
IP entry
If you do not see IP Address
or Router
entries on the right side, click Advanced
, and then select the TCP/IP
tab.
Copy those IPs somewhere you can reference.
Open your browser and navigate to your router's home page
In your browser's URL bar, enter http://<router IP>
, replacing <router IP>
with the router entry you copied earlier. If your router's home page connects over HTTPS, use https://
instead. However, the majority of routers utilize HTTP by default.
Your router's IP will typically look something like one of the following:
192.168.0.1
10.0.0.1
192.168.50.1
If you get one of those Your connection isn't private
browser pages, simply type thisisunsafe
directly into the browser window (not the URL bar) and the site should load.
When prompted to enter your login credentials, enter your username and password to login.
It's typical that the router has the default username and password printed on a sticker, on the device itself.
If you do not know your username or password, it's fairly typical for the default username to be admin
. However, the password can vary by manufacturer. A list of possible default credentials can be found here.
Next, you will need to find the Port-forwarding settings. Many routers will list it in the sidebar under Port Forwarding
, or similar. However, some routers may hide those settings under the WAN
tab in the sidebar.
If you cannot find the port-forwarding configuration page, you might have luck finding it after reading one of the guides here
Once on the port forwarding configuration page, click the button to add a new port forwarding configuration/profile.
You will be prompted to enter some information:
Name: You can enter any name
Protocol: TCP or Both
External Port: This is the port that you will use in your server URL to connect.
This can be the same as the port that BlueBubbles is running on.
Internal IP Address: The IP of your macOS device that you copied earlier
Internal Port: The port that the BlueBubbles server is configured with
Save the configuration/profile
Read the next section to figure out how to verify that everything was setup properly
This section will show you how to verify that you've port-forwarded correctly.
On your mac, open your browser and navigate to https://canyouseeme.org/
In the Port
field, enter in the External Port
you configured when setting up the port-forwarding.
Click the Check Port
button
You will receive a Success
message if you've configured port-forwarding correctly.
You will see an Error
if you did not configure port-forwarding correctly.
If your verification failed, it means something went wrong in the process. Here are some things you can try to possibly fix any issues:
Go through the guide again and make sure that everything is configured properly
If you did not setup a static IP for your mac, your mac's IP Address may have changed, and you need to configure your port-forwarding profile with the new IP Address.
Maybe you entered the BlueBubbles port into the CanYouSeeMe website, and not the External Port you configured within your router.
Run the BlueBubbles server and try again.
Once you have setup port-forwarding, the next step would be to sign up and use a Dynamic DNS service to connect your home IP Address to a domain. Here are some free Dynamic DNS providers that are fairly popular and well-liked:
Once you have one picked, sign up for a free account. And setup a new Dynamic DNS configuration.
Next, you will need to download the corresponding "DUC" (Dynamic Update Client) for your provider. This allows your mac to update the DNS record whenever it's router's external IP changes. Without it, you will lose connection to your server whenever your external IP changes.
Here are the DUC clients for the providers above:
Once the DUC is installed, login or configure it with your account.
Lastly, add the DUC app to your mac account's login items so it runs each time the computer is rebooted.
You will now be able to connect to your BlueBubbles server via your Dynamic DNS domain + Port Forwarded Port. For example: http://<dynamic dns>:<port>
In order to use your new Dynamic DNS with BlueBubbles, simply follow these steps.
Open your BlueBubbles server
Open the Settings tab
Find the Proxy Service
drop down and select Dynamic DNS
.
You will get a popup window asking you for a server URL. Enter your dynamic DNS URL + Port (i.e. http://<dynamic dns>:<port>
)
If you have an SSL Certificate, set your server URL to HTTPS instead of HTTP. Make sure to also enable Settings > Advanced Connection Settings > Use Custom Certificate
. Once enabled, a self-signed certificate (server.key
and server.pem
) will be created in ~/Library/Application Support/bluebubbles-server/Certs
. Replace both files with your certificate files. It is important to name these files exactly the same as the self-signed certificate files that were created. Note: If your certificate file ends in .crt, simply rename it to .pem.
Restart your BlueBubbles server to activate your new settings.
You should now be configured to use BlueBubbles via port-forwarding.
The following guide will show you how you can manually modify the TCC database to allow BlueBubbles to access your macOS Contacts.
This will sometimes occur after disabling SIP (System Integrity Protection) on your Mac during the setup for the Private API. We are unsure exactly why this happens, but we know how to fix it.
MacOS maintains a database of the allowed permissions. All we need to do is modify this database and manually add the BlueBubbles Server to the "allow" list for the Contacts permission.
Technical Level of Effort: Medium
Open up the Terminal app on your Mac
Use the CMD + Space
hotkey combo to open Spotlight Search and type Terminal
Run the following command to make a backup of the TCC.db
file in case of corruption
cp ~/Library/Application\ Support/com.apple.TCC/TCC.db ~/Library/Application\ Support/com.apple.TCC/TCC.db.bak
Open the TCC.db
database file using the following command:
sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db
Do not omit the ~
character from the file path
This will open the database for editing
Paste the following commands, hitting ENTER
after each one. If you receive an error when running any of the following commands, do not worry, you can ignore them.
INSERT INTO access VALUES('kTCCServiceAddressBook','com.BlueBubbles.BlueBubbles-Server',0,2,4,1,X'fade0c00000000b000000001000000060000000200000022636f6d2e426c7565427562626c65732e426c7565427562626c65732d5365727665720000000000060000000f000000060000000e000000010000000a2a864886f76364060206000000000000000000060000000e000000000000000a2a864886f7636406010d0000000000000000000b000000000000000a7375626a6563742e4f550000000000010000000a575056323735483857370000',NULL,0,'UNUSED',NULL,0,1675472593);
INSERT INTO access VALUES('kTCCServiceContactsFull','com.BlueBubbles.BlueBubbles-Server',0,2,4,1,X'fade0c00000000b000000001000000060000000200000022636f6d2e426c7565427562626c65732e426c7565427562626c65732d5365727665720000000000060000000f000000060000000e000000010000000a2a864886f76364060206000000000000000000060000000e000000000000000a2a864886f7636406010d0000000000000000000b000000000000000a7375626a6563742e4f550000000000010000000a575056323735483857370000',NULL,0,'UNUSED',NULL,0,1675472593);
INSERT INTO access VALUES('kTCCServiceContactsLimited','com.BlueBubbles.BlueBubbles-Server',0,2,4,1,X'fade0c00000000b000000001000000060000000200000022636f6d2e426c7565427562626c65732e426c7565427562626c65732d5365727665720000000000060000000f000000060000000e000000010000000a2a864886f76364060206000000000000000000060000000e000000000000000a2a864886f7636406010d0000000000000000000b000000000000000a7375626a6563742e4f550000000000010000000a575056323735483857370000',NULL,0,'UNUSED',NULL,0,1675472593);
Once complete, type .exit
and hit ENTER
to leave the sqlite3
CLI
Open the BlueBubbles Server (if not already open), and navigate to the Contacts tab
Use the Permissions -> Refresh Permission Status
button in BlueBubbles see if the Contacts permission is authorized
If it is still not authorized, use the Permissions -> Request Permission
button to try and force request the permission.
If it is still not authorized, you may need to manually enable the permission within the Security & Privacy
settings within System Preferences
If at any point, you mess up or feel like something went wrong, simply run the following command to replace the TCC.db
file with the one you backed up at the start:
mv ~/Library/Application\ Support/com.apple.TCC/TCC.db.bak ~/Library/Application\ Support/com.apple.TCC/TCC.db
Now, you can restart the process from step 2
BlueBubbles should now be able to access your macOS Contacts!
This document will guide you on how to fix issues with sending messages to international phone numbers.
Typically, when you are having issues sending messages to international phone numbers (non-US), it is due to a missing region code. When the BlueBubbles Server receives a request to send a message, it will do the following:
Checks if the phone number has a region code (i.e. +1
for US numbers)
If it does, it will be used to send the message (best case)
If no region code is provided, the BlueBubbles Server will use the region code set by the base macOS system
This is the next best option, but not always a sure-fire solution
If no region code is provided and the BlueBubbles Server cannot determine the macOS region, +1
will automatically be applied to the phone number
This is likely what is occurring, and why messages are not sent properly
The best solution to this issue is to make sure that your Contacts on your Android device includes the region code for the country the person is from.
For instance, if the person is from the United Kingdom, make sure the phone number associated with their Contact entry is something like: +44 20 7123 4567
The next best option is to set your macOS device's region to the region that the majority of your Contacts reside in.
To do this, open System Preferences
and navigate to the Date & Time
settings.
Find the Region
drop-down, and select your default region
Once you've set it, close System Preferences and then restart the BlueBubbles Server. That's it! The server should now "imply" your default region code if no region code is provided with each phone number.
We still highly advise making sure that your Contacts on your Android device already include a region code.
This page will help you troubleshoot and (hopefully) fix issues with not receiving notifications or URL changes on the Android app
Notifications and URL changes are delivered via Google Firebase Messaging (FCM). During the setup of the BlueBubbles Server, you will be given the option to setup a Google Firebase project, linked to your Google account. This allows the BlueBubbles Server to dispatch notifications to your Android device without an open connection to the server. It will also allow the server to write your latest server URL to your Google Firebase's Firestore.
If you do not complete the Firebase setup, you will not be able to receive Notifications or URL changes on Android!
If you have completed the Firebase setup, but are still not receiving notifications, it may be caused by a variety of issues. Here are a few:
You originally set up your phone with a Firebase project, but changed it at a later point (possibly accidentally)
Maybe you previously did the manual Firebase setup in the past, and more recently used the new automatic Firebase setup using the Continue with Google
in the Server.
If you have any sender mismatch ID
errors on your server, that will indicate this case.
You stopped using the BlueBubbles App for more than 30 days
The BlueBubbles Server will clear "inactive" device IDs from its database after 30 days of inactivity
Whenever you open the app, your phone will "registers" itself with the server.
You do not have any devices registered within the Devices
tab on the BlueBubbles Server
This is the first indication that you will not receive notifications
Google Firebase is being blocked by a VPN, Firewall, Proxy, or DNS Blocker
If this is the case, you'll see a Failed to start FCM Service
error on your server with an error message of dial tcp: no route to host
.
Regardless of the issue, here are some ways to fix the issue.
Sometimes you have a network outage or some other issue. Make sure that your Mac is still connected to the internet.
Sometimes -- especially when using a macOS VM -- your Mac's time can go out of sync. As in, the time does not match up with the actual time in your time zone.
To fix it, you can open your Mac's System Preferences
and open Date & Time
settings. Next, unlock the settings page by typing your password.
If your time does not re-sync after entering your password, you can try changing your time zone temporarily, then changing it back to the original.
If you are manually setting your time and time zone, you will likely need to switch to automatic setting of time and time zone.
In some cases, having a VPN, proxy, or DNS blocker may cause interference with registering your device with your Google Firebase project. As a result, you may not be able to register your device with your server, and subsequently, prevent notifications and URL changes to be dispatched to your Android device.
The following apps/tools have been seen to cause issues:
Blockada
Adguard
PiHole
Certain VPNs
Ensure that firebaseinstallations.googleapis.com
is not being blocked!
If you are using any of these apps/tools (or similar), and are not able to register your device with the server, disabling them during the BlueBubbles setup may fix the registration issues.
Open your BlueBubbles Server
and open the Devices
tab
Use the Manage
drop-down and select Clear Devices
to remove your registered devices
Open your BlueBubbles App
on Android, and open the Settings
Navigaote to the Connection & Server
page
Use the Re-configure with BlueBubbles Server
option to re-connect your Android device
You can also use the Sign in with Google
button
You can also use the Fetch Firebase Config
button
On your BlueBubbles Server
, use the Manage -> Refresh
button on the Devices
tab to see if your device is now registered.
You should now see your new device ID registered with the server, and should start receiving notifications!
I know... the classic, "have you turned it off and then on again?" line. It may sound odd, but rebooting your Mac can fix a number of issues, not just this issue.
Sometimes none of the solutions seem to work. Your next best option is to just reset the Android app.
Open your BlueBubbles App
on Android and backup your settings & themes using the Settings -> Backup & Restore
page
Navigate back to your Android launcher's home screen
Open the BlueBubbles App's settings (through Android)
Clear the storage for the app to reset it
Open the BlueBubbles App and redo the initial setup & sync
If you are using custom ROM for your Android device, it could just be that you do not have Google Play Services installed. Unfortunately, that is required to receive notifications properly. You will need to install Google Play Services via MicroG.
If none of these solutions seem to work, I think the culprit is likely your macOS environment. Make sure to check the BlueBubbles Server's errors/alerts and look for anything to indicate what the culprit might be.
For additional help, join the Discord server!
This document will guide you on how you can configure your Mac to automatically restart the BlueBubbles Server app if the app crashes (unsafe exit)
Special thanks to Scr0nch for the basis of this guide!
Open the TextEdit app on your Mac
Copy & paste the following XML into the new text file:
Note: Modify the "Program" string value to the location of your BlueBubbles.app, and/or replace {username}
with your macOS username
This will make sure that the specified program will be run when you first login to your Mac (RunAtLoad
), and will be restarted if it crashes (KeepAlive
). The SuccessfulExit: false
flag means that the app will not be restarted if the server exits successfully; for example, if you manually close the app.
Save the file to ~/Library/LaunchAgents/com.bluebubbles.server.plist
CMD + S
to save the file
CMD + Shift + G
to open a file location
Paste ~/Library/
into the popup and hit Enter
Find the LaunchAgents
folder and open it
If it does not exist, create it using the New Folder
button
Enter com.bluebubbles.server.plist
in the Save As
field
Disable the built-in autostart option in the BlueBubbles Server:
Install the launch agent and load it after the current user graphically logs in:
Immediately start the launch agent (only necessary for the first time):
Some additional notes:
To uninstall the launch agent:
To print information about the launch agent:
Info on the BlueBubbles server app
The server is primarily coded in TypeScript. Our first official stable release was published in August 2021 after extensive closed alpha and open beta testing since August 2020.
The server uses AppleScript to perform simple functions like sending messages & attachments and creating chats, and polls the chat.db
database to see when new messages come in. We provide extra functionality in the form of the Private API bundle (docs linked in the sidebar), which uses native Objective-C to communicate with iMessage itself and access much deeper functions.
Any macOS device running Sierra and newer, with iMessage activated successfully.
macOS El Capitan is no longer supported
macOS VMs are also compatible, however you must be able to use iMessage (this involves some work with spoofing your hardware to seem like a real Mac inside the VMX file). See Running a macOS VM for more details.
If you'd like the most stable experience, we recommend going with Catalina or Big Sur.
We appreciate y'all!
The following guides are to help you if you run into any issues setting up or using the BlueBubbles Server.
This guide will show you how you can troubleshoot issues with sending messages through BlueBubbles.
The first thing you need to do is make sure you are actually connected to your server. If you are not, you will need to resolve that issue first. This can be due to a variety of reasons, but here are some things you can check.
Check to see if your BlueBubbles Server is running
Check to see if the URL on the BlueBubbles App matches the URL on your BlueBubbles Server dashboard.
If it does not, follow to resolve your issues
If you are using Cloudflare, you may be hitting a DNS issue due to a newly provisioned domain
To resolve this, try turning off the WiFi on your Android device, then fully closing and re-opening the app.
You may switch back to WiFi shortly after. The goal is to flush your DNS cache so that your Android device can "find" your provisioned Cloudflare domain.
Check to make sure that you don't have a VPN, proxy, or DNS blocker (PiHole, Blockada, Adguard) interfering with the connection
If you have recently set up your BlueBubbles Server, and you are unable to send messages, it may be due to a missing permission to use the System Events
on your Mac.
Go to your Mac and check for any popups asking if the BlueBubbles Server can interact with your Mac's System Events
and allow it.
Often times, users cannot send messages from BlueBubbles, because they also cannot send messages from the native iMessage app on the Mac.
To see if this is the case, try and send a message to a Contact via the native iMessage app on your Mac. If it doesn't send, this is also why BlueBubbles cannot send messages. If the message sends, but sends as an SMS (green bubble), this may also be why BlueBubbles cannot send either.
If this is the case, this may indicate a couple of things:
Your iCloud/iMessage account h as been flagged as spam
To resolve this, you may need to chat with Apple to get your account un-flagged
The serial number of your Mac has been flagged as spam.
This is typically the case for macOS Virtual Machine deployments
To resolve this, you may need to regenerate and set a new serial number, MLB, and ROM in your VM configuration.
This may sound dumb, but often times issues with sending can be resolved with a simple macOS restart. Sometimes things can just get out of whack, and a simple restart can fix it.
If the other solutions do not apply or do not work, we recommend trying to setup the Private API. We actually recommend setting up the Private API anyways for a variety of reasons (if you are able to).
Apple isn't perfect, and sometimes the Apple Script environment gets corrupted or just temporarily broken. Apple Script is what we use to send messages when the Private API is not enabled. Generally, using Apple Script to send messages is much less reliable than using the Private API.
This is the best solution if a macOS reboot doesn't immediately fix your issue. In addition, you'll see a massive improvement in send-speed and the features you can use with BlueBubbles.
Go to the link below to learn the benefits of using the Private API, and how to set it up.
Here you'll find simple guides for using BlueBubbles
You can check to see if your Mac's time is synced by going to . It will tell you if your time is off, and by how much. It's ok to be a few milliseconds off, however, you do not want to be minutes off.
This document will help you fix slow upload speeds when connecting to your BlueBubbles Server over your LAN.
When sending attachments via BlueBubbles, upload speeds are incredibly slow when connected over your LAN (localhost/local IP)
This issue only occurs in VMware deployments with vmxnet3
is used as the network adapter.
To fix this issue, you just need to disable "TCP Segment Offload (TSO)" on your Mac.
Open Terminal
on your Mac
Run the following command: sudo sysctl -w net.inet.tcp.tso=0
Create the following file (if not created): /etc/sysctl.conf
Add the following line to the sysctl.conf
file: net.inet.tcp.tso=0
This page will show you how you can restart your server, even when your app isn't connected
This will only work if you have Firebase set up with your BlueBubbles Server. Your BlueBubbles Server will also need to be running. If your Mac is offline, shutdown, or logged out, this method will not work.
On the off-chance that you are unable to get the BlueBubbles App to connect to your BlueBubbles Server, and you also do not have remote access set up (i.e. TeamViewer or VNC), you can use this guide to force restart your server.
This will restart the BlueBubbles Server, not your Mac itself
Login to your Firebase Console
Select/Open the Firebase project linked to your BlueBubbles set up
This is likely named something like bluebubbles-e82d1
, where the part after the dash is randomly generated
The next steps will depend upon whether you've used the automated Firebase set up or the manual Firebase setup
If you used the "Continue with Google" button in the BlueBubbles Server to automate the Firebase project setup, this is what you need to follow.
Expand the Build
section in the left sidebar of your Firebase Console
Select Firestore Database
Select the server
collection (it should be pre-selected)
Select the commands
document (it should be pre-selected)
You should now see a field called nextRestart
within the fields of server/commands
Make a note of the current value of the serverUrl
field within the server/config
document
Go to https://currentmillis.com/ and copy the current "milliseconds since EPOCH"
It should be a large numeric value such as 1713753987263
Edit the nextRestart
field and paste the numeric value into it
Click Update
to save the value
If you've been using BlueBubbles for a long time, this may be how you originally setup BlueBubbles before the automated setup was available. If you did this manually, you had to create a Firebase project, enable the Realtime Database, and download the Firebase configuration files for the BlueBubbles Server.
Expand the Build
section in the left sidebar of your Firebase Console
Select Realtime Database
Select the config
tree item
You should now see a field called nextRestart
Make a note of the current value of the serverUrl
field
Go to https://currentmillis.com/ and copy the current "milliseconds since EPOCH"
It should be a large numeric value such as 1713753987263
Edit the nextRestart
field and paste the numeric value into it
Deselecting the field should apply the new value
Once the nextRestart
field has been edited, the server will detect the modification, and restart. This restart process may take a couple of minutes, so be patient.
If the BlueBubbles Server has successfully restarted, your serverUrl
should update with the newly assigned URL (if you are using a proxy service)
Your BlueBubbles Server is not running
Your Mac Server may be offline or not connected to the internet
Your home network is blocking connections to Firebase
Your home network is blocking connections to your proxy service
Here, you will find guides on virtualizing macOS, whether that be in a virtual machine, or in a docker container.
View the child-pages for guides on how to setup your own macOS Virtual Machine. We have guides in this GitBook, as well as external guides for specific environments & deployments.
This guide will show you how you can free up storage that the BlueBubbles App is taking up
You likely receive a fair amount of images, videos, and other attachments from your friends. You may not realize, but after a long time these start to take up a lot of storage space.
Luckily, there is a quick way to resolve this issue, built right into the BlueBubbles app.
Open the BlueBubbles App
Open Settings
via the 3 dot menu
Scroll down to the bottom and click on Reset
Click Remove Attachments
Do not click Yes
or else it will clear all of your chat data, and have you re-sync with your server.
Now, check the storage space used by the app, and it should be significantly less.
Currently, we don't automatically purge old attachments, however, it's something that we may implement in the future.
Learn how you can generate an SSL Certificate using CertBot for BlueBubbles. This is especially useful for dynamic DNS setups.
This guide is for users who are using a dynamic DNS setup, and still want to benefit from the security of using SSL certificates to encrypt traffic over HTTPS.
When using a dynamic DNS with BlueBubbles, traffic is not encrypted by default and communication is done over HTTP. In setups such as ones using the Cloudflare or Ngrok proxy services, they get their traffic encrypted via the secure tunnel that is created, and can be accessed using HTTPS.
In order to use a Dynamic DNS setup and have your traffic encrypted, you'll need to setup certificates for the BlueBubbles server to use.
Open Terminal on your Mac and follow these instructions
Install CertBot using the instructions on their website, up to and including step 4: https://certbot.eff.org/instructions?ws=other&os=osx&tab=wildcard
Go to the following link to see if your dynamic DNS provider is supported by CertBot: https://eff-certbot.readthedocs.io/en/latest/using.html#dns-plugins
Scroll down to the bottom to find 3rd-party plugins
Run the following command to install your corresponding dynamic DNS plugin
$(brew --prefix certbot)/libexec/bin/python -mpip install {{plugin_name}}
Replace {{plugin_name}}
with the name of your dynamic DNS plugin. For example: certbot-dns-cloudflare
The following will setup a directory in your home folder called certbot
where all your configs and certificates will be stored.
Run the following commands in Terminal:
mkdir -p ~/certbot/config ~/certbot/work ~/certbot/logs ~/.config/letsencrypt
This will create the 4 required directories
echo "config-dir = ~/certbot/config\nwork-dir = ~/certbot/work\nlogs-dir = ~/certbot/logs\nkey-type = rsa" > ~/.config/letsencrypt/cli.ini
This will set the directory variables in the Let's Encrypt CLI config file
You will now create your certificate using the dynamic DNS plugin you identified in step 4 of Installing CertBot.
Run the following command in Terminal, replacing {{plugin_flag}}
with your plugin's CLI flag:
certbot certonly {{plugin_flag}}
Cloudflare Example Plugin Flag: --dns-cloudflare
By default, your certificate only lasts a set amount of time. In order to automatically renew your certificate, you will need to configure an app called cron
on your Mac.
Open Terminal and run the following command to open cron
's configuration:
crontab -e
Hit the i
key on your keyboard once
Paste the following line into the text area in your Terminal:
0 0,12 * * * /usr/local/bin/python3 -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot renew -q --post-hook "killall BlueBubbles ; sleep 10 && open -a BlueBubbles"
Hit the Escape
key, then type :wq
and then hit Enter
The cron
configuration is now saved and your certificate will auto-renew. To check that the renewal process is working, wait at least 12 hours, then check the certbot logs located at ~/certbot/logs/letsencrypt.log
. If you don't see any recent logs, then it's possible the paths in the crontab are not correct. Run the following command and verify the output matches the paths in the crontab entry.
echo "\nPython Path: $(command -v python3) \nCertbot Path: $(command -v certbot) \n"
In order to use a dynamic DNS, you'll need to setup port-forwarding so incoming requests to your router will be forwarded to your Mac.
Follow the guide here on how to do that: https://docs.bluebubbles.app/server/basic-guides/port-forwarding-and-dynamic-dns
Open the BlueBubbles Server
Open the Settings tab
Set your Proxy Service
to Dynamic DNS
Set your Dynamic DNS URL using https://
Expand the Advanced Connection Settings
section
Enable the Use Custom Certificate
option
Run the following commands, replacing {{domain}}
with your domain for your Dynamic DNS
rm ~/Library/Application\ Support/bluebubbles-server/Certs/server.key
rm ~/Library/Application\ Support/bluebubbles-server/Certs/server.pem
ln -s ~/certbot/config/live/{{domain}}/privkey.pem ~/Library/Application\ Support/bluebubbles-server/Certs/server.key
ln -s ~/certbot/config/live/{{domain}}/fullchain.pem ~/Library/Application\ Support/bluebubbles-server/Certs/server.pem
Restart the BlueBubbles Server
If it all worked correctly you should be able to now configure your clients to point to your new secure server URL!
You can verify that your SSL certificates are setup properly if you can access your server URL using https://
in your browser. You should see the BlueBubbles Landing Page.
This guide will show you how to setup your own dynamic DNS using your own self-hosted server, running Nginx Proxy Manager
NGINX Proxy Manager with port 80 and 443 forwarded properly
Bluebubbles server running and accessible from the machine which is running NGINX
Set Proxy Service to Dynamic DNS. Set your hostname to be https://bb.yourdomain.com
Keep Use Custom Certificate
off
Ensure the local port is 1234
Add a new Proxy Host in NGINX
Set the domain name to bb.yourdomain.com
Set scheme to http
Set Forward Hostname / IP to the IP address of your mac
Set Forward Port to 1234
Turn on Block Common Exploits
& Websocket Support
Click on the SSL Tab
Click on the dropdown and select Request a new SSL Certificate
Check all 4 options
Your Bluebubbles instance should now be accessible at https://bb.yourdomain.com
!
Guide created by @pablito in the BlueBubbles Discord
This document will show you how you can fix the blank white screen issue when opening the BlueBubbles Server
The BlueBubbles Server may open to a blank white screen (no UI). This will prevent you from setting up the server and/or interacting with it.
Here is what the issue would look like:
This is an environmental issue caused by some sort of conflict between Electron's network & OpenCore. Electron is the framework the server uses to run, and for whatever reason, some users run into an issue where the server's UI is rendered useless when SIP is disabled.
From what has been reported to us, this only occurs in environments that meet the following criteria:
macOS Ventura+
SIP disabled through OpenCore
The fix for this should be pretty straightforward, and involves adding an additional boot-arg to your OpenCore deployed Mac.
In your config.plist
add the following to your boot arguments under NVRAM>Add7C436110-AB2A-4BBB-A880-FE41995C9F82
boot-args | string | ipc_control_port_options=0
Finally, reboot your Mac and the issue should be fixed.
This page will guide you on how you can link your phone number with your iMessage account. By default, BlueBubbles will use your iCloud email to send iMessages.
The following links are to external websites that are not affiliated with BlueBubbles and their content can change at any time. Use at your own risk.
The following guide is maintained by a BlueBubbles community member and is a really good resource to find out information about registering your phone number using SIM-swapping
The following guides do not require you to have a jailbroken iPhone to accomplish phone number registration
The following guides require you to have a jailbroken iPhone to accomplish phone number registration
Sometimes VMs/Hackintoshes/Patched Macs can be a bit finnicky to disable SIP - oftentimes you will only end up with SIP partially disabled when running csrutil disable
in the terminal.
Here are some steps that have worked for our users running various different unofficial macOS.
Use the OpenCore Configurator and check the following boxes:
Once complete, build OpenCore again and reboot. Done!
Mount the EFI Partition using OpenCore
Open the config.plist file in the OC folder (I opened in OpenCore)
Create two entries:
NVRAM -> Delete -> 7C436110-AB2A-4BBB-A880-FE41995C9F82 -> csr-active-config
NVRAM -> Add -> 7C436110-AB2A-4BBB-A880-FE41995C9F82 -> csr-active-config: Value: 67000000
Start by booting to macOS and opening a Terminal application window. Next, enter the command given below. This will create a NVRAM variable with the desired value, but misspelled variable name. This misspelling will be corrected in a later step.\
Shutdown macOS. Add the following to the bottom of the VMX file:\
Save the VMX file and boot up macOS.\
You should be brought to the Boot Manager screen below. Select the EFI Internal Shell
, as shown below.\
Set the current filesystem to the EFI volume. This should be the mapped fs0
filesystem, so you would enter the following\
Next, verify the label is EFI
by entering the command below.\
If wrong, then try fs1:
, fs2:
, fs3:
, ....\
Enter the command below to save the Asr-active-config
variable to the file csr.bin
.\
Next, enter the command below to edit the csr.bin
file.\
You will need to correct the spelling by replacing the letter A
with the letter c
. The can be done by typing a 63
over the 41
on the first line. The corrected file will appear as shown below. When finished save the changes and exit.
Enter the command below to create the csr-active-config
variable in NVRAM.\
SIP will now be disabled on the next boot of macOS. If desired, enter the command below to remove the Asr-active-config
variable from NVRAM.\
Enter the command below to leave the command shell.\
From the Boot Manager
, select Mac OS X
to boot macOS.\
Shutdown your VM
Choose Power on to Firmware from the Virtual Machine menu
Select “Enter Setup”
Boot from a file
Arrow down to Recovery HD
Hit enter until you can pick boot.efi
Select boot.efi
Hit enter
You are now in recovery mode - open terminal from the Utilities menu, type csrutil disable
, and reboot your VM.
SIP should now be disabled and you can proceed with setting up the Private API!
Here you will find more advanced guides for using BlueBubbles
How to enable iMessage after successfully creating an unofficial Mac device
iServices are 99% likely to not run on your unofficial Mac until you successfully spoof the required items to disguise your VM as a real Mac.
If you made your macOS install using OpenCore, follow their to enable iServices.
If you made your macOS inside VMWare, here is how you can enable iServices:
This guide is tailored to work on Catalina only. We recommend using Catalina initially and upgrading to Big Sur later because Apple changed how iMessage activation worked in Big Sur.
AMD USERS PLEASE READ
If you followed an AMD guide that required you to change your VMX file so that the VM will boot, you will need to use the model number that the guide used, along with other modifications to the VMX.
****Our guides suggest using MacBookPro14,3
- use this in GenSMBIOS.
The board-id
for MacBookPro14,3
is Mac-551B86E5744E2388
.
You should also use smbios.reflectHost = "FALSE"
instead of TRUE
.
If you would like to use a lower macOS version than Catalina, you will need to use a different model number than MacPro7,1
in step 1 of the guide. This is because that model initially launched with Catalina, so it does not support lower macOS versions. A good model to try that supports High Sierra and higher is iMacPro1,1
.
Follow the OpenCore guide linked above, but only complete the following sections (make sure to save all information from these sections for later use):
Using GenSMBIOS
You will want to use the model number MacPro7,1
. Verify your serial numbers using the You have got a good serial number when the page highlights the entry box in red and says Please enter a valid serial number.. As long as it was correctly copied from GenSMBIOS you should be good to go.
Choose a Mac Address
Derive the corresponding ROM Value
Open up a Notepad window, and type the following information (you will need this later): (AMD USERS PLEASE MAKE SURE TO READ THE ORANGE NOTE ABOVE)\
Fully close your VM and VMware. Nothing VMware related (besides this guide of course) should be running.
Open File Explorer, click Documents, open the folder named Virtual Machines, open the folder with the name of your VM, and find your .vmx file (VMware virtual machine configuration). Open it with Notepad.
Scroll to the line board-id.reflectHost = "FALSE"
and replace FALSE
with TRUE
.
Find the line firmware = "efi"
and paste everything from the other Notepad window right below this.
Find the line ethernet0.addressType = "generated"
and replace generated
with static
.
Find the line ethernet0.generatedAddress = "xx:xx:xx:xx:xx:xx"
and replace the entire line with ethernet0.Address = "<YOUR CHOSEN MAC ADDRESS>"
Find the line ethernet0.generatedAddressOffset = "0"
and replace the entire line with ethernet0.checkMACAddress = "false"
.\
Save the .vmx file inside Notepad, boot it up, and try signing into your Apple ID from within the iMessage app. If all went well, you will be able to sign in and send messages.
You cannot sign into iMessage at this time ... contact Apple Support and provide the code below. This issue can be one of two things:
Go to System Preferences and go in iCloud, make sure you are logged in - if yes, proceed to the below:
You will need to do what the popup says and call Apple Support.
You need to just say something like I just got this Mac from <online reselling store in your country> and I can't sign in and it gives me a customer code
Sometimes it takes a couple calls because the support person doesn't know what the customer code is
It helps to have photos of the customer code
Once you've got someone who knows what they're doing, it's a 5 minute process - they enter something server side, then you restart your Mac, and it works
Run the following in terminal:
Reboot once done.
This document will guide you on how to setup a macOS virtual machine on your Windows operating system. This guide has a lot of steps, but I promise it's not hard. It's mainly to provide all the context and information to make the setup easy to follow. I've also broken the steps down into multiple sections in order to make it easier to understand.
Make sure that your PC has Virtualization enabled in the BIOS. If you do not know if you have virtualization enabled, open Task Manager's Performance
tab:
If virtualization is disabled, you need to boot into your PC's BIOS and enable it. Now, enabling it will be different per-vendor, however, here are 2 YouTube videos that may help:
The first step in setting up a virtual machine is getting an image that is compatible with our virtualization software, in this case, VMWare. To do this, we will use OpenCore. The following instructions are a shortened form of the full OpenCore Install Guide:
Note: This method is preferred over downloading an existing ISO from the internet because you never know when the integrity of an ISO from the internet might be compromised.
Download the latest release of OpenCore.
Choose the zip
file labeled with RELEASE
.
Extract the OpenCore ZIP file, and open the extracted folder.
Navigate into Utilities\macrecovery
.
Holding Shift
on your keyboard, right-click your explorer window and select Open PowerShell window here
.
Run the python command corresponding to the macOS version you want to download, found in the OpenCore Install Guide.
Running the command will download the BaseSystem.dmg
image from Apple's servers
macOS Ventura
If you'd like to download macOS Ventura, use the command below:
This is not recommended for inexperienced users!
Next, cut/copy the BaseSystem.dmg
file (generated in the macrecovery
folder), to your user profile's Documents
folder
Now that you have the BaseSystem.dmg
file, we will now need to convert it into a format that VMWare can understand and load. In order to do that, we need to use yet another open-source tool called QEMU
. Follow the steps below to learn how to use it.
This is a short guide to show you how to install QEMU
, an open-source tool for working with disk images.
Download QEMU
for Windows.
You will see a bunch of folders with years on them. Ignore those. Download the qemu-w64-setup-XXXXXXXX.exe
installer.
Run the installer once the download completes.
If you get a Windows SmartScreen alert, allow the installer to Run Anyways
.
If you get an error during installation saying a file cannot be written, just click the Retry
button in the prompt.
The installer will install files to C:\Program Files\qemu
(Optional). You may want to add the C:\Program Files\qemu
path to your Windows System Environment Variables
This is optional because I will be using the full path to qemu-img
in the rest of the guide.
If you are non-technical or a beginner, I would skip this step.
Now that we've installed QEMU
, we need to use it to convert the BaseSystem.dmg
to a VMWare .vmdk
disk image.
Open Explorer
and navigate into your Documents
folder (where your BaseSystem.dmg
is located).
Holding Shift
on your keyboard, right-click your explorer window and select Open PowerShell window here
.
Run the following command to use QEMU
to convert the image to a .vmdk
.
& "C:\Program Files\qemu\qemu-img.exe" convert -O vmdk -o compat6 BaseSystem.dmg recovery.vmdk
You will now have a recovery.vmdk
file in your Documents
folder that you can use with VMWare.
In order for you to even be able to load a macOS system into VMWare, you will need to use a third-party program called Auto-Unlocker
to patch your VMWare installation.
You should have either VMWare Workstation Player (free), or VMWare Workstation Pro (paid) installed
Download Auto-Unlocker
.
Extract the downloaded zip
file.
Run the Unlocker.exe
file.
This will bring up a GUI to patch your VMWare installation
The app will attempt to auto-fill the install locations. However, if they are empty, please locate and select your VMWare installation folder.
Click the Patch
button
Once the patching is complete, you may close the Unlocker app.
Download Unlocker
.
Extract the downloaded zip
file.
Run the win-install.cmd
file as an Administrator
This section will detail how to create the base virtual machine using the recovery disk we created earlier.
Pre-requisites
You should have either VMWare Workstation Player (free), or VMWare Workstation Pro (paid) installed
You should have patched your VMWare installation using the Unlocker app
Instructions
Open VMWare and click File -> New Virtual Machine
Select Custom Installation
and start navigating through the New Virtual Machine setup screens.
On the Guest Operating System Installation
page, select, I will install the operating system later.
On the Select a Guest Operating System
page, select Apple Mac OS X
, as well as the corresponding macOS version.
On the Processor Configuration
page, select 1
for the Number of processors
.
For the Number of cores per processor
, select a number that is within your computer's resource constraints.
On the Memory for the Virtual Machine
page, we recommend the following:
Minimum: 4096 MB
Recommended: 8096 MB
On the Network Type
page, select Use network address translation (NAT)
.
On the Select a Disk
page, select Use an existing virtual disk
.
On the Select an Existing Disk
page, browse & select the recovery.vmdk
disk we created earlier.
Finish the setup.
Edit your Virtual Machine's settings.
Add a new piece of hardware.
On the Hardware Type
page, select Hard Disk
.
On the Disk Type
page, select SATA
.
On the Select a Disk
page, select Create a new virtual disk
On the Specify Disk Capacity
page, enter an amount that makes sense
Minimum: 50 GB
Recommended: 80 GB
Complete the Hard Disk setup.
This section will detail how to patch your virtual machine in order to properly run macOS and get iServices setup.
Navigate to your virtual machine's files
The virtual machine's files are located here: C:\Users\<username>\Documents\Virtual Machines\
Create a backup of your virtual machine's .vmx
file
You can just copy and paste it into the same directory, appending .bak
to the filename.
Open your virtual machine's original Configuration File
(.vmx
) in a text editor (i.e. Notepad)
Paste the following line into the .vmx
file and save it.
If you have an AMD CPU, also add the following to your .vmx
file.
macOS Ventura
If your VM is macOS Ventura, you may need to add (or edit) the following to enable internet connectivity:
Once you've edited the .vmx
file, you should be able to boot the virtual machine normally.
Common Issues
If you are having issues performing the initial boot for the virtual machine, take a look at the most common issues below.
Stuck on Apple Boot Logo: If you attempt to boot your virtual machine and it's stuck on the Apple Boot Logo, do the following to fix the issue. Power off the Virtual Machine, then open the virtual machine's settings. Once the settings window opened beside the Hardware
tab click on Options
. Change the Apple Mac OS X
selection to Microsoft Windows
then click OK. Power on the virtual machine again. Once all installed then go back to settings and set it back to Apple Mac OS X
The CPU has been disabled by the guest operating system: Enable virtualization in your computer's BIOS
There are guides on YouTube describing how to do this.
Feature 'cpuid.ds' was absent, but must be present: This is due to a corrupted vmx file. Try using a backup of your .vmx
file and edit the .vmx
file carefully this time.
Make sure that your editor is not converting the quotes ("
) to "greek" quotes
This virtual machine requires AVX2 but AVX is not present. This virtual machine cannot be powered on: This is due to a corrupted vmx file. Try using a backup of your .vmx
file and edit the .vmx
file carefully this time.
Make sure that your editor is not converting the quotes ("
) to "greek" quotes
Module 'featurecompat' power on failed: In your .vmx
file, make sure that your editor is not converting the quotes ("
) to "greek" quotes
Once you're able to boot into the recovery setup, follow these steps to properly install macOS.
Note: You may want to power off your virtual machine and take a snapshot before continuing. If anything goes wrong during setup, you can always revert back to your snapshot.
Select Disk Utility
and hit Continue
.
On the Disk Utility
page, select the Hard Disk you created.
This is not the one labeled, macOS Base System
With the Hard Disk selected, click Erase
in the top right of Disk Utility.
This will format the hard disk into a format that macOS can use.
Close Disk Utility.
On the recovery page, select Reinstall macOS <version>
and hit Continue
.
Continue through the setup, accepting the license agreement(s).
When prompted to select the disk to install macOS, select the disk you just formatted.
Wait for the operating system to be installed.
Once the operating system is installed, navigate through the macOS setup.
You do not need to sign into an Apple ID when prompted.
Create your macOS computer account, finish the setup, and login.
Note: Once everything is setup, you may edit the Virtual Machine's settings and remove the recovery.vmdk
Hard Disk. Do not delete the Hard Disk you created manually (to store the install). Note 2: You may want to power off your virtual machine and take another snapshot before continuing.
By default, your macOS deployment will not support iServices such as iMessage. In order to support iServices, additional configurations must be done. We will accomplish this by utilizing a tool called Clover Configurator
.
Boot up your macOS virtual machine and login.
Open Safari and download Clover Configurator
.
Open Clover Configurator
.
You may need to allow it to run via System Preferences -> Security & Privacy
.
Once opened, navigate to the SMBIOS
tab in the sidebar.
Find the up/down arrow button under the large "question mark" image, and to the right of the Update Firmware Only
checkbox.
Click on the up/down arrow button and select any product made in 2019 or newer.
We recommend MacPro7,1
or iMac16,1
Copy the following configuration to an editor (i.e. Notepad), on your host computer (Windows).
In Clover Configurator, click the Generate New
button next to the Serial Number
field to generate a new serial number.
Copy & paste the following Clover Configurator SMBIOS fields into the configuration from above:
AAA
: Replace with your Board ID
(i.e. Mac-XXXXXXXXXXXXXX
)
BBB
: Replace with your Product Name
(i.e. MacPro7,1
)
CCC
: Replace with your generated Serial Number
In Clover Configurator, click on the Rt Variables
tab in the sidebar.
Click on the Generate
button next to the ROM
text.
Copy & paste the following Clover Configurator Rt Variable fields into the configuration from above:
DDD
: Replace with your generated ROM
EEE
: Replace with your generated MLB
Close Clover Configurator & shut down your macOS virtual machine
Open your virtual machine's .vmx
file. The same one you edited earlier in the setup guide.
The virtual machine's files are located here: C:\Users\<username>\Documents\Virtual Machines\
Paste your completed configuration above into the .vmx
file.
Find the board-id.reflectHost
configuration and verify that it is set to "TRUE"
.
Find the ethernet0.addressType
configuration and change it from "generated"
to "static"
In your browser, go to the following link to grab an "OUI" for the configuration:
The OUI contains 3 segments, each containing 2 characters.
It does not matter which OUI you choose. Choose any.
Find the ethernet0.generatedAddress
configuration and change the first 3 segments to match the 3 segments of your chosen OUI.
Example: If my current generatedAddress
is 00:0c:29:bb:91:7f
, and I've selected the OUI, 00-1F-F3
, my new generatedAddress
will be 00:1f:f3:bb:91:7f
It's recommended to use lower-case characters for the alphabetical letters.
Rename the ethernet0.generatedAddress
configuration to just ethernet0.Address
Replace the ethernet0.generatedAddressOffset = "0"
configuration with ethernet0.checkMACAddress = "FALSE"
Save and close the .vmx
file.
Your macOS virtual machine should be good to go! You now should be able to sign into iMessage and use the other iServices. Boot up your virtual machine and sign into iMessage to verify everything is working correctly.
Note: If something failed during setup and your macOS virtual machine will not boot, restore from an earlier snapshot and redo part of the setup!
Here are a few final checks to make sure that your macOS virtual machine is setup correctly.
When the macOS virtual machine is booted & running, click on the Apple Logo
and select About this Mac
. Verify that the serial number listed matches the serial number you configured in the steps above.
Open System Preferences
and open your Date & Time
settings. Verify that your timezone is set correctly and your time is properly synced.
If your time synchronization is misaligned, you can synchronize it by opening Terminal
and running this command: sudo ntpdate -vu time.apple.com
This guide will show you how to setup the BlueBubbles Docker container to run as a service on your Linux host. This is to make sure that the host starts up when your Linux host restarts.
If you do not have a physical Mac at your disposal and if you already have a Linux home server, it is relatively easy to turn BlueBubbles into a systemd service which you can configure to run at startup. This way, when your home server starts or reboots, it BlueBubbles automatically starts up.
BlueBubbles does have to be initially configured manually, including a full install of a macOS VM. However, using Docker-OSX makes this configuration much easier. If you are not already running BlueBubbles in a Docker-OSX container, first follow our guide on Configuring BlueBubbles in a container with Docker-OSX.
Once you are done configuring Docker-OSX and your BlueBubbles install:
. This will make the boot faster and allow the BlueBubbles server to start automatically.
In your BlueBubbles server settings, enable "Startup with MacOS".
If using the Private API, ensure that MacForce launches at start:
MacForge Preferences > "General" tab > Check "Launch MacForce at Login"
Create a new systemd service:
2. Enter the following:
It's recommended that you replace the value of ExecStart
with the script you made in Step 11 of the Configuring BlueBubbles in a container with Docker-OSX guide. If you do choose to paste the above code block into your new systemd service file, you will at least need to replace $PWD
(in the -v
options) with the full path to your Docker OSX virtual disks.
Alternatively, it is possible to point to the script file you saved. In that case, replace the ExecStart
line with this instead:
NOTE: If using podman, replace docker.service
with podman.service
and the docker run
command with podman run
.
3. Reload the systemd daemons:
4. Enable the service to start it at boot, and activate it now:
Expand the sidebar for this page to see various guides to help you set up a macOS VM.
If iMessage will not let you sign in, make sure to follow .
If you plan to make your VM in Windows, we highly recommend using VMWare Workstation Pro rather than Workstation Player. (License keys may or may not be available online, we do not condone this, however).
This is by no means an easy process, and it is not guaranteed to work. We recommend using real Mac hardware to avoid compromising your Apple ID, you can find cheap Mac Minis (2009) on eBay for around $50-$75.
Feel free to join our Discord, linked in the header above, if you need any help!
Pros:
Static URL, so no need to update Dynamic DNS in BlueBubbles server
Auto start at boot
You can configure a custom landing page to block unwanted connections to your server (in addition to the default one in BlueBubbles)
Cons:
You need a domain to link to Cloudflare (subdomain services like DuckDNS and No-IP won't work)
Setup is a tad bit more complicated
Sign up for a Cloudflare account at
Add a site on the portal
Enter your domain name (do not use a subdomain)
Click the free plan and click continue
If you are using the domain for any other websites copy the records below (if you are just using the domain for BlueBubbles you can skip this part)
Configure your domain name servers to Cloudflare
Wait for Cloudflare to validate your domain
Select Create a tunnel
Enter a name for your tunnel. For example, you could name it Bluebubbles.
Select Save tunnel
After installing cloudflared, you can see that when choosing your OS as Mac, cloudflare provides a command to enter into terminal. Run this command.
Once the command has been run successfully, your connector will show up underneath the command in the Zero Trust Dashboard.
Select Next
Now in the Public Hostnames tab, type in your subdomain, for example, bluebubbles.(This does not have to be the name of your tunnel)
Choose the main domain you want to use for it.
Below, you should see a section called Service. For this, you want to put the localhost address for the bluebubbles server. The default one would be: HTTP://localhost:1234 .
Save the tunnel
After doing this, you may need to run sudo launchctl start com.cloudflare.cloudflared when initially setting up the tunnel to start it.
As we installed cloudflared as a service, it should automatically launch at startup.
Navigate to the settings page of the server app
Change the proxy to dynamic dns
For the URL, type in the url displayed in the tunnels section of the Zero Trust dashboard. Make sure you use HTTPS as cloudflare uses that by default.
Now try opening the bluebubbles app and see if it connects.
It is recommended that you ensure the server is fully working and the app is connecting before proceeding.
Select Create Service Token.
Give it a name (This does not have to be the name of your server) like "bb".
Set the duration to as long as you want before a new token is required (Non-expiring means you'll not have to reset this in the future).
Click Generate Token.
Record somewhere the Header and client ID and the Header and client secret. Hit Save.
From the left hand menu go to Access > Applications.
Select Add an application, and select Self-hosted.
Leave everything as default unless specified below.
Under Application Name put "Blue Bubbles".
Under Subdomain set to the subdomain you used during "Setting up Cloudflare tunnels with your domain" above for example, "bluebubbles"
Under Domain select the main domain you used for it.
Click Next.
Under Policy name, insert "servicetoken".
Set Action to Service Auth.
Under Configure Rules, change Selector drop-down to Service Token and select the service token name you set in step 4 above.
Click Next & click Add application.
In the Blue Bubbles app on Android (or Windows etc), under "Settings/Connection & Server" scroll down to "Configure Custom Headers".
Add Header Key "cf-access-client-id" and set Value to your client id (remove "CF-Access-Client-Id:" from the start - ie only insert alphanumericstring.access)
Add Header Key "cf-access-client-secret" and set Value to your client secret (remove "CF-Access-Client-Secret:" from the start - ie only insert longalphanumericstring)
Hit OK.
Test syncing your messages by selecting "Manually Sync Messages" for the last hour.
In Cloudflare, from the left hand menu, go to Access > Service Auth and refresh the browser.
"Last Seen" should be updated to shown the Service Token has been used.
Congrats - your Blue Bubbles server is now secured so only your app can access it.
This page will show you multiple options for preventing your mac from sleeping. While there are multiple ways, we do have a recommended way... see below.
Amphetamine is a free app on the macOS App Store that allows you to better control when your mac device or VM goes to sleep. With this app, you'll be able to prevent your mac from sleeping due to inactivity, from turning off the display, as well as when you close your laptop lid.
This solution is the best all-around solution, with the only downside being that you need to download an additional App.
Note: Remember to add this to your user accounts login items so it starts up on each reboot.
Believe it or not, the BlueBubbles server has a feature built into it to prevent your macOS device from sleeping. If you scroll about half-way down the settings page in the server, you should see a toggle for Keep macOS Awake
. Toggle it on to prevent your mac from sleeping.
This does not prevent your mac from sleeping when you close your laptop lid (if applicable)
While the previous solutions are great, macOS does have some built-in battery options within System Preferences. Just note, these settings are only available for physical mac devices, not virtualized macOS deployments.
To find these settings, open the System Preferences
App and find the Battery
settings. You can also access them by clicking the Battery icon in your macOS status bar, then selecting Battery Preferences
. Once there, check out the Battery
and Power Adapter
settings.
On the Battery
page, you may want to configure the settings to never turn the display off, as well as disable the Enable Power Nap while on battery power
toggle.
You may want to apply similar configurations to the Power Adapter
tab. As well as enabling the Prevent computer from sleeping automatically when the display is off
option.
You may also see a checkbox for Put hard disks to sleep when possible
. Make sure that checkbox is not checked (disabled).
If you are not having success with the previous solutions, there is another app you can download directly from the macOS App Store to prevent your mac from sleeping. The tool is called "Jolt of Caffeine" and it works very similarly to Amphetamine.
You should have Python installed:
Download Link:
Download Link:
Reference:
VMWare Workstation Player (free): ()
VMWare Workstation Pro (paid):
VMWare Workstation Player (free): ()
VMWare Workstation Pro (paid):
Website:
If you are unsure, you can open Safari and go to to see if your time synchronization is misaligned.
Login to the Zero Trust dashboard at and go to Networks > Tunnels.
Next, you will need to install cloudflared and run it. You can install it here,
Login to the Zero Trust dashboard at and go to Access > Service Auth.
How to build the server on your own system, or how to contribute to the project
NodeJS: https://nodejs.org/en/
Yarn Package Manager: https://yarnpkg.com/
Git: https://git-scm.com/
Code editor. Here are a few recommended editors:
Once you have a code editor installed, remember to install all of the required plugins/extensions such as the following:
Typescript
ESLint
Prettier
Clone the repository
git clone git@github.com:BlueBubblesApp/BlueBubbles-Server.git
Navigate into the repository on your local machine
cd BlueBubbles-Server
Install the server dependencies
yarn
Run the dev server (this will start both the renderer and server)
yarn run start-dev
We encourage all contributions to this project! All we ask are you follow these simple rules when contributing:
Write clean code
Comment your code
Follow Typescript and React best practices
Backend Code: /src/main
BlueBubbles Server: /src/main/server/index.ts
Description: This class is the main entry point to the whole backend. This classes manages the ngrok connection, the config database connection, the socket.io connection, and handles any inter-process-communications (IPC) from the "renderer" (UI).
BlueBubbles Types: /src/main/server/types.ts
Description: Holds the types for the BlueBubbles server. Defines what fields are required and optional, as well as which keys are required in a request/response
iMessage Library: /src/main/server/api/imessage
Description: This directory contains all of the classes and code needed to communicate with the iMessage Chat database. We use TypeORM as our decorator library for connecting to the database. This allows us to request information from the database in an object-oriented way
iMessage Database Models: /src/main/server/api/imessage/entity
Description" This directory contains all of the entities within the iMessage Chat database. These are also known as database "models". They defined the columns and their types. These files determine what "properties" are associated with each entity, and what we can get from the database table
iMessage Database Transformers: /src/main/server/api/imessage/transformers
Description: This directory contains what we cann "transformers". They allow us to automatically convert values that we get from the database, as well as insert into the database. These are super helpful for the iMessage database. One instance they really help is with date conversions. iMessage stores dates as seconds since 2001. This is opposed to a "normal" seconds since EPOCH. On top of that, they switched the date formats from v10.12 to v10.13. The transformers allows us to seemlessly convert those date without having to worry about it in our "fetching" code. There are also transformers for integers to booleans as well as reaction IDs to strings
iMessage Database Listeners: /src/main/server/api/imessage/listeners
Description: These classes are "listeners". They allow you to listen on certain things. For instance, the MessageListener allows you to "listen" for new messages. It does this by polling the database for new information, then "emitting" that message to whoever is listening. These classes inherit the JS EventEmitter class
Filesystem Lib: /src/main/fileSystem
Description: This class allows us, and helps us, interact with the MacOS filesystem. Mostly, reading/writing files to the app's directory.
Filesystem Scripts: /src/main/fileSystem/scripts.ts
Description: File that holds the Apple Scripts that get executed when sending a message, creating a chat, etc.
Server Helpers: /src/main/helpers
Description: Some helpers for executing actions from the client, or sending results back to the client
Socket Server: /src/main/services/socket
Description: The socket server that handles all incoming requests from connected sockets. Allows clients to request for bulk information such as getting chats, messages, etc.
FCM Server: /src/main/services/fcm
Description: This class will handle all communication with Google Firebase. This includes registering devices with FCM, sending notifications, etc.
Frontend Code: /src/renderer
Fronend Layouts: /src/renderer/layouts
Description: This directory contains the layouts for the frontend. In essence, these are the "containers" for all the pages. For example, the Admin
layout in that directory is what shows the sidebar navigation, and all of its' children
Frontend Views: /src/renderer/views
Description: The components in this directory are the "views" or "pages" within a layout. For instance, you'll find the configuration page here. It is a child within the Admin layout.
Frontend Components: /src/renderer/components
Description: These are the re-usable components that you may use anywhere within the frontend. These may be "cards", or "buttons", or any other custom UI element.
Frontend Entrypoint: /src/renderer/app.tsx
Here you will find child guides for setting up BlueBubbles with a BYO (Bring Your Own) Proxy Service (Dynamic DNS).
By default, BlueBubbles has the Ngrok & Cloudflare proxy services built-into the server for you to utilize. However, these services are run by third parties and are by default, using a free license tier for the respective services. These guides will show you how you can self-host or utilize an existing license of a proxy or dynamic DNS service, to use with BlueBubbles.
This document will guide you on possibly fixing the FaceTime features when using a macOS virtual machine.
The FaceTime features require macOS Monterey and newer
Keep in mind, the FaceTime features are experimental and may not always be 100% reliable.
Virtual machines typically do not have a microphone or webcam plugged into it, so when FaceTime tries to load and use the default audio/video devices, it fails and causes calls to fail.
A possibly way to fix the issue is to install "virtual" audio/video devices on your Mac so that FaceTime can use those.
Complete the following steps on your macOS virtual machine
Download & install a virtual audio device: https://vb-audio.com/Cable/
Download & install a virtual video device: https://obsproject.com/
Open OBS and Start the Virtual Camera
You only need to do this once to register it with the system and show in FaceTime
Reboot your Mac
Open FaceTime
Using the FaceTime status bar menu...
Select the OBS virtual camera as your video source
Select the VB Audio virtual audio device as your audio source
Now that you have virtual devices setup for both your audio/video inputs, FaceTime calling/answering should be more reliable.
This tutorial will show you how you can setup BlueBubbles in a Docker container, within a Linux host.
This guide is a contribution by @JustBen on our Discord
This guide is not for beginners. However, these steps should make it relatively easy to get up and running with a macOS Docker container running BlueBubbles on a Linux host. Before starting, you should familiarize yourself with the Linux CLI and be at least familiar with containerization and Docker (or Podman).
This guide is provided with no guarantees or warranty. If you encounter any problems, the community may be able to provide help in the Discord (linked in the header of this page), but we cannot guarantee that this will work for every configuration.
This guide has only been tested with MacOS Ventura, though it should work with only minor modifications for older versions.
This guide will walk you through setting up BlueBubbles on a macOS VM running in a Docker-OSX container. With the given configuration, your container will be accessible by VNC on port 5999.
You must have all of these already setup/installed in order to continue with the guide.
A Linux host
Comfort with bash
Packages:
docker
(or podman
)
docker-compose
(or podman-compose
)
tigervnc
(or another vncviewer)
qemu
All dependencies outlined by Docker-OSX in its Initial Setup documentation
As noted in the link above, your system must support virtualization. The Docker-OSX documentation has steps on how to configure and verify that virtualization is supported and enabled on your system.
Create a directory for all the container resources
Create a virtual disk:
3. Run:
This will take a while because it's downloading the image for Docker-OSX and generating a unique serial number and bootdisk for your mac VM.
You may see a handful of errors particularly related to ALSA. These can be safely ignored.
NOTE: If using Podman, you can add --rmi
to also remove the image after setup. However, this flag can be annoying if you need to start/stop this step repeatedly to troubleshoot because it will re-download the image every time NOTE: If using Podman as a non-root user, the additional flag --network slirp4netns:port_handler=slirp4netns
must be added.
4. With your vnc viewer, open a connection to your IP on port 5999. If you're using tigervnc and running this on the same phost, you can use vncviewer localhost:5999
. The password will be vncpass
unless you changed it in the command.
5. If presented with a boot loader (a black screen with some icons in the center), select the option MacOS Base System
to boot into the recover/install menu.
6. Before installing, you have to format the drive with APFS for a macOS install. Go into Disk Utility and find your drive. Click "Erase". Fill in the name for the drive that you want, then leave the rest as defaults and click "Erase". Close out of Disk Utility.
NOTE: On Ventura, you may have to use "MacOS extended (Journaled)" instead of APFS. See this GitHub issue for more information.
7. Click on "reinstall macOS" and install macOS as normal.
8. Once you're on your desktop, test sending an iMessage to yourself. If it does not succeed, it's likely best to restart from the beginning, though our Discord community may be able to help.
9. Before shutting down your VM, run this in a new terminal with the same user:
This copies the generated bootdisk and serial number information out of the container and saves it as bootdisk.qcow2
so it can be used for all your future boots.
10. Shutdown your VM then take down the container.
The container and image will automatically be removed from your system (to keep things clean) because of the --rm
and --rmi
options we passed above.
11. Save this into a file (e.g. start-bluebubbles.sh
) and make sure you have execute permissions to run it (chmod +x start-bluebubbles.sh
).
This new docker run command should cut down on boot time and general overhead.
As before, errors related to ALSA can be safely ignored.
It is HIGHLY RECOMMENDED that you replace $PWD
in the above command (after both -v
flags) with an absolute path. For example, replace $PWD/maindisk.qcow2:/image
with /home/yourname/bluebubbles/maindisk.qcow2:/image
. This allows you to more easily run this script from any working directory (as you may want to do with a systemd service file).
To change the VNC password, change data=vncpass
to data=<yourpassword>
in the EXTRA
environment variable.
NOTE: As before, if using Podman as a non-root user, the additional flag --network slirp4netns:port_handler=slirp4netns
must be added.
12. Start up the container again (by running the script file you made in step 11). It might take a little while the first time as it pulls down a new container image, but it'll be quicker to boot after this first time. Once it's up, you can connect again with VNC on port 5999 with password vncpass
(unless you changed it).
14. When you want to start the container again, run the script you made in step 11. As before, you can connect to your VM with VNC on port 5999 with vncpass
or the password you set. To stop the container, run:
To install the BlueBubbles Private API features, just follow the normal guide here.
When disabling SIP, follow the instructions for "Physical Mac, INTEL" on the Private API installation documentation.
To clarify, do NOT follow the documentation for disabling SIP on VMs. Everything you need is in the standard Private API installation guide.
Here is a sample of a web server written in Python to receive new message events.
Most of the code below is boilerplate code. The important pieces to change are lines 9 and 64-104.
On line 9, you need to set your server password.
Lines 64-104 define which events are handled, and how they are being handled. Those are likely the lines you want to modify the most to customize the functionality.
If you want to perform a manual setup of Nginx, instead of using the Nginx Proxy Manager, here is a guide on how to do it. Big thanks to @JustBen in the BlueBubbles Discord, for putting this guide tog
This page will guide you on setting up your own reverse proxy, given that you own a server to use for it. In order for this setup to work, you will need control of a server. This is typically a Linux server but could theoretically be any operating system. This guide will be for setting up a reverse proxy on Linux specifically. This will also assume that you have a Linux server on the same local network as your BlueBubbles server, as having the proxy and server on different networks adds several layers of complexity.
While the built-in proxy services in BlueBubbles are simple and easy to use, many users want a completely self-hosted setup where they control all pieces of the system. More specifically, control over the server, client, proxy, and domain. This eliminates almost all dependence on third-party resources and services.
The best use-case for this is that you already run a personal server of some sort and maybe you're already running a proxy for services running on this personal server. There is arguably more privacy in owning and controlling the proxy that handles your BlueBubbles traffic, or maybe you just enjoy learning about and/or managing application and server tools.
That said, the built-in options to BlueBubbles are more well-suited for the majority of users as they are generally reliable, secure, and (most importantly) easy to configure.
Pros | Cons |
---|---|
A server at your disposal on the same local network (LAN) as your BlueBubbles server
A static IP or DHCP reservation configured for your BlueBubbles server on your LAN
A static or reliable way to reach your home WAN IP (publicly addressable IP). This could be:
A static IP on your router. This is unlikely, as your WAN IP is usually not guaranteed by your ISP to stay the same, and it may change unexpectedly
A domain name and Dynamic DNS configured (more information below)
Port forwarding of your public BlueBubbles ports (recommended 80 and 443) to your proxy server
DISCLAIMER: If you aren't able to or don't know how to configure port forwarding, it is HIGHLY recommended that you instead opt for the built-in BlueBubbles proxy services
(Optional) A domain name
If you have a domain name, we recommend configuring Dynamic DNS. This will ensure that your domain name will always point to your WAN IP (which may change unexpectedly and/or frequently). Your registrar/DNS server must support Dynamic DNS, and configuration will depend on your router and your registrar/DNS. For a starting point, you can view the DD-WRT wiki page on Dynamic DNS.
Of course, there are certain things that will vary depending on your configuration and setup. The following variables will be used as placeholders in the example configurations below. They will appear in the example configurations exactly as they appear here.
The following is the recommended configuration for BlueBubbles to work behind an Nginx proxy. For easiest configuration, this should be placed in a new file at /etc/nginx/conf.d/bluebubbles.conf
After creating this file and filling in the appropriate values, restart the Nginx service with systemctl restart nginx.service
(you may need sudo
).
If you plan to use SSL (recommended), see the SSL Configuration section at the bottom of this guide.
The directory conf.d
may be named something else like vhosts.d
, depending on your Linux distribution
You can change client_max_body_size
to whatever you want. You can use M
and G
to denote Megabytes and Gigabytes respectively, or you can set this to 0 (with no units) to put no restriction on the max client body size. This changes the max file size that can be sent through the proxy to BlueBubbles. For more information, you can see the nginx documentation
If you have further problems with large files not sending to BlueBubbles, you can also define the configured client_body_buffer_size
similar to client_max_body_size
Before writing your config, these apache modules are required for the config to work:
mod_proxy
proxy_http
proxy_wstunnel
mod_headers
The following is the recommended configuration for BlueBubbles to work behind an Apache proxy. This should be placed in a new file at /etc/httpd/conf.d/bluebubbles.conf
After creating this file and filling in the appropriate values, restart the apache service with systemctl restart httpd
(you may need sudo
)
If you plan to use SSL (recommended), see the SSL Configuration section at the bottom of this guide.
On certain Linux distributions, the configuration directory may be at /etc/apache2/vhosts.d/
or /etc/httpd/vhosts.d/
For reference, the following is the minimum viable configuration for BlueBubbles to work behind an Apache proxy. This configuration does not need the mod_headers
module.
The following is the recommended configuration template for HAProxy. This should be in /etc/haproxy/haproxy.cfg
.
Keep in mind that HAProxy ACL configurations can be complex. For more information on configuring HAProxy ACLs, see this HAProxy blog post.
There are a few variables specific to HAProxy here:
After writing/changing these files, reload HAProxy with systemctl restart haproxy
(you may need sudo
)
If you plan to use SSL (recommended), see the SSL Configuration section at the bottom of this guide.
If you do not use SSL/HTTPS (used interchangeably here), traffic sent from your client to your server will be sent in plain text. This includes message content and your BlueBubbles password. As such, configuring SSL is highly recommended if you intend to connect to your BlueBubbles server over the internet.
To access your BlueBubbles to use HTTPS, you need to use an SSL certificate and configure your proxy to either terminate or pass through the SSL traffic. Here we will provide example configurations that have SSL certificates configured and link to more resources for configuring SSL on your proxy.
Keep in mind that you can only use SSL if you have a domain -- it will not work with only an IP address.
The easiest way to use this is to use something called "SSL termination" or "SSL offloading." This just means that the connection from client to server uses HTTPS (encrypted traffic) to the proxy, then the proxy communicates with the backend server using HTTP (unencrypted/plaintext traffic). As long as the proxy server and backend server live on the same private network, there are minimal security concerns with this setup, as the unencrypted traffic is sent over a trusted, private network.
The primary alternative to SSL termination is SSL passthrough, in which the traffic is not decrypted at the proxy, but instead is passed through to the server where the traffic is decrypted. There are other alternatives such as two-way SSL in which the client talks to the proxy on one SSL connection, then the proxy opens a different SSL connection to talk with the backend server over an encrypted channel.
For simplicity's sake, we will only be covering SSL offloading configuration in this guide.
The simplest solution for SSL certificate management and configuration is Certbot. Certbot is a tool built by the Electronic Frontier Foundation (EFF) and leverages Let's Encrypt to issue free certificates and then automatically install them in your existing server/proxy configuration. Certbot supports automatic SSL configuration for Apache, Nginx, HAProxy, and Plesk.
If you are using HAProxy, there are some added layers of complexity, but Certbot can still be used to seamlessly automate the management and renewal of SSL certificates. Skip to the section Certbot on HAProxy.
This is highly recommended as the solution for configuring SSL/HTTPS. This solution is easy, robust, and automated. Unless you have a good reason not to use Certbot, we highly recommend this option.
Certbot configuration steps
If you are using HAProxy, skip to the section Certbot on HAProxy.
On almost all Linux systems, the configuration is simple:
Install certbot with your distribution's package manager
You may also need to install the certbot addon for your specific proxy, e.g. certbot-nginx
(package names vary by distro)
Configure your service as you normally would, with HTTP-only
You need to configure your service before running Certbot to configure SSL on your service. This is because Certbot will look through your config to match the <server name>
you provide it with the server name in your configuration file. It does this to identify where it needs to add the configuration for SSL.
Issue a new certificate:
Run: sudo certbot --standalone --<proxy> -d <server name>
Fill in <proxy>
appropriately for your proxy application (apache
, nginx
)
If this is your first time running certbot, it will run you through a simple first-time setup that just requires your email address, confirmation of the Terms of Service, and whether or not you want to receive emails about EFF projects and campaigns
Use cron to automatically renew the certificate(s) every 2 months
Add a line to your crontab
sudo crontab -e
Insert on its own line: 0 0 1 */2 * certbot renew
Enable the cron service, if it isn't already:
sudo systemctl enable --now cron
Certbot on HAProxy
Per Certbot's website: "Certificate installation with HAProxy is complicated." There are a few things that makes Certbot with HAProxy somewhat complicated:
HAProxy is not a web server, so it can not be used in standalone
mode to run an HTTP server and respond to Let's Encrypt's HTTP-01 challenges
HAProxy requires a single .pem file that includes both the public certificate and the private key. This is not automatically generated by Certbot.
However, there are several guides available online which show you how to generate a certificate, install it, and then automate the renewal process. In short, it works by diverting HTTP calls to the .well-known
directory (where HTTP-01 challenges are stored) to the localhost where Certbot is running its own web server during the challenge. Then, the new certificate and key are combined into a .pem file with a simple bash script.
Servers for Hackers - LetsEncrypt with HAProxy (Recommended)
An example configuration file may be provided in the future after more testing can be done.
To reiterate: Certbot is highly recommended as an easy solution for SSL configuration and management. If you do intend to configure SSL yourself, we have provided example configurations below and references to further reading on the subject. If you're having trouble, feel free to join our Discord and ask questions there (linked in the header above).
These example configuration files are the auto-generated files by Certbot and are provided for reference.
Nginx
Nginx documentation SSL termination
Contents of /etc/nginx/conf.d/bluebubbles.conf
(could also be /etc/nginx/vhosts.d/bluebubbles.conf
, depending on distro)
Contents of /etc/letsencrypt/options-ssl-nginx.conf
Apache
Apache documentation on mod_ssl
Contents of /etc/httpd/conf.d/bluebubbles.conf
(could also be /etc/apache2/vhosts.d/bluebubbles.conf
, depending on Linux distribution)
HAProxy
HAProxy documentation on SSL termination
If you intend to use Certbot with HAProxy, please reference the above section "Certbot on HAProxy"
For HAProxy, you need to have a .pem file that includes both the public certificate and the private key. If you don't already have this, you can simply create a .pem file that contains the appended content of both the .key and .cer/.crt files. Example: cat mydomain.key mydomain.crt >> output.pem
Contents of /etc/haproxy/haproxy.cfg
Here you will find guides on how to develop against BlueBubbles
Documentation for BlueBubbles REST API & Webhooks
The REST API is currently only compatible with https Ngrok, Cloudflare, or Dynamic DNS connections with valid SSL certificates (when used in a Browser). We hope to add support for LocalTunnel in the near future. If you plan to use the REST API in a non-browser environment, it should work as expected.
The REST API requires server version 0.2.0 or greater, though we recommend you use the latest server as some methods in the documentation may not exist on older versions. Webhooks require server version 1.0.0 or greater.
If you've built something using the API or webhooks that you'd like to share, let us know on our Discord!
Most requests require authentication. Simply add the query parameter guid
(aliases include password
& token
) to the end of the request URL, with the server password as the value.
For example: https://some-url.ngrok.io/api/v1/ping?guid=password
All requests are returned with the basic format as below:
Or in the case of an error:
We support listening to the following events:
New Messages
Message Updates (delivered, read, etc)
Message Errors
Group Name Changes
Participant Added / Removed / Left
Chat Read Status Changes
Typing Indicators
BB Server Update
BB Server URL Change
Hello World (for testing)
You can also subscribe to an event that listens to all of the above at once.
Simply provide a URL and the server will POST to it whenever your desired event occurs.
This page will show you how you can create a simple HTTP web server to receive webhooks from the BlueBubbles Server.
The goal of this page is to show you how you can do some automation around iMessage using the BlueBubbles Server and the webhook events that it emits.
Before setting up any webhooks with the BlueBubbles Server, you need to create a web server to receive the webhook requests that the server will be emitting.
There are tools out there built for automation that do this for you such as n8n. However, if you want full controller over the code, I recommend building a webserver yourself.
Here are some quick implementation code in various languages.
Once you've built your HTTP server, note the port that the server runs on (if running it on localhost).
Open up the BlueBubbles Server and open the API & Webhooks
page. Then click on the Manage
drop down, and select Add Webhook
In the popup, enter your webserver's URL + port (if on localhost). Here is an example where my localhost webserver is listening on port 8000:
Next, select the events you want to subscribe to from the Event Subscriptions
drop down.
Lastly, hit save. You should see your new entry show up in the table.
Assuming your webserver is running, it should now receive HTTP POST requests when the subscribed events are emitted from the server!
If you have a cool automation project, please share it with us in our Discord! We love to see all the cool ways people are using BlueBubbles and its' API!
Variable name | Description | Example values |
---|---|---|
Variable name | Description | Example values |
---|---|---|
Completely self-hosted, no need to use a third-party service
Server maintenance & upkeep
More secure, entirely controlled and operated by yourself
More prerequisites, niche use case
More control, allowing you to configure everything exactly as you want it
More complex configuration
<server name>
Domain name or WAN IP of your server to which the proxy will be responding
bluebubbles.example.com
150.50.31.10
<BlueBubbles IP>
The IP of your BlueBubbles server on the local network. If the proxy is running on the same server as your BlueBubbles server (as in a VM), use localhost
192.168.0.10
localhost
<BlueBubbles port>
The port that the BlueBubbles server is listening at on the local network (default is 1234)
1234
<backend name>
HAProxy backend name. This is an arbitrary name used to identify services in your HAProxy configuration file(s)
bluebubbles
imessage-relay
<be server name>
HAProxy backend server name. This is an arbitrary name used to identify a specific backend server in your HAProxy configuration file(s)
bb-server
imessage-relay-primary
Tailscale is a mesh VPN software that uses WireGuard technology. It also include other fun features like Tailscale Funnel.
Tailscale Funnel allows you to publicly expose your machine's local services without needing to purchase a domain & set up port forwarding. It hosts your machine's domain on their Funnel Servers. The Funnel Server accepts requests & sends a TCP proxy to your machine where TLS cert is terminated. Simple, secure & only requires a few short commands.
Requirements
Enable HTTPS certificates in the admin console.
Open the Access controls page in the admin console and click the Add Funnel to policy button
Download Tailscale from the Mac App Store or directly from Tailscale
Login from the top right menu icon & enable start on login from preferences
Add alias for the Tailscale CLI to your shell configuration by entering the command below into terminal.
Alternatively, you can use /Applications/Tailscale.app/Contents/MacOS/Tailscale <command>
Proxy requests to BlueBubbles's local web server on the default port 1234. Make sure to check your setup in case a different port is being used. Supported serve ports are 443, 8443, or 10000.
Enable the funnel to route proxy traffic over Tailscale funnel servers. Again, supported ports are 443, 8443, or 10000 - match with what you chose in Step 4. Replace port 1234 with your BlueBubble's local web server.
Check the funnel status with the following - you should see (Funnel on)
:
Finally, copy the entire URL that you see in step 6 to the BlueBubbles Proxy Service drop-down menu:
Thanks to @bobspop in Discord for creating this guide. Updated by @ampersandru
A way to get https when portforwarding with bluebubbles
This guide is written with the intention caddy is deployed on the same mac as your bluebubbles server but the process is similar if you have a remote caddy server.
Benefits:
Works nonstandard ports
A duckdns account with a domain https://www.duckdns.org/domains
A setup bluebubbles server
The ability to portforward your mac mini or reverse proxy to a machine that can be portforwarded (ex: aws, gcp, oracle, etc)
Download caddy with duckns and move it to your home folder with the following command
Intel Macs:
curl -o ./caddy https://caddyserver.com/api/download?os=darwin&arch=amd64&p=github.com/caddy-dns/duckdns&idempotency=8875705962096
Apple Silicon:
curl -o ./caddy https://caddyserver.com/api/download?os=darwin&arch=arm64&p=github.com/caddy-dns/duckdns&idempotency=28552737821716
Make caddy executable with the command chmod 755 ./caddy
Download the template caddy file with the following command:
curl -o ./Caddyfile https://raw.githubusercontent.com/Rihcus/BB-dynamic-dns-duckdns/main/Caddyfile
Edit the Caddyfile
replace the example domains with your domains
replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
with your duckdns token
Optional adjust the https/http or bluebubbles server ports as needed
For testing purposes set your duckdns domain to the local ip of your bluebubbles server using the duckdns web portal
test the config with ./caddy run
if the config works and you can access your domain via https use ./caddy start
to make it auto run
Setup portforwarding (not covered in this guide)
Optional install duckdns to your mac server in order to auto-update public ip
Guide created by @Deemo in the BlueBubbles Discord