Homebridge Docker Swarm setup

Deploy Homebridge with Docker Swarm

Wed, 06 Mar 2024

Usage

I use homebridge to control my Apex Neptune aquarium controller via a homebridge plugin I created myself

Docker Swarm

I am a firm believer that CPU should be left to unlimited on every service that is meant to run 24/7 and that you should limit your memory to prevent OOM issues. Your memory limit should never exceed your requests limit. I had to change the port in order to get it to work. This will expose the port 8581 on the host and it should work. One thing to note, you should set this up to deploy only on a single host. I haven’t tested the broadcasting to see if my homepod would correctly pick this up if it can’t switching nodes.

version: "3.9"
services:
  homebridge:
    image: homebridge/homebridge:ubuntu
    networks:
      host: {}
    environment:
    - HOMEBRIDGE_CONFIG_UI_PORT=8581
    volumes:
    - /shares/docker/homebridge:/homebridge
    deploy:
      placement:
        constraints:
        - node.hostname == node1 # change node1 to the hostname of your server
      resources:
        reservations:
          memory: 1G
        limits:
          memory: 1G
Buy Me A CoffeeDigitalOcean Referral Badge
Loading...
Edward Beazer

Edward Beazer - I just like to build shit. Sometimes I get stuck for hours, even days while trying to figure out how to solve an issue or implement a new feature. Hope my tips and tutorials can save you some time.

DigitalOcean Referral Badge