Skip to content

Install Homebridge on Docker

Northern Man edited this page Jun 30, 2023 · 28 revisions

This guide provides step-by-step instructions to show you how to install Homebridge on Docker as a service so it will automatically start on boot.

Prerequisites

Before you get started, make sure you have the following ready:

  • A Linux host with Docker installed or a NAS that supports Docker.
  • Homebridge does not work when running in Docker for Mac or Docker for Windows due to this and this.

Synology, Unraid, or QNAP NAS Users:

Portainer Users:

Firewalla Gold and Purple Users:

Install Homebridge

The Homebridge Docker image supports amd64, arm32v6 and arm64v8 host architectures. The correct image for your system will automatically be downloaded.

Step 1: Ensure Docker Compose is installed

Docker Compose is the easiest way to start and maintain your Homebridge Docker image. Make sure you have the latest version of the docker-compose command installed on your system.

See https://docs.docker.com/compose/install/ for instructions.

Step 2: Create Docker Compose Manifest

After ensuring Docker Compose is installed create a new file named docker-compose.yml that contains the following:

version: '2'
services:
  homebridge:
    image: homebridge/homebridge:latest
    restart: always
    network_mode: host
    volumes:
      - ./volumes/homebridge:/homebridge
    logging:
      driver: json-file
      options:
        max-size: "10mb"
        max-file: "1"

For more details on the environment options see the homebridge/docker-homebridge project page.

Step 3: Start Homebridge

Run the following command to start the Homebridge Docker container:

docker-compose up -d

Complete: Login to the Homebridge UI

The Homebridge UI web interface will allow you to install, remove and update plugins, and modify the Homebridge config.json and manage other aspects of your Homebridge service.

Login to the web interface by going to http://<ip address of your server>:8581.

To find the IP address of your server you can run:

hostname -I

Review the Configuration Reference at the bottom of this guide.

Major Node.js Version Updates

To upgrade Node.js you will need to download the latest version of the Docker image. This can be done using the following commands:

# run these commands from the same directory you created the docker-compose.yml file in
docker-compose pull
docker-compose up -d

After running these commands your Homebridge Docker container will automatically restart if there was an update available.

Configuration Reference

This table contains important information about your setup. You can use the information provided here as a reference when configuring or troubleshooting your environment after setting up Homebridge using the instructions below.

File Location / Command
Config File Path /homebridge/config.json (inside container)
Storage Path /homebridge (inside container)
Restart Command docker restart homebridge
Stop Command docker stop homebridge
Start Command docker start homebridge
View Logs Command docker logs -f homebridge
Clone this wiki locally