Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

homeassistant + npm + docker, getting errors, I think it's a homeassistant setting yaml

Featured Replies

When I hit the cname ha.mydomain.com, I immediately get this.

2024-10-11 16:39:21.730 ERROR (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 172.18.0.1, but your HTTP integration is not set-up for reverse proxies

 

I think I need to tell the docker, homeassistant, that it's being reverse proxied and it's okay little docker.

 

That file, /mnt/user/appdata/configuration.yaml

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

 

Doesn't quite feel like the right place to put the "allow proxy" stuff.

 

Any pointers? thanks!

  • Community Expert

You need to add this

 

http:
  # For extra security set this to only accept connections on localhost if NGINX is on the same machine
  # Uncommenting this will mean that you can only reach Home Assistant using the proxy, not directly via IP from other clients.
  # server_host: 127.0.0.1
  use_x_forwarded_for: true
  # You must set the trusted proxy IP address so that Home Assistant will properly accept connections
  # Set this to your NGINX machine IP, or localhost if hosted on the same machine.
  trusted_proxies: <NGINX IP address here, or 127.0.0.1 if hosted on the same machine>

 

Have a look here : https://community.home-assistant.io/t/reverse-proxy-using-nginx/196954

  • Author

That definitely did something. My homeassistant unraid docker log is now empty. Now I'm getting a 530 error when I hit the url.

 

cname setup in cloudflare pointing to my duckdns account. Works swimmingly for other services.

 

image.thumb.png.638c03f26c87aa29006d053b7b75cb6b.png

 

image.png.387c74956757b2056eb8093a2d6ea287.png

 

contents of /mnt/user/appdata/homeassistant/configuration.yaml

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


#10/12/2024 to get this to work with reverse-proxy NPM on unraid
http:
  # For extra security set this to only accept connections on localhost if NGINX is on the same machine
  # Uncommenting this will mean that you can only reach Home Assistant using the proxy, not directly via IP from other clients.
  server_host: 127.0.0.1
  use_x_forwarded_for: true
  # You must set the trusted proxy IP address so that Home Assistant will properly accept connections
  # Set this to your NGINX machine IP, or localhost if hosted on the same machine.
  trusted_proxies: 192.168.11.2

 

The docker settings, I do have it setup under "proxynet" for a different Network like this:

image.png.00747240a0f70087e628ca8f0dca41f3.png

I tried changing the Network Type: back to Bridge, no changes to the 502 error.

 

Maybe that has something to do with this? I tried slapping some different ip addresses into the trusted_proxies: field, and got many errors. Looks like either 127.0.0.1, or 192.168.11.2 (ip of server) both work in there.

 

When I change trusted_proxies: 127.0.0.1

Setting permissions
[custom-init] No custom files found, skipping...
[ls.io-init] done.

 

 to trusted_proxies: 192.168.11.2

Setting permissions
[custom-init] No custom files found, skipping...
Connection to localhost (127.0.0.1) 8123 port [tcp/*] succeeded!
[ls.io-init] done.

 

So that's slightly different. But after dinking with all of those, I'm still getting the 502 Bad Gateway error above.

 

So: progress, but still stuck.

  • Community Expert

Is 192.168.11.2 your unraid server IP ?

Edited by deadnote

  • Author
27 minutes ago, deadnote said:

Does 192.168.11.2 is your unraid server IP ?

Correct. Server static ip is 192.168.11.2

Both NPM and Homeassistant are on custom network "proxynet"

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.