Add local (http) access to running DuckDNS add-on setup

Actually, it would be easier. You could just add an A record for your local ip of home assistant to your pi hole, no need for dnsmasq.

Do you have any idea why I can connect using my desktop PC (using both Ethernet and Wifi) but not my smartphone (neither any browser nor companion app)?
My idea is that this is maybe due to a different Wifi network (I have both 5 Ghz and 2,4 Ghz running). How could I solve this?

Oh, great. So I would do this to my current configuration:

  • Add cert files back to configuration.yaml and remove trusted proxies
  • Disable NGINX add-on
  • Add A record to pi-hole
  • Set router port forwarding back to forward 443 external to 8132 internal

Ah yes, that explains it, thanks @nevial

Are you talking about difficulty connecting via https? I had that problem too, initially. It had to do with the type of certificate being used not being supported by the browser on my phone.

However, since you also don’t have proper name resolution configured, you may also be getting a certificate error if you’re trying to access it via ip instead of by name. Some mobile phones won’t allow that to happen, either.

Id set up name resolution first, and see if the problem persists. If it does, then the issue is likely the certificate type.

Take a look at that same video, but a but earlier. Maybe around the 3:30 mark or something I think? It’s during the duckdns config where you configure the encryption. Set it to the same value I did in the video.

If, on the other hand, you are not talking about https, and are instead talking about just being unable to access it at all, that’s likely a routing issue.

Sorry, I should have specified what I meant. Currently, with NGINX running, I can access on my desktop using both local IP (http) and DuckDNS domain (https). On mobile while being connected to my local network, I can only connect using DuckDNS domain (https) but not local IP (http) - because of that I cannot set the local IP in the companion app

Exactly!!

This one (for future reference):

That is odd. I have set local and external addresses to my companion app (both iOS and Android) and the system manage the different connections nicely.

Which error message are you getting?

Are you able to access it in a browser on your mobile device, or have you only tried via the companion app?

I tried both companion app and browser (different browsers as well) and neither work. I get a “ERR_CONNECTION_REFUSED” in the browser

There is nothing in my ip_bans.yaml and I tried with and without Cloudflare enabled in the NGINX add-on

And I just tried with the 5 Ghz network disabled in my router, problem persists

Oh I am so sorry, I think I just had transposed digits in the port number, my fault

1 Like

Ok, my local version is now working @ http://homeassistant.local:8123/

But now I can’t connect anymore from outside my network. Probably a port forwarding, but I can’t think of what to try there.

When I try the normal url: https://xxxx.duckdns.org:8823/ I get this: NET::ERR_CERT_COMMON_NAME_INVALID

I have a port forwardings:
External port 444 to local 192.168.1.4 port 443
External port 8823 to local 192.168.1.4 port 8123

In the end, are you currently using NGINX or not?

If you want it using NGINX, just go back to this step: Add local (http) access to running DuckDNS add-on setup - #3 by EdwardTFN

If you don’t want to use NGINX, go back to this step: Add local (http) access to running DuckDNS add-on setup - #11 by exx

:wink:

Yes I’m using NGINX. Sorry for the confusion, I didn’t realise two different solutions were discussed here :slight_smile:

1 Like

I choose NGINX, only problem seems to be that I cant forward port 443 in my router, since that is already forwarding to my synology. Hence my choice for 444 forwarding to local 443

So, what is working and what is not working?

I’m want as minimal addons as possible so skip the nginx part is great.
But don’t get the make a A record. Is this what you showed in the video at 4:50?
And what do i type in the companion app as local adres. Is it the xxxx.duckdns because local IP doesn’t work. As externel I have xxx.duckdns:8123 and that works.