I’m having trouble determining the best approach to certbot/duckdns/nginx…
I have one duckdns subdomain and my own .eu domain with two subdomains (hassbian.mydomain.eu and unifi.mydomain.eu - my unifi controller and hassbian are both running on separate RPIs). I want to direct mydomain.eu subdomains to myduck.duckdns.org, which in turn will terminate at my Unifi Security Gateway, which will forward traffic on port 443 to hassbian.mydomain.eu where I would have Nginx reroute unifi.mydomain.eu 443 traffic to port 8443 (unifi) on the other RPI within my network and hassbian.mydomain.eu to my hass instance at port 8123.
how the hell would I set something like this up with certbot? I’m currently using Ludeeus’ duckdns/dehydrated suite, but I feel it’s somewhat limiting in a more complex setup like this…
Some of the steps seem unnecessary unless you have some reason for them that’s not included in this post; I have a very similar setup without the DuckDNS or Nginx steps. Your hosting provider should allow you to set DNS records that will forward subdomains to certain ports which your UniFi controller can then forward to the proper local IP addresses/ports.
IE:
Thanks for the reply. DuckDNS is added to the mix because my ISP does not offer static IP addresses. However, since I recently switched my domain names to Gandi, I might be able to use their LiveDNS API to achieve the same and drop DuckDNS.
This script might do the trick:
I’ll try it out and report back tonight. That decomplicates my setup quite a bit and should help in getting certbot set up.
Quickly googled for USG/Gandi integrations, but doesn’t seem to support it.
I came across nexttop site as well, but given that it was published over 18 months ago, I’m not sure if it will still work. (from what I hear, Gandi has made some recent changes to the LiveDNS product).
In any case, I’ll give both a try and keep the community posted
If I were to do it this way I think I’d try using the DNS IP Sensor component along with an automation that triggers a cURL shell_command with the current IP as a variable. Something like: