Nginx Proxy Manager and Fritz Box Port Forwarding

Hello everyone,
I’ve been trying to get the Nginx Proxy Manager up and running for days.
Unfortunately it doesn’t quite work yet. I installed Nginx Proxy Manager with DuckDNS.

In my FritzBox I have enabled port 443 + 80 to IP 192.168.2.100 (My Home Assistant Host).

In Nginx I then forwarded to 8123.

But I can’t connect to HA. I only get this loading screen.
Loading

If I open the port like this, it works. But then I can’t set up the connection to my NAS.


configuration.yaml

http:
  cors_allowed_origins:
    - XXXX.duckdns.org
    - https://google.com
    - https://www.home-assistant.io
  ip_ban_enabled: true
  login_attempts_threshold: 3
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.16.0.0/12
    - 192.168.2.0/24
    - 172.30.33.0/24
    #- 192.168.2.100
    #- 127.0.0.1 
  #ssl_certificate: /ssl/fullchain.pem 
  #ssl_key: /ssl/privkey.pem 
  

PS: If I use https://xxxxx.duckdns.org/ it takes me to the FritzBox Login Scrren. Seems unsafe to me.

Your gateway should be set up to forward traffic to the IP of Nginx proxy manager, not HA (although depending on your setup that might be the same IP). Could you also post your nginx proxy manager config for the proxy host?

Where is the config? In the addon GUI there are only the three standard ports.
Do I have to configire Nginx in the configuration.yaml?

I meant this screen (and maybe also the SSL one):

You haven’t shared how your complete infrastructure looks, but according to this:

you may need to modify your configururation.yaml to enable reverse-proxy support for home assistant.
Mine looks like this:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.18.0.0/24

(My HA instance is running in a docker container on the host network and the proxy is on a separate docker network, thats why I use this IP range but you should modify it to suit your needs)

This is my config:


222

My HA runs on a Raspberry on IP 192.168.2.100 and Nginx as HA addon.

Should I use 192.168.2.0/24 ?

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.2.0/24

Unless you really want to connect to the Web-UI of the FritzBox from external networks, it is strongly recommended to disable that, depends on the model, in Internet/Freigabe/Fritz!Box-Dienste “Internetzugriff auf die FRITZ!Box über HTTPS aktiviert” or where you enabled it ( because if I recall correctly it is off by default )

1 Like

I solved the problem.
I created a new DuckDNS address and reinstalled Homeassistant.
My old DuckDNS address doesn’t work on the new installation, but it’s finally working with the new one.
Scheme in Nginx must be http and not https.

Does anyone know how to change the URL in Google Assistant? If I want to Link my Homeassistant to Google in the Google App, it shows the old URL witch is not reachable.
Update: You must change the URL here https://console.actions.google.com/u/0/project/XXXX/overview
Build your Action and Account Linking

1 Like