CasaOS - Home Assistant - Duck DNS

Hi everyone!
First oa fall excuse me if i don’t use the right terms but i’m a noobXD
I got some issue with Home Assistant.
My “server” runs with CasaOS and i got different applications. One of those is Nginx Proxy mengare where i menage the SSL certificates and Proxy Hosts. I menaged to have for each app an url that works fine in https but Home assistant gives me some problem. I double checkd that i typed everything right, i did that same as for the other app but when i tried to reach HS, from my network, with the new domain i got 400 Bad request.
I check on internet everywhere and i could not find someone with my same problem. Could someone please help me out???

Thank you in advance

Hi there! No worries about the terminology—we all start somewhere!

Based on your description, the 400 Bad Request error likely happens because Home Assistant needs some extra configuration to work behind a reverse proxy like NGINX Proxy Manager (NPM). While your other apps work fine with the basic NPM setup, Home Assistant is pickier due to its real-time features, like WebSockets.

Here’s how to fix it:

  1. Edit Home Assistant’s Configuration:
  • Open your configuration.yaml file (usually in the Home Assistant config folder in CasaOS) and add this under the http section:
http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 127.0.0.1
  • Note: If NGINX Proxy Manager runs in a separate container, replace 127.0.0.1 with its container IP (check CasaOS or Docker network settings—not the LAN IP of your whole CasaOS setup).
  1. Enable WebSockets in NGINX Proxy Manager:
  • In the NPM interface, go to your Home Assistant proxy host settings and turn on the “WebSockets” option. This is critical for Home Assistant’s real-time updates.
  1. Restart Home Assistant:
  • Save the changes and restart Home Assistant via the CasaOS interface (or its settings menu) to apply them.

That should do the trick! If you still get the 400 error, check the Home Assistant logs in CasaOS for clues and let me know.

Welcome to the BigBearCommunity!

I did exactly what you said. I replace the IP on NGINX etc. I arrived as far as the login then everything stopped to work and i mean everything. So i reinstall Ubuntu and casaOS then home assistant and same problem. Then, because is not done yet, i found out that duckdns every time i close the window or the entire browser does not keep the IP address that i gave. I’m losing my sanity in front of it.