Install Homebridge UI on Raspberry Pi (3 or 4 preferred)

This is for a fresh install of Homebridge UI with auto-start on reboot or error.

If you are trying to convert an existing install, this step-by-step will not work for you, and you’ll need to modify it to suit your needs.

  1. Edit your Homebridge config to enable standalone mode:
    sudo nano /var/homebridge/config.json
    …and paste this into it.
  2. Create the executable service:
    sudo nano /etc/systemd/system/homebridge-config-ui-x.service
    …and paste this into it.
  3. Reload all of the daemons
    sudo systemctl daemon-reload
  4. Enable the Homebridge service to start:
    sudo systemctl enable homebridge-config-ui-x
  5. Start Homebridge yourself:
    sudo systemctl start homebridge-config-ui-x

Platform in /var/homebridge/config.json:

"platforms": [
    {
      "platform": "config",
      "name": "Config",
      "port": 8080,
      "standalone": true,
      "restart": "sudo -n systemctl restart homebridge homebridge-config-ui-x"
   }
]

Contents of /etc/systemd/system/homebridge-config-ui-x.service:

[Unit]
Description=Homebridge Config UI X
After=syslog.target network-online.target

[Service]
Type=simple
User=homebridge
EnvironmentFile=/etc/default/homebridge
ExecStart=/usr/bin/homebridge-config-ui-x $HOMEBRIDGE_OPTS
Restart=on-failure
RestartSec=3
KillMode=process
CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_CHOWN CAP_FOWNER CAP_DAC_OVERRIDE CAP_AUDIT_WRITE CAP_SYS_ADMIN
AmbientCapabilities=CAP_NET_RAW

[Install]
WantedBy=multi-user.target