BlueBubbles Server
  • Server Overview
  • Installation Guides
    • Standard Installation
    • Manual Setup
  • FAQ
  • Private API Setup
  • Supporting the Project
  • Licenses / Legal
  • Basic Guides
    • Basic Guides - Overview
    • Port Forwarding & Dynamic DNS
    • Prevent macOS from Sleeping
    • Migrating Servers
    • Multiple Users on the Same Mac
    • Autostart Server After Crash
  • Troubleshooting Guides
    • Troubleshooting Guides - Overview
    • BlueBubbles Server Cannot Access MacOS Contacts
    • Not Receiving Notifications or URL Changes on Android
    • Unable to Send Messages to International Contacts
    • BlueBubbles App is Taking Up Too Much Storage
    • Can't Send Messages from BlueBubbles
    • BlueBubbles Server Opens to a Blank White Screen
    • Slow Upload Speed When Connecting Over LAN
    • Restarting Your Server Without a Direct Connection
    • Fix FaceTime Features for Virtual Machines
  • Advanced Guides
    • Advanced Guides - Overview
    • Generating an SSL Certificate using CertBot
    • Disabling SIP on Unofficial Macs for the Private API
    • Registering a Phone Number with your iMessage Account
    • macOS Virtualization
      • Running a macOS VM
        • Deploying macOS in VMWare on Windows (Full Guide)
        • Enabling iMessage in a VM
        • External Guides
          • Big Sur VM on a Mac Device
          • Big Sur VM on Proxmox
          • Big Sur VM on AMD Windows
          • Big Sur VM on Intel Windows
          • Catalina VM on a Mac Device
          • Catalina VM on Proxmox
          • Catalina VM on Intel / AMD Windows
          • Catalina VM on Intel Windows
          • Monterey VM on AMD Windows
      • Running BlueBubbles in Docker-OSX
        • Configuring BlueBubbles as a Service
    • BYO Proxy Service Guides
      • Cloudflare with a Custom Domain
      • Caddy & DuckDNS
      • Nginx Proxy Manager
      • Nginx Manual Setup
      • Tailscale VPN Setup
  • Developer Guides
    • Developer Guides - Overview
    • Build Yourself / Contribution Guide
    • REST API & Webhooks
    • Simple Web Server for Webhooks
      • Python Web Server Example
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Basic Guides

Autostart Server After Crash

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)

PreviousMultiple Users on the Same MacNextTroubleshooting Guides - Overview

Last updated 10 months ago

Was this helpful?

Special thanks to for the basis of this guide!

  1. Open the TextEdit app on your Mac

  2. 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

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
            <key>Label</key>
            <string>com.bluebubbles.server</string>
            <key>Program</key>
            <string>/Users/{username}/Applications/BlueBubbles.app/Contents/MacOS/BlueBubbles</string>
            <key>RunAtLoad</key>
            <true/>
            <key>KeepAlive</key>
            <dict>
    	    <key>SuccessfulExit</key>
    	    <false/>
    	</dict>
        </dict>
    </plist>

    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.

  3. Save the file to ~/Library/LaunchAgents/com.bluebubbles.server.plist

    1. CMD + S to save the file

    2. CMD + Shift + G to open a file location

    3. Paste ~/Library/ into the popup and hit Enter

    4. Find the LaunchAgents folder and open it

      • If it does not exist, create it using the New Folder button

    5. Enter com.bluebubbles.server.plist in the Save As field

  4. Disable the built-in autostart option in the BlueBubbles Server:

  5. Install the launch agent and load it after the current user graphically logs in:

    launchctl bootstrap gui/$(id -u $(whoami)) ~/Library/LaunchAgents/com.bluebubbles.server.plist
  6. Immediately start the launch agent (only necessary for the first time):

    launchctl kickstart gui/$(id -u $(whoami))/com.bluebubbles.server

Some additional notes:

  • To uninstall the launch agent:

    launchctl remove com.bluebubbles.server
  • To print information about the launch agent:

    launchctl print gui/$(id -u $(whoami))/com.bluebubbles.server
Scr0nch