Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Systemd Service for homebridge on Raspberry Pi (http://github.com/nfarina/homebridge)

Systemd Service for homebridge on Raspberry Pi

Check location of homebridge

pi@raspberrypi:~/.homebridge $ which homebridge
/usr/bin/homebridge

Create file /etc/systemd/system/homebridge.service

[Unit]
Description=Node.js HomeKit Server 
After=syslog.target network-online.target

[Service]
Type=simple
User=pi
ExecStart=/usr/bin/homebridge
Restart=on-failure
RestartSec=10
KillMode=process

[Install]
WantedBy=multi-user.target

Then Enable and run the service (first time) with the following commands:

sudo systemctl daemon-reload
sudo systemctl enable homebridge
sudo systemctl start homebridge

You can check the status of the service by calling

sudo systemctl status homebridge

Check logs

sudo journalctl -u homebridge 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.