How to access Home Assistant in case of problems with DuckDNS or Letsencrypt?

I have had Home Assistant working with DuckDNS and a Letsencrypt SSL certificate for months now.

Ever since I set this up, I am no longer able to access Home Assistant locally. This is fine by me, however last week I was not able to log in because of a certificate error. Fortunately the error disappeared after I cut the power to my NUC and rebooted.

This got me thinking, how do I access Home Assistant in case of problems with DuckDNS or for instance an SSL certificate that has expired? Is there a way to allow local access through the default URL and port and have this side by side with DuckDNS for remote access?

Just use https:// with the LAN IP (and port). You’ll have to click through the warnings but it works.

Your other option is to move SSL to a reverse proxy, like NGINX, so that you can still access HA locally with http://.

For me the best way is to use PiHole local DNS record just set your domain (like myhomeassistant.duckdns.org) to the local IP adress of HA and then if you use for example: myhomeassistant.duckdns.org:8123 (you need to incloude the port number in the adress in browser or app) within your local network you will get HA page without going through duckdns serwers. This will work great if there is a problem with duckdns and with your local network everything will work fester.

1 Like

This is not working for me, when I use the local IP and port the request eventually times out and nothing happens.

When I use the external IP and port (the one where DuckDNS is configured to) I get an error from Home Assistant:

image

homeassistant:
  external_url: https://xxxxxxxxxxx.duckdns.org
  latitude: xxxxxxxxxxxx
  longitude: xxxxxxxxxxx
  elevation: xxxxxxxxx

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  ip_ban_enabled: false
  login_attempts_threshold: 5

Then are you sure HA is even running?

Yes HA is running. I can access it through duck DNS just fine. That’s why I don’t understand. I should be able to access it through the external IP and port but I can’t. Is there some setting/configuration in HA preventing me from doing this?

Ok… so … if remote access works, why are you using the external IP? Why not just use the duckDNS URL that works?