docker-homebridge
Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
Top Related Projects
Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
HomeKit support for the impatient.
Quick Overview
The homebridge/docker-homebridge repository provides a Docker image for running Homebridge, a lightweight NodeJS server that emulates the iOS HomeKit API. This project allows users to easily deploy and manage Homebridge in a containerized environment, making it simpler to integrate non-HomeKit smart home devices with Apple's HomeKit ecosystem.
Pros
- Easy deployment and management of Homebridge using Docker
- Includes pre-installed Homebridge UI for convenient configuration
- Regular updates and maintenance by the community
- Supports multiple architectures (amd64, arm32v6, arm32v7, arm64v8)
Cons
- Requires basic knowledge of Docker for setup and management
- May have slightly higher resource usage compared to a native installation
- Potential network configuration challenges in some environments
- Limited to the functionality provided by Homebridge and its plugins
Getting Started
To get started with the homebridge/docker-homebridge image:
- Install Docker on your system
- Pull the Docker image:
docker pull homebridge/homebridge:latest
- Create a Docker volume for persistent data:
docker volume create homebridge-data
- Run the container:
docker run -d --name homebridge \ --network host \ -v homebridge-data:/homebridge \ -e TZ=America/New_York \ --restart unless-stopped \ homebridge/homebridge:latest
- Access the Homebridge UI by navigating to
http://localhost:8581
in your web browser
Note: Adjust the timezone (TZ
) and network settings as needed for your environment.
Competitor Comparisons
Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
Pros of docker-homebridge
- More actively maintained with frequent updates
- Larger community and user base, potentially leading to better support
- Includes additional features and optimizations for Docker environments
Cons of docker-homebridge
- Slightly more complex setup process
- May require more system resources due to additional features
Code Comparison
docker-homebridge:
FROM oznu/s6-node:16.15.1-debian-v3.0.0
RUN apt-get update \
&& apt-get install -y \
ffmpeg \
libavahi-compat-libdnssd-dev \
libcairo2-dev \
libgif-dev \
libjpeg-dev \
libpango1.0-dev \
libpng-dev \
libudev-dev \
libvips-dev \
libx11-dev \
make \
python3 \
g++
docker-homebridge:
FROM node:14-alpine
RUN apk add --no-cache \
avahi \
avahi-compat-libdns_sd \
dbus \
iputils \
openssl \
sudo \
tzdata
The code comparison shows that docker-homebridge uses a more comprehensive base image and installs additional dependencies, potentially providing better compatibility and features. However, this may result in a larger image size compared to docker-homebridge.
HomeKit support for the impatient.
Pros of Homebridge
- Native installation without containerization overhead
- Direct access to system resources and hardware
- Potentially better performance for resource-intensive plugins
Cons of Homebridge
- More complex setup and configuration process
- Potential conflicts with system dependencies
- Less isolation from the host system
Code Comparison
Homebridge:
const hap = require('hap-nodejs');
const Accessory = hap.Accessory;
const Service = hap.Service;
const Characteristic = hap.Characteristic;
// Create and publish accessory
Docker-Homebridge:
FROM oznu/homebridge:ubuntu
ENV HOMEBRIDGE_CONFIG_UI=1
ENV HOMEBRIDGE_CONFIG_UI_PORT=8080
COPY config.json /homebridge/config.json
The Homebridge repository contains the core Homebridge code, while Docker-Homebridge focuses on containerization and deployment. Homebridge requires direct JavaScript implementation, whereas Docker-Homebridge uses Dockerfile configurations for containerized setups.
Docker-Homebridge offers easier deployment and isolation but may have slightly higher resource overhead. Homebridge provides more direct control over the installation but requires more manual configuration and system-level management.
Both repositories serve different purposes in the Homebridge ecosystem, catering to users with varying needs and deployment preferences.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Important Update
We have moved the hosting of the offical homebridge docker image from oznu/homebridge to homebridge/homebridge. Please update your environments as needed to pickup the latest image.
Homebridge Docker Image
This Ubuntu Linux based Docker image allows you to run Nfarina's Homebridge on your home network which emulates the iOS HomeKit API.
This is a multi-arch image and will run on x86_64, Raspberry Pi 2, 3, 4, Zero 2 W, or other Docker-enabled ARMv7/8 devices. Docker will automatically pull the correct image for your system.
Image Tag | Architectures | Base Image |
---|---|---|
latest, ubuntu | amd64, arm32v7, arm64v8 | Ubuntu 24.04 |
Step-By-Step Guides
- Running Homebridge with Docker on Linux
- Running Homebridge on a Synology NAS
- Running Homebridge on Unraid
Compatibility
Homebridge requires full access to your local network to function correctly which can be achieved using the --net=host
flag.
This image will not work when using Docker for Mac or Docker for Windows due to this.
Usage
Using Docker Compose (recommended):
- Create the file
docker-compose.yml
version: '2'
services:
homebridge:
image: homebridge/homebridge:latest
restart: always
network_mode: host
volumes:
- ./volumes/homebridge:/homebridge
logging:
driver: json-file
options:
max-size: '10m'
max-file: '1'
healthcheck:
test: curl --fail localhost:8581 || exit 1
interval: 60s
retries: 5
start_period: 300s
timeout: 2s
- Start docker with
docker compose up
Or Command Line:
docker run --net=host --name=homebridge -v $(pwd)/homebridge:/homebridge homebridge/homebridge:latest
Parameters
The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.
--net=host
- Shares host networking with container, required-v /homebridge
- The Homebridge config and plugin location, required
Optional Settings:
-e TZ
- for timezone information e.g.-e TZ=Australia/Canberra
-e ENABLE_AVAHI
- default is1
; set to0
to prevent the Avahi mDNS service running in the container
Homebridge UI
This image comes with the Homebridge UI pre-installed and is the easiest way to manage all aspects of Homebridge.
To manage Homebridge go to http://<ip of server>: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.
Automated Updates
Automated updates of the Homebridge Docker Image using tools such as Watchtower or similar are strongly discouraged and are done so at your own risk.
NOTE - The version of Homebridge IS NOT tied to the version of the container. You can update Homebridge, the Homebridge UI and the Node.js runtime from inside the container.
Troubleshooting
1. Need ffmpeg?
ffmpeg, with libfdk-aac
audio support is included in this image.
2. Container will not start on older versions of Raspbian
If you're seeing errors like the following, your host operating system needs to be updated.
See #434 and #441 for potential solutions.
Node.js[445]: ../src/util.cc:188:double node::GetCurrentTimeInMicroseconds(): Assertion `(0) == (uv_gettimeofday(&tv))' failed.
Aborted (core dumped)
homebridge_1 | s6-svscan: warning: unable to iopause: Operation not permitted
homebridge_1 | s6-svscan: warning: executing into .s6-svscan/crash
homebridge_1 | s6-svscan crashed. Killing everything and exiting.
homebridge | # Fatal error in , line 0
homebridge | # unreachable code
3. Ask on Discord
Join the Official Homebridge Discord community and ask in the #docker channel.
License
Copyright (C) 2024 homebridge Copyright (C) 2017-2022 oznu
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Top Related Projects
Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
HomeKit support for the impatient.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot