Tried to set up DuckDNS, now can't access Home Assistant

I was trying to set up DuckDNS to access my Home Assistant remotely, and now I can’t log in at all.

I am getting an error " NSURLErrorDomain Code -1005".

I have a monitor connected to the computer that it is running on (Home Assistant Blue), the command line is showing up, I don’t see any errors. It shows the correct ‘Home Assistant URL’. I can also access the home assistant via Samba, so I can edit the config files if necessary. I also have access to the ‘ssl’ directory which contains the fullchain.pem privkey.pem files if there’s something I need to edit or remove there.

Can someone please help me to figure out how to restore access to the home assistant?

Sometimes it helps including error message in search, in google as well as here

https://community.home-assistant.io/search?q=NSURLErrorDomain

1 Like

You should still be able to access https://<ip_address>:8123 locally. Though you will have to add a security exception to your web browser to ignore the ssl certificate.

1 Like

Thanks, before I saw your comment, I commented out the lines for the http that I had added to the config file, and was able to log in:

#http: 
# ssl_certificate: /ssl/fullchain.pem 
# ssl_key: /ssl/privkey.pem

Is there something I need to do to make this work? This gets a little beyond my experience level, and I’m just trying to follow instructions online.

Edit: Do you mean if I use https:// instead of http:// I should be able to log in? I thought I had tried that, but it’s possible I didn’t.

Have you tried from an android or windows device ?

1 Like

Not yet, I tried from my Mac and from my iPhone. Didn’t try the PC.

If I uncomment the lines out that I mentioned and reboot, are you saying that I should then be able to log in via https://? Since I now know I can recover the computer if it doesn’t work, I may try resetting it to see if it works.

I appreciate your assistance. Can’t tell you how much anxiety it caused me when it wouldn’t log in.

Seems like mostly realated to Iphone, Mac and the “browsers” used there … maybe firefox will get you “through” … and in regards to mac/ipho im “out” , sorry, i don’t even intend to get “inside” this “area” :slight_smile:

Update: I reset the config file, and now I am getting the following message when I try to log in via https://

You’re about to give https://homeassistant.local:8123/ access to your Home Assistant instance.

Logging in with Trusted Networks.
Login aborted:
Your computer is not allowed.
[START OVER]

I tried turning off all ‘content blockers’ in the security settings of my browser (Safari/Mac) preferences, but that didn’t change anything, not sure if that’s what you meant by ‘add a security exception to your web browser to ignore the ssl certificate’, I don’t see anything else in the Safari

What do you have in the ‘homeassistant’ section of your configuration.yaml file? Make sure it has the entry for - type: homeassistant so you can at least log in with a username and password.

homeassistant:
  auth_providers:
    - type: homeassistant
    - type: trusted_networks
      trusted_networks:
        - 192.168.0.11
        - 192.168.0.12
        - 192.168.0.13
        - 192.168.0.14
        - 192.168.0.15
1 Like

Ah, thanks. I just realized that was also commented out (I had a similar problem months ago where I couldn’t log in and had commented that out to fix it). I must not have entered the network properly.

Forgive my naiveté, if my home assistant is on 192.168.123.456, (and I’m accessing it from 192.168.123.XXX), then what should I have for trusted networks? Ive seen some in the docs that have this:

      trusted_networks:
        - 192.168.0.0/24
        - 192.168.10.0/24

Not sure what the ‘/24’ signifies. Would I use 192.168.123.0? Or 192.168.0.0

trusted_networks:
  - 192.168.123.0/24 

would be correct. the /24 is the netmask. The first 24 bits (192.168.123) are for the network address and the remain are assigned to the subnet (.1-.254). A /24 network will be your typical home network with 254 assignable addresses

1 Like

Excellent, thanks again. I’ll try that out in a little bit.

At some point I’m going to have to setup a test server to run Home Assistant on so that I don’t have to worry about locking myself out while I’m trying to get something working.

I am so glad I am not the only one having this issue!

I dont really want to change to Cloudflare because I have already sunk soooo much time into getting my DuckDNS/Nginx Proxy setup.

I don’t particually want to use HTTP with out the S.

Any working around?

  • X

Yes, this is a 2 year old Topic, im sure there are quite a few Newer Topics / Solutions, if you use the search function ( try to variate the search words, to narrow it down you your particular use-case /Issue )