Home Assistant internal URL without HTTPS?

Hi everyone,
I just ran into an issue today. My HomeAssistant is set up for HTTPS, using a LetsEncrypt certificate on my domain. Everything works great with this. I can access it through the app at home, and from outside my network. Perfect!

Then today my internet went down. No problem, I run everything locally and am not reliant on the internet! … I thought. No DNS lookup, no certificate lookup, no Home Assistant. Connecting directly to my server’s local IP doesn’t work. The Home Assistant app simply doesn’t work, even on my local network, unless I can connect to the internet.

Is there any way to get Home Assistant to listen to my local network on HTTP, and HTTPS externally? I believe I need external HTTPS for Google Assistant integration, but I don’t like not being able to set my thermostat without an internet connection due to HTTPS.

Thanks!

1 Like

Use a reverse proxy.

3 Likes

It does for desktop web browsers. All you have to do is add a security certificate exception and browse to https://[ip address]:8123

1 Like

Regarding a reverse proxy, if you’re on home assistant os you can install nginx through the add-on store.

4 Likes

You’re right. I had tried setting this to the app’s “Internal URL” and it didn’t seem to work, but when I tried on desktop I forgot to specify “https”, so took the “Server Returned No Data” error as “Server responded and said ‘nope’”.

It looks like setting up a reverse-proxy is the long-term solution that I’ll eventually set up so the app works, but I’m very glad that I’m not actually locked out of HA in the case that I lose internet.

Thanks for the help everyone!

Yeah setting up a reverse proxy is on my list of things to do. It has other advantages. Like being able to access the HA api without setting restful verify ssl to false (which works but that spams the log with warnings).

I ran into the same issue but have finally managed to this working without a reverse proxy. Here is what I did.
I have 2 dynamic dns drayddns.com and dyndns.org addresses linked to my router. so from the WAN both will hit the router. Port 8123 is forwarded to HA internal IP.

The HA LetsEncrypt certificate includes both ddns adsreses. However in the System-Network settings I can specify only one so I set the dyndns.org address as my URL. set the internal url option to Automatic .
In the HA app - settings - companion app - server settings I set the same URL as external URL . I did not set anything for the Home Network Wifi SSID nor the internal URL.
On my Router ( I am using Draytek) I set a LAN DNS entry. All lookups to my dyndns.org URL will get internally redirected to the HA instance. Test this with a ping to the external URL and you should see the IP of HA responding.
This works fine with the browser and app from the WAN and LAN with or without WAN connection too.
Only drawback is that inside the LAN I cannot use the dyndns.org URL for any other purpose as it will never hit the WAN ports of the browser.