this post was submitted on 26 May 2025
8 points (100.0% liked)

homeassistant

14373 readers
1 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 2 years ago
MODERATORS
 

I have recently setup a reverse proxy with the nginx addon for my home assistant server. Everything works well with the exception of the local calender integration. For whatever reason it throws an error "Could not retrieve events for calendars: " when connecting through the external URL. I also get a failed login attempt but only if I open the calender tab.

Does anyone know why it does this and how to fix it? I would like to use the home assistant calender for my family and acces is while away from home.

you are viewing a single comment's thread
view the rest of the comments
[–] CondorWonder@lemmy.ca 1 points 5 days ago (5 children)

Silly question but does it still work directly without the proxy (like http://homeassistant.local:8123/ )? Check the logs in system- logs and see if you can find anything relevant. AFAIK the proxy shouldn’t change how calendars get loaded.

[–] kaaskop@feddit.nl 1 points 4 days ago (4 children)

When connecting locally it isn't a problem. In the logs there isn't much that I can figure out as being the problem except that it somehow probably has to do with the http integration. My reverse proxy is setup with an HTTPS connection between external connection and proxy server and with http between proxyserver and home assistant. As far as I'm aware that should be good.

Logger: homeassistant.components.http.ban Source: components/http/ban.py:136 integration: HTTP (documentation, issues) First occurred: 16:58:44 (2 occurrences) Last logged: 16:58:44

Login attempt or request with invalid authentication from 178.230.xxx.xxx (178.230.xxx.xxx). Requested URL: '/api/calendars/calendar.afval_kalender?start=2025-05-25T22:00:00.000Z&end=2025-06-01T22:00:00.000Z'. (Mozilla/5.0 (Linux; Android 11; 2201117SY Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.125 Mobile Safari/537.36)

[–] CondorWonder@lemmy.ca 1 points 4 days ago (1 children)

Did you set up the proxy as a trusted forwarder? That means setting use_x_forwarded_for and trusted_proxies in configuration.yaml?

[–] kaaskop@feddit.nl 1 points 4 days ago (1 children)

Yes, I did. I've added the IP address stated in the documentation and also added the localhost IP 127.0.0.1 This didn't help any though

[–] CondorWonder@lemmy.ca 1 points 3 days ago (1 children)

Is the reverse proxy using an add on or did you roll your own? Reason I ask is proxing HA needs special treatment for websockets (wss:// or ws:// scheme). Add ons should do it themselves but I had to do it myself with Apache. I’m not sure if there’s special config needed for nginx too.

[–] kaaskop@feddit.nl 1 points 3 days ago* (last edited 3 days ago)

I've only set this up with add-ons. I've tried the "nginx home assistant SSL proxy" and the "nginx proxy manager" add-ons and have the problem with both. With the nginx home assistant SSL proxy I don't seem to be able to set a toggle for web socket support. With the nginx proxy manager I did specifically toggle the web socket support.

I really appreciate your help by the way :)

load more comments (2 replies)
load more comments (2 replies)