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 the duckdns addon configuration add your duckdns Domain e.g. my.duckdns.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 head over to Nginx Proxy Manager > Hosts > Proxy Hosts and add the domain.

Set

  • Domain names: my.duckdns.org
  • scheme to http
  • forward hostname/ip to homeassistant.local or 192.168.178.92 (this depends on you network configuration and should be the IP of your homeassistant like you access it from your browser)
  • 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.duckdns.org

Home Assistant

In Home Assistant settings > System > Network > Home Assistant set the external URL there to https://my.duckdns.org.

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: