Problem http/https

Hello everyone,

I am struggling to access my home assistant server using http on my lan. I am getting an error message “Connection reinitialize” on firefox and “ERR_EMPTY_RESPONSE” on Google when using my internal URL… No problem with my external URL…
I defined in configuration.yaml the external and internal URL to access HA.

homeassistant:
  external_url: "https://<my DNS>:8123"
  internal_url: "http://<local hostname>:8123"

The server is rejecting the internal connection as it is not an https request… Any way to work around this by adding maybe some trusted IP’s ? Any additional info you need ?

Configuration:

  • HassOS: 5.10
  • Using Let’s Encrypt

Thanks !

Hi, have you just configured LE now that you run into this problem?

You need to use https, not http internally (unless you are using a reverse proxy)

I just tried that possibility recently… Since months, I use https with the external URL to connect to HA from inside or outside of my LAN… I would like to avoid to use the external URL and just connect directly using my LAN address…

Internally you could use https, like @anon43302295 states, and your browser will be able to make an execption for the certificate so you can access HA.
If however you also use the mobile app, my recent experience is that you HAVE to setup a reverse proxy, like @anon43302295 says.

Have a look at this Remote access for Home Assistant
Your problem is now local access but that topic describes the whole situation.

EDIT: https with local hostname/IP that is

1 Like

Unfortunately, I am using the HA App… I will try to setup a reverse proxy then… Thanks !

The problem with the HA companion app is that it cannot make an exception on the LE certificate, were as a browser can (try a browser on your mobile to see that this works), so you run into problems connecting from LAN, therefor the reverse proxy.

Iternally you should used http://IP:8123 which will work and https://

Calling local hostname sometimes prevented by the router and it will cause problem.

@Nick4 @anon43302295 @KingRichard I used NGINX with DUCKDNS so I can still use my own domain (using an alias in Duckdns) + the possibility to connect from http (internally) and https (externally). That you for your help all !

2 Likes

if you are using raspiOS or ubuntu then you should install this

apt-get install -y avahi-daemon avahi-discover libnss-mdns

and your localhostname should work. You can tested by ping <hostname>