Skip to content

Homebridge on LibreELEC

Northern Man edited this page May 1, 2024 · 11 revisions

This guide will show you how to run the homebridge/homebridge docker image on a LibreELEC device.

1. Enable SSH Access

From the Kodi Confluence main menu, navigate to SYSTEM -> LibreELEC -> Services -> Enable SSH

2. Install Docker Add-on

From the Kodi Confluence main menu navigate to Add-ons -> Download -> Services -> Docker

3. Connect Over SSH

We should now be able to log in to LibreELEC via an SSH session on another machine on the local network. From this remote machine, enter the following:

ssh root@<IP address of the LibreELEC device> 

Provide the default password of libreelec or openelec.

4. Disable LibreELEC's Avahi Service

LibreELEC's avahi-daemon service conflicts with the Homebridge process, so you need to disable it first:

systemctl stop avahi-daemon
systemctl disable avahi-daemon

5. Create Homebridge Storage Directory

This is where your Homebridge config.json and other important files will be stored.

mkdir /storage/homebridge

6. Start Homebridge

Run this command to start Homebridge.

docker run -d --restart=always --net=host \
  --name=homebridge \
  -v /storage/homebridge:/homebridge \
  -e HOMEBRIDGE_CONFIG_UI=1 \
  -e HOMEBRIDGE_CONFIG_UI_PORT=8581 \
  homebridge/homebridge:latest

7. Ensure Homebridge Starts On Boot

Some users have reported Homebridge is not starting on boot despite the container being start with --restart=always. Use this workaround if you're experiencing this problem:

Open /storage/.config/autostart.sh for editing in nano:

nano /storage/.config/autostart.sh

Add this line to the bottom of the file:

docker restart homebridge

8. Managing Homebridge

To manage Homebridge go to http://<IP address of the LibreELEC device>:8581 in your browser. For example, http://192.168.1.20:8581. From here you can install, remove and update plugins, modify the Homebridge config.json and restart Homebridge.

Homebridge UI

Useful Docker Commands

Viewing Logs

docker logs -f homebridge

Restarting Homebridge

docker restart homebridge

Removing Homebridge Container

docker rm -f homebridge

Download Latest Image

docker pull homebridge/homebridge:latest

After downloading a new version of the image, remove the existing container and recreate it using the command shown in Step 6. You won't loose any config or settings since this is stored in /storage/homebridge.