This Docker image helps you to easily setup Homebridge on your Synology, but also runs on QNAP devices or Raspberry Pies.
First of all, login to your Synology DSM, open Docker and download lumoc/homebridge-docker
from within the registry.
Create a folder via DSM File Station at /volume1/docker/homebridge
and put your config.json
and either your package.json
or install.sh
(recommended) in there. If you'd like to develop an own plugin or debug Homebridge, also copy the .env
file.
Here are two examples of how your setup files may look like:
{
"name": "DiskStationHomeBridge",
"description": "HomeKit support for the impatient.",
"version": "0.1.1",
"license": "ISC",
"dependencies": {
"homebridge-harmonyhub": "0.2.0-alpha",
"homebridge-netatmo": "^0.0.4",
"homebridge-nukiio": "^0.0.3",
"homebridge-synology": "^0.1.0"
}
}
Note that you can also use this file to install server dependencies!
#!/bin/bash
npm install -gs homebridge-harmonyhub
npm install -gs homebridge-netatmo
npm install -gs homebridge-nukiio
npm install -gs homebridge-synology
Since version 2.1 all commands get executed as root, so this is a good place to install missing dependencies.
Once the plugins have been set up, the Docker container is ready to launch.
Link the /volume1/docker/homebridge
to /root/.homebridge
, otherwise, the configuration files won’t be loaded (within DSM the path is only shown as /docker/homebridge
.
Once you launch (or restart) the container, Homebridge and all its dependencies will get installed. To verify that Homebridge is running or if an error occurs, you can use the container's log (Container → Details → Log) to receive further information on the process.
There are many Docker commands that can be run via the homebridge.sh
script. Please have a look at the file, it should be self-explaining.
If you intend to develop a plugin or Homebridge is not running as it's supposed to, you might want to start Homebridge with debugging options. To do so, copy the sample .env
file to /volume1/docker/homebridge
and set the desired environment. Don't forget to place your plugins manually under /volume1/docker/homebridge/plugins
and (re-) start the container. See the Homebridge docs for details.
All .env
variables are optional.
- production (default)
Starts Homebridge without any options. - development
Starts Homebridge with plugin support. - debug
Starts Homebridge with plugin support and maximum debugging info. - production-insecure
Starts Homebridge with HTTP support. - development-insecure
Starts Homebridge with plugin support and HTTP support. - debug-insecure
Starts Homebridge with plugin support, HTTP support and maximum debugging info.
To avoid breaks with either new Homebridge releases or iOS updates, you can force the installation of a specific Homebridge version. HOMEBRIDGE_VERSION
accepts any release tag (f.e "0.4.17") or valid NPM version range.
In case, that Homebridge doesn't run as expected, please follow these steps for debugging:
A lot of issues come through multiple Homebridge instances. Conflicts might require you to completely re-setup Homekit on your iOS devices! Always make sure, there's only one Homebridge instance running on your network at once!
Many issues appear because of invalid JSON. Before you open a ticket, please make sure that the syntax is ok. A good way to verify your config is to use the jsonlint.com validator.
Most issues aren't related to this package, nor to Homebridge -- they are created by outdated plugins or wrong configuration. This package focuses on making Homebridge run as easy as possible. So if Homebridge runs without any plugins, enable them step by step until you find out, which plugin creates the error. You should then contact the plugin's creator.
Make sure that ports 5353 and 51826 (both TCP) aren't blocked by your firewall.
Sometimes IPv6 or Synology's Bonjour service are the reason devices cannot be found.
If you're using a non-Synology device, you might need to adjust the paths to your config (/volume1/docker/homebridge
).
Before opening a new issue on GitHub, please use the search function to avoid duplicates.
This project is licensed under Apache License V2 (see LICENSE).
Changes can be found in the CHANGELOG.md.
- Chris Brandlehner
- Parker Smith
- Christian Haugen