Launch on startup no longer working on macOS
See original GitHub issueDescribe Your Problem: I had a working Homebridge setup that launched in the background when my Mac started. After running updates to my Homebridge setup (npm update for it and all plugins), this launch on startup stopped working.
The command launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist
executed, but Homebridge does not start. It does start without issues manually in the Terminal. This command used to work.
Then I read about hb-service
and removed my entire Homebridge setup to go with the new, easier route of sudo hb-service install
but it didn’t start anything. The message did read:
ℹ Installing Homebridge Service
ℹ Starting Homebridge Service...
✔ Homebridge Started
Manage Homebridge by going to one of the following in your browser:
* http://localhost:8080
* http://192.168.2.2:8080
* http://[fe80::404:46fb:1125:232]:8080
Default Username: admin
Default Password: admin
✔ Homebridge Setup Complete
But nothing started. The .homebridge
folder wasn’t created and Homebridge UI was not available. When doing sudo hb-service start
it says:
ℹ Starting Homebridge Service...
/Library/LaunchDaemons/com.homebridge.server.plist: service already loaded
✔ Homebridge Started
After a manual homebridge
it ran a cleanly installed Homebridge. I quit it and moved all config files back. So my setup is working again, but still not in the background.
Any idea how I can get it to launch on startup in the background?
Could it be related to this warning during installation?
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
Logs:
hb-service logs
gives:
✖ ERROR: Log file does not exist at expected location: /Users/Lex/.homebridge/homebridge.log
Environment:
- Node.js Version: v12.16.1
- NPM Version: 6.14.4
- Homebridge Version: 0.4.53
- Operating System: macOS 10.15.4
- Process Supervisor: I wish I knew. I think it should be
hb-service
, but that’s not working
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (12 by maintainers)
Top GitHub Comments
Strange, it’s managed to figure out the username, “Lex” for the username key, but hasn’t correctly resolved the home directory for that user.
During my testing of standard installs on Mojave and Catalina this worked fine.
Try this:
In the
homebridge-http-webhooks
plugin config set the cache directory (the plugin should really just store files in the homebridge storage directory).And make that directory for good measure:
Then restart.