Register different name than 'homeassistant.local'

Hello I’m running home assistant on RaspberryPi 4. Installation was ok. What’s important here is that at the very begging it was accessible via homeassistant.local:8123 without any problem.
(this is the boring part)
Now I have set up to use DuckDNS for https. That works. I changed the http port to 433 so from the internet it’s even accessible via https://xxx.duckdns.org (without giving the port).
But (that was the reason of installing HA :blush: ) I want to be able to shut down my zigbee endpoints even if the INTERNET is DOWN, so totally via local network. My modem+router is so poor that it do not have possibility to set DNS names statically.
Mobile HA app is NOT allowing to connect via “homeassistant.local” because there is mismatch between name and SSL certificate. So it seems I must use xxx.duckdns.or_g name, but this won’t work if the internet will be down.
Long story short:
So I was thinking that if HA magically “registered” itself in my network as “homeassistant.local” maybe there is possibility to either change it or set an xxx.duckdns.org alias.
Then if I will be at home it will use same name but locally and when outside the normal DNSes will also give response.

(I put _ somewhere because it didn’t let me to create post)

Just use http://ipaddressofyourHA:8123

i.e. http://192.168.1.100:8123 (as an example)

It still does not work. Mobile app is still saying there is a mismatch between hostname I called (either IP or homeassistant.local) and the SSL hostname for which it was issued (xxx.duckdns.org)

That’s unrelated to the use of homeassistant.local

That means that you configured HA to handle SSL, and you’re not using the hostname to connect.

The solution is to move SSL to a reverse proxy.

That means that you configured HA to handle SSL, and you’re not using the hostname to connect
That’s basically what HA mobile app says.

The solution is to move SSL to a reverse proxy.
I’m bit technical but this says nothing to me. Can you guide me somehow? I just set up duckdns with duckdns add on to access it both from home and outside.

There are two settings in the mobile app - one specifically for the local address. However if you’ve forced HA into SSL that won’t work.

I’d recommend using the add-on Nginx Proxy Manager. It makes it all very very easy. If you use it just make sure you undo the changes you made in the configuration.yaml already.

image

Ok I will check it.
I was thinking about forcing my modem-router to use HA as DNS source, in HA insert that one xxx.dyndns.org to point to HA adress and forward other requests to external DNSes, but my modem-router seems to obtain configuration from telco provider and I don’t have an option to change them. What a crap.
Let’s see this nginx.

However if you’ve forced HA into SSL that won’t work
well I decided to do that once I needed to have it available from other places than home.

If you use the add on you don’t need to force HA into SSL mode - allowing you to use https and http.

But will it be still secured by SSL (from internet)?

Yes

That’s the basic setup I ran for long enough. Remote access goes to the proxy server, which handles SSL and forwards the connection (now unencrypted) to HA. Local access goes directly to HA.

Can you explain a bit more? Should I use proxies or redirection hosts? Should I somehow import SSL certificates? DuckDNS add on somehow registered and created it by itself should I import these which are now placed on HA or configure let’s encrypt separately?

When trying to add ssl with my domain i receive this:

image

So maybe locally? (download from HA via Samba → add to nginx from pc)

And I’m thinking… will this work without internet?

I understand that I can set up 80 calls to be used in mobile app, but will it then work locally if I will not have internet?

Yes

Because remotely you’ll be connecting to https://yourhost.example.org/ and locally you’ll be connecting to http://192.168.0.42:8123/

This guide may help you.

Is my understanding correct that when I will disable enforcing SSL, Nginx add-on takes on itself the ‘SSL things’ from internet and then forward them to unsecured local HA, and locally I access HA just by homeassistant.local:8123 adress?
And that is what is supported by mobile app? 2 adressess: 1 http and 1 https ?

That’s correct. I’m using https:// when I’m not home, and http://homeassistant.local:8123 when I’m home. The proxy takes care of SSL for the domain.

1 Like

Are we talking about mobile app? That’s cruicial :slight_smile: Will mobile HA app support it?

Yes it will

1 Like

Ok. It seems to work right now. I can access HA in home and can access via LTE (symulating out of home). The final test will be when I will unplug/disconnect access to internet (so to check if it works as desired). Now I can’t test it because I need internet for work :stuck_out_tongue:

Thank you all for your help.

1 Like

Can you help me to understand why the reverse proxy method gets mentioned so much around here, rather than simply using duckdns for external access and dnsmasq for internal access? Reverse proxies are much more complex, and with the ever-increasing popularity of Home Assistant, the user base is growing less and less technical…