-
Notifications
You must be signed in to change notification settings - Fork 383
Standalone Mode
Standalone mode is no longer recommended. Setting up Homebridge and Homebridge Config UI X with hb-service
has the same benefits of standalone mode but is much easier to setup and maintain.
Full step-by-step setup guides for how to setup hb-service
are available here:
- Setup Homebridge as service on Linux
- Setup Homebridge as service on Windows 10
- Setup Homebridge as service on macOS
For information on setting up multiple instances of Homebridge on the same machine, see the Multiple Instances section of the hb-service
documentation.
See How To Swap From Standalone Mode to Service Mode.
Homebridge Config UI X has the ability to run in Standalone Mode. When this mode is enabled the UI will run as a separate service to Homebridge. The main advantage of this is, should Homebridge be crashing due to a bad config or some other reason, you will still be able to access the UI to view the logs or restore a config backup.
oznu/homebridge docker users: You are already running in standalone mode if you enabled the UI using the supported method.
After installing homebridge-config-ui-x
globally using npm
, you can start the UI in the same way you start homebridge
. You should pass the same command line parameters you are passing to homebridge
to homebridge-config-ui-x
:
# Example: if you start homebridge like this:
homebridge -U /var/lib/homebridge -I
# Example: then you can start homebridge-config-ui-x in standalone mode like this:
homebridge-config-ui-x -U /var/lib/homebridge -I
You also need to tell homebridge
that the UI is running in standalone mode, so it does not attempt to start it as well which will cause a clashing of ports. To do this add "standalone": true
to the Config UI X section of the Homebridge config.json
:
"platforms": [
{
"platform": "config",
"name": "Config",
"port": 8080,
"standalone": true,
... // the rest of your config
}
]
If you haven't yet setup Homebridge or Homebridge Config UI X using systemd see the guide here. The following instructions assume you have already setup Homebridge and the UI with systemd.
Add the "standalone": true
option and update the restart
command in the Config UI section of the Homebridge config.json
file:
"platforms": [
{
"platform": "config",
"name": "Config",
"port": 8080,
"standalone": true,
"restart": "sudo -n systemctl restart homebridge homebridge-config-ui-x",
... // the rest of your config
}
]
Restart Homebridge, the UI will no longer start:
systemctl restart homebridge
Use the command below to create the required /etc/systemd/system/homebridge-config-ui-x.service
file:
Copy and paste this entire block into the terminal as one command!
Do not use a text editor. This template includes variables that get populated by bash as the command is executed.
cat >/etc/systemd/system/homebridge-config-ui-x.service <<EOL
[Unit]
Description=Homebridge Config UI X
After=syslog.target network-online.target
[Service]
Type=simple
User=homebridge
EnvironmentFile=/etc/default/homebridge
ExecStart=$(which 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
EOL
This will ensure Homebridge Config UI X starts on boot:
systemctl daemon-reload
systemctl enable homebridge-config-ui-x
systemctl start homebridge-config-ui-x
You can now use the UI as normal.
- Raspberry Pi
- Debian, Ubuntu
- CentOS, Fedora, Red Hat
- Arch, Manjaro
- macOS
- Windows 10 / 11 (Hyper-V)
- Docker
- Synology DSM 7
- Other Platforms
- Basic Troubleshooting
- Backup and Restore
- Child Bridges
- Config File
- Connect To HomeKit
- FFmpeg for Homebridge
- HomeKit Glossary of Terms
- iOS Homemanager App
- mDNS Options
- Remote Access
- Useful Links
- Basic Troubleshooting
- Config Options
- Enabling Accessory Control
- Enabling UI with Docker
- Homebridge Service Command
- Manual Configuration
- Reverse Proxy: Apache
- Reverse Proxy: Nginx and SSL
- Standalone Mode
- Swap From Standalone To Service Mode
- Developer Docs
- API Reference
- Plugin Templates
- Other Links (Internal)
- Other Links (External)