Run Homebridge in Docker on Raspberry Pi

posted in: Uncategorized 0

This is part of a multi part series of how to connect zigbee devices to Home Kit using HomeBridge Conbee II, deCONZ and phoscon.

After first configuring Raspberry Pi OS and installing docker, we can now setup our Home Bridge in a docker container.

Find the user ID of the pi user

id pi

This will likely be the default of uid=1000 and gid=1000

Make a folder for the docker config

mkdir /home/pi/homebridge

Edit the docker compose yaml file

vi /home/pi/homebridge/docker-compose.yml

Modify the below with a unique UUID if needed

version: '2'

services:
  homebridge:
    image: oznu/homebridge:raspberry-pi
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./config:/homebridge
    environment:
      - PGID=1000
      - PUID=1000
      - HOMEBRIDGE_CONFIG_UI=1
      - HOMEBRIDGE_CONFIG_UI_PORT=80

Install homebridge in a docker container

In the same folder as the docker-compose.yml configuration file, run docker-compose

cd /home/pi/homebridge
docker-compose up -d

This will download the docker files and install them, and will display done when complete.

To see the container run

docker ps

If everything is running, you can now access homekit at http://raspberrypi.local

Default homekit credentials are:

Username:admin
Password: admin

You can now configure homebridge, restore a backed up homebridge configuration, or move on to configuring Conbee II with phoscon in docker.