question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

macOS - Homebridge runs when manually started, but won't auto start

See original GitHub issue

Hi all

I have been running Homebridge manually - and this works while the Terminal is kept open. I followed the instructions on ‘How to automatically start Homebridge with launchd’ and created the com.homebridge.server.plist file where instructed.

When I restart and type launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist I am told that it is already running, but the Home app on iOS cannot see my accessories.

If I go back to Terminal, start manually, and leave open, it does work.

Any suggestions? Help appreciated! I cannot get viewing of logs to work following the instructions provided.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
retroneocommented, Nov 19, 2017

OK. There are several problems that I have encountered following the instructions for LaunchAgents. All of the following need to be fixed for it to successfully auto launch, and for plugins to work.

  1. Permissions must be correct on ~/LaunchAgents/ folder and the ~/LaunchAgents/com.homebridge.server.plist file.

Type the following four commands in Terminal (replacing username with your username): sudo chown username ~/LaunchAgents/ sudo chown username ~/LaunchAgents/com.homebridge.server.plist chmod ~/LaunchAgents/ chmod 600 ~/LaunchAgents/com.homebridge.server.plist

  1. Ensure the plist has the following keys (replacing username with your username). Ensure the full paths are used. The environment variables are essential as otherwise none of the plugins will work.
<key>StandardOutPath</key>
    <string>/Users/username/.homebridge/logfile.log</string>
<key>StandardErrorPath</key>
    <string>/Users/username/.homebridge/logfile.log</string>
<key>EnvironmentVariables</key>
    <dict>
        <key>PATH</key>
        <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
        <key>HOME</key>
        <string>/Users/username</string>
    </dict>
0reactions
stale[bot]commented, Jul 2, 2018

This issue has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Launch on startup no longer working on macOS #2464 - GitHub
homebridge.server.plist executed, but Homebridge does not start. It does start without issues manually in the Terminal. This command used to ...
Read more >
Homebridge running fine but UI won't load (Mac) - Reddit
I would start with a password reset. To reset your password, delete the "auth.json" file in your homebridge storage directory (probably `~/.
Read more >
Homebridge questions... - MacRumors Forums
Homebridge will now start automatically at boot and will restart if it crashes. Run the following in a terminal to manually start Homebridge...
Read more >
HomeKit: Starting Homebridge On Bootup Via Systemd
By Setting up Homebridge to start via systemd, there is no need of manually reboot Homebridge or make any plugin auto repair via...
Read more >
Setup Homebridge to Start on Bootup - Tim Leland
I decided to use systemd to start Homebridge on bootup. I prefered this method because it will restart if an error occurs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found