Close Menu
miapple.me – Tech.Blogmiapple.me – Tech.Blog

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Content Is Still King! 12 Years Of Blogging: miapple.me – Tech.Blog’s 12th Anniversary

    January 21, 2024

    Content Is King Again! 10 Years Of Blogging: miapple.me – Tech.Blog’s 10th Anniversary

    January 21, 2022

    Fixing: Time Machine couldn‘t complete backup

    April 30, 2021
    • Downloads
    • Email Subscription
    • Imprint
    • Privacy Policy
      • Push Notifications Subscription
      • Terms of Use
    • Search
    miapple.me – Tech.Blogmiapple.me – Tech.Blog
    • Apps
    • AirPlay
    • Apple
      • Apple TV
      • Apple Watch
      • iCloud
      • iTunes
      • macOS
    • iOS
    • HomeKit
    • Plex
    • Raspberry Pi
    • Windows
    • Downloads
    • Email Subscription
    • Imprint
    • Privacy policy
      • Push Notifications Subscription
      • Terms of Use
    • Search
    Subscribe
    miapple.me – Tech.Blogmiapple.me – Tech.Blog
    Home»HomeKit»HomeKit: Starting Homebridge On Bootup Via Systemd
    HomeKit

    HomeKit: Starting Homebridge On Bootup Via Systemd

    Gee Are PabstBy Gee Are PabstJune 29, 2018No Comments2 Mins Read
    Homebridge automatic restart on boot up via systemd
    Homebridge automatic restart on boot up via systemd

    HomeBridge icon 246x246Setup Homebridge to start via systemd to automatically restart Homebridge after crashes. After successfully installing Homebridge on Raspberry Pi, it often happens that Homebridge stops running and you have to manually press plugin auto repair in the Homebridge app and reboot the Homebridge service. By Setting up Homebridge to start via systemd, there is no need of manually reboot Homebridge or make any plugin auto repair via the iOS Homebridge app. The systemd method is the preferred ones because it will restart if an error occurs.

    Homebridge automatic restart on boot up via systemd
    Homebridge automatic restart on boot up via systemd

    iOS Homebridge app is an ease of use for connecting non-certified HomeKit devices to HomeKit.

    ?Homebridge for RaspberryPi
    ?Homebridge for RaspberryPi
    Download QR-Code
    ?Homebridge for RaspberryPi
    Developer: Niklas von Weihe
    Price: $6.99

    Raspberry Pi: How to set up Homebridge on Bootup via systemd

    1. Open Terminal SSH.
    2. sudo nano /etc/default/homebridge and paste this gist
    3. sudo nano /etc/systemd/system/homebridge.service and paste this gist
      1. Maybe you need to remove local from:  ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS  because your Homebridge is installed in /usr/bin/
    4. Create a user to run service: sudo useradd --system homebridge
    5. Type sudo mkdir /var/homebridge
    6. Type sudo cp /root/.homebridge/config.json /var/homebridge/
      1. This copies your current user’s config. This assumes you have already added accessories etc.
      2. Depending where the directory is you need to type: sudo cp ~/.homebridge/config.json /var/homebridge/
    7. Type sudo cp -r /root/.homebridge/persist /var/homebridge
      1. Depending where the directory is you need to type: sudo cp -r ~/.homebridge/persist /var/homebridge
    8. Type sudo chmod -R 0777 /var/homebridge
    9. Type sudo systemctl daemon-reload
    10. Type sudo systemctl enable homebridge
    11. Type sudo systemctl start homebridge
    12. Type systemctl status homebridge to check the status of the service.
    13. Type sudo reboot

    Notes: 

    • Systems can also be activated in the iOS Homebridge app via. However, it looks like this way is not as good as activating systemd via ssh shell.
    • I successfully tested systemd on a Raspberry Pi Model 3 B+ and a Raspberry Pi 3 Model B.

    Setup Homebridge to start on bootup via systemd to tackle Homebridge crashes and instability. These issues can be fixed by activating systemd via SSH shell commands. This option does not fix the rude cause, but keeps Homebridge automatically restarting and working after crashes.

    Stay tuned! 😉

    Home Automation HomeBridge Raspberry Pi Model 3 B+
    Previous ArticleHow To Fix Raspberry Pi ‘WiFi Country Not Set’
    Next Article macOS – How To Fix Mail Folders Not Automatically Be Sorted In Alphabetical Order
    Gee Are Pabst
    • Website
    • Facebook
    • X (Twitter)
    • Pinterest
    • LinkedIn

    Hi there,my name is Gee Are, blogger and analyst. Blogging is my Passion! I’m the founder and owner of the two blogs called pabst.socialmedia and miapple.me - Tech.Blog.My work experience as a blogger and analysist (Internet Intelligence, SEO and social media) is the basis of the services of pabst.socialmedia.Find more about me.

    Related Posts

    Android

    8 Years Of Blogging: miapple.me – Tech.Blog’s 8th Anniversary

    January 21, 2020
    HomeKit

    How To Fix Raspberry Pi ‘WiFi Country Not Set’

    May 16, 2018
    Android

    Harmony Hub: Fixing ‘Starting Channel Not Working’

    May 6, 2018
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Fixing ‘Cannot Connect MacBook To iPhone Via Bluetooth’

    May 5, 20167,101 Views

    Fixing No Notification Sounds On iPhone When Locked

    January 8, 20214,640 Views

    How To Fix MacBook Micro-Vibrations While Charging Due To Insufficient Grounding

    June 21, 20203,742 Views

    Fixing Mac No Admin Account On macOS Mojave Or Later

    February 3, 20212,176 Views

    Installing Huawei E3372 On macOS 11 Big Sur, Mac OS 10.12 Sierra And macOS 10.13 High Sierra

    August 11, 20161,955 Views

    Apple iCloud Mail Blocks Outbound Emails: Silent Filtering And How To Fix It

    December 1, 2020846 Views
    Featured Reviews

    Fixing ‘Cannot Connect MacBook To iPhone Via Bluetooth’

    May 5, 20167,101 Views

    Fixing No Notification Sounds On iPhone When Locked

    January 8, 20214,640 Views

    How To Fix MacBook Micro-Vibrations While Charging Due To Insufficient Grounding

    June 21, 20203,742 Views
    Our Picks

    Content Is Still King! 12 Years Of Blogging: miapple.me – Tech.Blog’s 12th Anniversary

    January 21, 2024

    Content Is King Again! 10 Years Of Blogging: miapple.me – Tech.Blog’s 10th Anniversary

    January 21, 2022

    Fixing: Time Machine couldn‘t complete backup

    April 30, 2021

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    • Home
    • Search
    • About Us
    • Contact Us
    Copyright © 2012-2025 miapple.me™

    Type above and press Enter to search. Press Esc to cancel.