ryansch / docker-unifi-rpi

Unifi Controller for Raspberry Pi 3+ and x86
https://hub.docker.com/r/ryansch/unifi-rpi/
347 stars 42 forks source link

Extended Traefik solution by certdumper for guest portal #37

Closed Aeon512 closed 1 year ago

Aeon512 commented 5 years ago

By défault Traefik will obtain an SSL certificate on-the-fly, e.g. using Let's encrypt. While this can used to proxy the access to the admin interface of the UniFi controller, the guest portal will still use the embedded self-signed certificate on port 8843.

The solution presented below, will use some scripting from Traefik to export the obtained certificates (hence the need to access the acme.json), convert it to the corresponding format (PKCS12) and then import it into the UniFi controller keychain (hence the need to access the UniFi config volume) and restart the image (hence the access to the docker socket).

Hope this may help some...

ryansch commented 5 years ago

@Aeon512 Thanks for the pull request! I'll need to find some time to put it through its paces. Are you up for some feedback and changes or would you like me to run with any edits I may have?

Aeon512 commented 5 years ago

@ryansch Both is fine for me. Feel free to adjust or edit as necessary or feedback here to me and I will take care of it.

In the end it is a vanilla container with some scripting which sets everything up during boot up.