Skip to content

Homebridge on Unraid

Donavan Becker edited this page Apr 15, 2020 · 17 revisions

How to setup Homebridge & Docker on an Unraid Server

This guide will show you how to run the oznu/homebridge docker image on an Unraid Server.

Requirements

Installing Docker on an Unraid Server

Docker is built in to unraid server 6, with a built in Docker Manager.

1. Download Docker Image

  • From the Unraid Dashboard, go to the Apps section and then search for and download the oznu/homebridge image.
  • Click Click Here To Get More Results From DockerHub, so that it pulls in oznu/homebridge.

oznu/homebridge

  • From here you will see the docker image homebridge by oznu.
  • Click Install, this will initial the Create of the Container.

Download oznu/homebridge docker image

2. Create Container

A new container using the oznu/homebridge image will be created once configured.

  • Name your container appropriately and then click Advanced View.

  • For WebUI This field allows you to launch homebridge from Unraid to the Homebridge WebUI. You will want to imput your Unraid Server IP with the Port You select for the Config UI.

    • Example: http://192.168.7.206:8584
  • Network Type must be Host.

  • For Extra Parameters type in --restart=always. This is recommended if you want your container to automatically restart after your Unraid Server reboots or if Homebridge crashes.

Create container

  • Select Add another Path, Port, Variable, Label or Device to add the following: Web UI Port, PUID, PGID, Homebridg Config UI, and Config UI Port.

General settings

  • Setup Each Below:

    • Config Folder:
      • Config Type: Path
      • Name:Config Folder
      • Container Path: /homebridge
      • Host Path: /mnt/user/appdata/homebridge
      • Access Mode: Read/Write
      • Required: Yes

    Config Folder

    • Web UI Port:
      • Config Type: Port
      • Name:Web UI
      • Host Port: 8581, The Port you want the Web UI on.
      • Default Value: 8581, Same as Host Port
      • Connection Type: TCP
      • Required: Yes

    Web UI Port

    • PUID:
      • Config Type: Variable
      • Name:PUID
      • Key: PUID
      • Value: 1000
      • Required: Yes

    PUID

    • PGID:
      • Config Type: Variable
      • Name:PGID
      • Key: PGID
      • Value: 1000
      • Required: Yes

    PGID

    • Homebridge Config UI:
      • Config Type: Variable
      • Name:Homebridge Config UI
      • Key: HOMEBRIDGE_CONFIG_UI
      • Value: 1
      • Required: Yes

    Homebridg Config UI

    • Config UI Port:
      • Config Type: Variable
      • Name:Homebridge Config UI Port
      • Key: HOMEBRIDGE_CONFIG_UI_PORT
      • Value: 8581, Same as Web UI Port
      • Required: Yes

    onfig UI Port

3. Installing Plugins

Plugins can be install on Config UI X as you would normally.

4. Customising config.json

Most Homebridge plugins require you to add additional configuration in the Homebridge config.json file which will have been created in the Homebridge configuration folder defined in the above steps.

You can open and edit the config.json in a text editor of your choice.

Some editors like TextEdit on OSX will try and replace the " with non standard quotes which will cause issues - to avoid this use a plain text editor like Atom or Visual Studio Community.

You can use jsonlint.com to verify your config.json is syntactically correct.

After editing the config.json file restart the Homebridge container to apply the changes.

Viewing Homebridge Logs

You can view the Homebridge logs using the Log tab on Config UI X.

Connect iOS / HomeKit

You should now be able to see the Homebridge as a new HomeKit accessory in the Apple iOS Home App. You can pair the device using the default pin. You can change the pin by editing the config.json file.

Default Pairing Pin: 031-45-154

When using iOS 11 you will need to select Don't have a Code or Can't Scan and then under the Manual Code heading select the Enter code... link.

Home app add accessory

Updating Homebridge

To update to the latest version of Homebridge and the oznu/homebridge container:

  1. Download the latest version of Homebridge
  2. On the Apps tab, Click Check for Updates
  3. If Updates existing for homebridge container, Unraid Dashboard will display.
  4. Select Update then wait, Unraid Docker managment will do the rest.
  5. If all setup correctly the homebridge container will start up as normal.