redQs Posted June 9, 2022 Share Posted June 9, 2022 Hey Guys, i read now nearly every post about this subject... it still dont want to work for me... I got swag as a docker with a custom proxi network for bitwareden, nextcloud and vpn. i got access to my homeassistant remotlie at ha.xxxx.de:8123 i dont get it to work with https:// home assistant configuration.yaml: http: use_x_forwarded_for: true trusted_proxies: - 192.168.3.210 #unraid ip-adress - 172.18.0.2 #swag ip-adress and of corse i renamed the proxy-config file in swag: homeassistant.subdomain.conf server { listen 443 ssl; listen [::]:443 ssl; server_name ha.*; include /config/nginx/ssl.conf; client_max_body_size 0; location / { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app 192.168.3.10; set $upstream_port 8123; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; } location ~ ^/(api|local|media)/ { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app 192.168.3.10; set $upstream_port 8123; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; } } as i said i can conect remot to ha.xxxx.de:8123 so the port forwarding is working. What could it be?.. thanks for your reading this! Quote Link to comment
Aran Posted August 22, 2022 Share Posted August 22, 2022 (edited) UP Sorry to hijack your thread but i'm have the same problem. I moved from a 'homeassistant-core' docker to a VM and i cannot get remote access through HTTPS working. HASS config: http: use_x_forwarded_for: true trusted_proxies: - 172.17.0.3 I cannot figure out if i have to look in homeassistant or NPM or maybe a unraid setting that's wrong. Port forwarding in pfSense is setup correctly. [SOLVED] Ok, so i stumbled upon a topic in the Home Assistant Forums with some very usefull info. The home assistant logs tell you where the request is comming from. Look for this line located in the home assistant config folder, named like 'home-assistant.log.1'. I opened it with notepad++. ERROR (MainThread) [homeassistant.components.http.forwarded] Received X-Forwarded-For header from an untrusted proxy 192.168.8.189 Note the IP adress at the end of the line and copy that in the home assistant configuration.yaml file. http: use_x_forwarded_for: true trusted_proxies: - 192.168.8.189 It all makes sense to me now Note: i use home assistant as a VM so my ip is in range of 192.168.#.### . If you use the docker version the IP may be more like 172.17.0.3 . Edited August 23, 2022 by Aran 1 1 Quote Link to comment
Carbur8tr Posted November 26, 2022 Share Posted November 26, 2022 This is aged but I feel it deserves a bump. @Aran, thank you for the help. I was having a hard time finding my redirect and this resolved my issue. Quote Link to comment
jowi Posted February 24 Share Posted February 24 @Aran a bit late, but thanks anyway, this solved my problem Quote Link to comment
Aran Posted February 29 Share Posted February 29 Glad to help. A friend of my had the same problem. I searched the www and stumbled upon my own post 😛 Home Assistant became an important part of our house now so i moved (again) from a vm to bare metal (nuc). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.