[quote=“Spudz72, post:34, topic:190921”]Hi everyone. I have a Synology DS1812+ with an Intel Atom D2700 processor. Assume this willl work just fine with this Nas?
My main question is if I want to install this on get it all configured from a Windows machine what files do I need? I already enabled SSH and installed Docker from the Package Center. For SSH I used Putty for windows and was able to SSH into my NAS just fine. I am lost on what files to use from there? How do i create the files needed and copy/paste the code required into them? If anyone can help me with this part it would be appreciated. I think I can figure out the rest…[/quote]
Hi, you probably already have the “docker” folder on your Synology after installing Docker there. Make another one inside it called “homebridge”. This is where you would put the files from @tahitibub instructions in this post. You can create the files in Windows, make the Synology “docker” folder shared so that Windows can see it, and copy the files there. In fact, you can do most of the editing in Windows. You only need SSH to run docker commands.
I modified the run.sh file to include dbus workaround (to help with docker start/stop commands), and redirected the homebridge output to the log. That allows me to connect to the running homebridge instance any time I want to check on things.
#!/bin/bash
# MODIFICATION DES PARAMETRES DE AVAHI
# AVAHI SETTINGS MODIFICATION
sed -i "s/^rlimit-nproc=3/#rlimit-nproc=3/" /etc/avahi/avahi-daemon.conf
sed -i -e'/AVAHI_DAEMON_DETECT_LOCAL/s/1/0/' /etc/default/avahi-daemon
# DBUS workaround
rm -r /var/run && rm -r /var/lock && ln -s /run /var/run && ln -s /run/lock /var/lock && rm /run/dbus/*
# LANCEMENT DES SERVICES DBUS, AVAHI, HOMEBRIDGE
# RUNNING DBUS, AVAHI AND HOMEBRIDGE SERVICES
dbus-daemon --system
avahi-daemon -D
# homebridge
homebridge > homebridge.log 2>&1 &
echo Check homebridge status: cat homebridge.log
/bin/bash
Once the files are in that folder, login with Putty to your Synology as a root, then use these commands:
cd /volume1/docker/homebridge
docker build -t jessie_homebridge .
docker run --net=host -p 51826:51826 -v /etc/localtime:/etc/localtime -v /volume1/docker/homebridge:/root/.homebridge --name homebridge jessie_homebridge
If all went well, you will have the image called jessie_homebridge that you can see in the docker registry:
docker images
And you will see the running instance called “homebridge”:
docker ps
Now you can connect to the homebridge instance to see if it’s working:
docker exec -it homebridge /bin/bash
Once in it, check the log, processes, then you can exit the session, the docker will keep running:
# cat homebridge.log
# ps aux
# exit
To stop and start the instance, use these:
docker stop homebridge
docker start homebridge
The “docker run” command actually creates a new instance, so if you need to re-create it with the same name, then you should remove the old one first. To rebuild the image, you need to remove the image as well. Use these commands for cleanup:
docker rm homebridge
docker rmi jessie_homebridge
Note that start/stop from Synology docker UI does not work, it removes --net=host option and re-runs it. It basically means that the instance will not survive Synology reboot. I still don’t know how to make it work with their docker package. Not a big problem for me, I run it on power backup and rarely reboot.
Many thanks to @tahitibub for creating this docker image!