Tuesday, February 6, 2018

Unifi controller docker image not working on Synology until...

I wanted to install a docker image into a running container using the fine work done by Jacob Alberty. And follow these steps. Unfortunately, I could not access the website on https://yournasip:8443. I was pulling my hairs out as I could see that the container was running, TCP IP4/6 ports were open, yet I could not access any website. I double checked that my firewall on the NAS was not blocking traffic, but that was not the case. I therefore reverted to starting the container from the command line. (Please note that I ommited the --init flag, as this flag (from 1.13 onwards) is not yet supported on the Docker version on my Synology (1.11.2).)

docker run --rm -p 3478:3478/udp -p 6789:6789/udp -p 8080:8080 \
-p 8443:8443 -p 8843:8843 -p 8880:8880 -p 10001:10001/udp -e TZ='Europe/Paris' \
-v /volume1/docker/unifi:/unifi --name unifi jacobalberty/unifi:stable

And tadaaa! Suddenly, I was able to access the Unifi Controller again. But when I stopped the command on the command line, the container would stop. So I needed a little trick.

  1. Start the docker container from the command line through an SSH session in the terminal.
  2. Verify that you can access the Unifi Controller
  3. Go to DSM and login, start the Docker app
  4. Click on 'Container' and identify the unifi container. Right-click it, go to Settings and then Duplicate Settings. A copy container will be made, named unifi-copy.
  5. Kill the docker command from the terminal. But now you have a second copy.
  6. Tweak and configure the copy container as you like and start it from the DSM.

Alternatively, you could also use the -d option as per documentation.
--detach , -dRun container in background and print container ID

No comments:

Post a Comment