Login stuck on "Loading Data" when trying to login externally

Hello,

I used DuckDNS with Let’s Encrypt and nginx for what I understand to be secure way to login externally. I can login locally with no issue. When I try to login externally it shows the home assistant logo and appears that it is loading. It even says “Loading Data.” But eventually it times out and says “unable to connect to Home Assistant. Retrying in XX seconds.” Or it just keeps on with the buffering circle saying “Loading Data.”
Also, trying to use Incognito mode does not work. It blocks it completely.

Please help in anyway you can. I would like to get this set up to be able to log in from other places besides when I’m at home and have already spent 8 hours of searching and trying new things to solve this.

Not sure where nginx sits in your setup, but you have to enable websocket if you do use it as a reverse proxy for HA.

Bottom-line: you are not precise enough in how you opened access to HA ffrom the wide world. DuckDNS + letsencrypt will just forward a domain name to your router and enable SSL on HA.

@koying thank you for the reply. Forgive me but I’m new to all this. I did find one comment buried deep in a forum about enabling websocket but that was it. I could not find how or where to do this. I did a brief search and could not find anything as far as how to do it. Just some people suggesting that it be done. Can you provide any guidance as to how to enable websocket?

How did you install and configure nginx?

@koying
I followed and tried two separate videos. Everything else is working. Just not remote access. Here are the two that I followed.

What is exactly the configuration of your nginx addon?
What port forward did you put in place at your router?
Any errors in the HA log?

Actually yes. I forwarded to port 443.

As far as the errors I do have “login attempt or request with invalid authentication from xxxx”

Xxxx being the IP address.

Also a few others related to cameras like one that says error fetching active dings data.

Also, is this what you were asking as far as configuring nginx?

http:
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24

Do you mean from port? Because you will forward to HA on port 8123

What IP address? The one you do an actual request from?
If so, it means the setup basically works, and the issue is more obscure…

I wish I knew the answer. I followed the instructions for my router to set up port forward. In the video they just said to put 443. At no time is there ever any terminology that says port forward “from” and “to”. I’m sure I’m showing you how much I don’t know but I’m trying to learn it. But for my router the only options are global port range _____ - ______ ( I entered 443-443) and there is another box for Base Host Port (which the instructions again said to enter 443).

The strange thing is if I enter in the domain I made at duckdns on my iPhone it has no problems loading the page and will let me log in. It doesn’t load any of my cameras but I can go to file editor and navigate through all the menus.

@koying
Update: Earlier today, about 8 hours ago, I was able to log in externally. I could see and navigate fine. The only issue was some of my cameras were slow to load the stream or did not load the stream at all. Now, as of 5 minutes ago, it will no longer let me in and is back to saying “Loading Data” with a constant spinner buffering wheel.

My next wild guess would be that the duckdns addon does not (or cannot) properly update your external IP address. That could explain why it sometimes work and sometimes doesn’t

Hello,

I have the same problem…

Was able to get in for few min and then now not possible…

In my case I use my Synology Nas a reverse proxy and also certificate / website provider.

Were you able to solve it?