Homebridge – Server Build

Go and get yourself a Raspberry PI – then come back here and lets build the Homebridge Server now – it needs to be a Model B or later and mine works fine with a quad core processor with 1gb of RAM.

CanaKit Raspberry Pi 3 B+ (B Plus) Complete Starter Kit - UK Edition (32 GB Samsung EVO+)

Last update was on: 14/08/2022 00:47
out of stock

Welcome back – Let’s have a think about our installation strategy. I have picked up on the fact that many installers use docker to facilitate installation of the operating system, but its worth noting that if any of the many plugins which we could possibly install will access the Bluetooth Radio or the GPIO of the Raspberry PI, or need to provide hardware video decoding – that using Docker to run Homebridge may complicate the setup. Hence I chose set up Homebridge with Systemd:

Installing Homebridge on a Raspberry PI

In this instance my raspberry pi was running docker and I connected using putty over SSH. Once the SSH terminal is connected, type the following –


ssh pi@(PI)



Create a new folder called “homebridge” and enter it –


mkdir /home/pi/homebridge
cd /home/pi/homebridge

Next create a new file, here is how to do it with the nano text editor –


nano docker-compose.yml

Now simply paste the following lines into the file you created:



version: '2'
image: oznu/homebridge:raspberry-pi
restart: always
network_mode: host
- ./config:/homebridge
- PGID=1000
- PUID=1000

Now hit “CTRL+O” to save and “CTRL-X” to exit the editor. Now start the docker container by issuing the commend below –


docker-compose up -d


When run for the first time initialisation may take a few minutes, however – the WebUI will become visible on http://(IP):8080. At this point SSH can be disconnected as from this point we will control using the WebUI. Homebridge is now fully configured and is set to restart automatically in the event of power loss. Now proceed to the above URL and log in using UN:admin/PW:admin.



I recommend changing the password by going to the user panel on the top right of the main page, then click edit next to the admin account and change your password from there.


Then if you want to control your lights from this website directly, you can enable “insecure mode” by clicking the docker icon in the top right corner, select settings and enable “insecure mode” from here



Basic bridge configuration


On the config tab, you can specify your Homebridge settings

    • “name”: “Homebridge”, -> Name of the bridge as shown in Homekit
    • “username”: “C1:D2:3D:23:8E:3A”, -> Mac address of bridge as shown in homekit
    • “port”: 51827, -> Operating port, leave default
    • “pin”: “078-59-618” -> Pincode for adding the bridge in Homekit, this will be a scannable QR-code later

    As a safety precaution, I recommend to at least changing these values from their defaults. Then save your config and reboot your container by clicking the docker icon on the top right and select “restart container”

    !– wp:html –>

    Now finally open the Homekit app and click the + in the top right corner, then scan the code on your Homebridge dashboard. The bridge should automatically appear in your Home. Any devices added later should now automatically appear in your dashboard. The setup is complete and you can now add any smart devices that are currently supported by Homebridge. Eventually, your list should grow quite fast now you won’t have to pay the “premium” price for Homekit compatible hardware and generally have more smart devices to choose from.

Homebridge – Server Build
Homebridge – Server Build

We will be happy to hear your thoughts

Leave a reply

Homekit - Homebridge Integration