How to expose Home Assistant publicly with SSL with duckdns and Nginx Proxy Manager

After spending quite a time, trying to set this up I have come down to the following things that worked for me, maybe it will help someone:

Duckdns

First create a duckdns account and setup the DuckDNS addon. If you have your own domain you can add a subdomain A record to resolve to your public IP and not use DuckDNS at all.
in duckdns addon configuration add your duckdns Domain e.g. my.ducksdns.org and set the token

Router

Forward Port 80 on Router to Port 80 homeassistant IP. This is required for letsencrypt. Otherwise you might not be able to obtain a certificate.
Forward Port 443 on Router to Port 443 homeassistant IP

Home Assistant

In your configuration.yaml

Nginx Proxy Manager

Now add the domain in Nginx Proxy Manager, set

  • domain to my.ducksdns.org
  • scheme to http
  • forward hostname/ip to homeassistant.local or 192.168.x.x (this should be the IP of your homeassistant)
  • port to 8123
  • enable websockets support

On SSL tab, select Request a new SSL certificate, select Force SSL and click save That should be it, now your homeassistant should be accessible at https://my.ducksdns.org

Home Assistant

In home assistant settings > system > network > Home Assistant URL set the https://my.ducksdns.org there.

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Spelling error report

The following text will be sent to our editors: