Help needed setting up NGINX reverse Proxy / HA / Vaultwarden using Duckdns
Hey Guys,
so I still have no clue about most of the stuff im doing hence why I am doing it :)
I have a ubuntu system running all kinds of docker containers and I want to expose homeassistant and vaultwarden to the internet.
Now I have set up a Duckdns account, I have setup my Router (fritzbox) to update the dyndns settings, I have set up my homeassistant the following:
<span style="color:#323232;">homeassistant:
</span><span style="color:#323232;"> internal_url: http://192.168.178.214:8123
</span><span style="color:#323232;"> external_url: https://ha.xxxxx.duckdns.org
</span><span style="color:#323232;">
</span><span style="color:#323232;">http:
</span><span style="color:#323232;"> use_x_forwarded_for: true
</span><span style="color:#323232;"> trusted_proxies:
</span><span style="color:#323232;"> - 172.22.0.0/24
</span>
Following is my Homeassistant Configuration:
<span style="color:#323232;"> homeassistant:
</span><span style="color:#323232;"> container_name: homeassistant
</span><span style="color:#323232;"> image: "ghcr.io/home-assistant/home-assistant:stable"
</span><span style="color:#323232;"> volumes:
</span><span style="color:#323232;"> - /homeassistant/:/config
</span><span style="color:#323232;"> - /etc/localtime:/etc/localtime:ro
</span><span style="color:#323232;"> restart: unless-stopped
</span><span style="color:#323232;"> network_mode: host
</span><span style="color:#323232;"> privileged: true
</span><span style="color:#323232;"> ports:
</span><span style="color:#323232;"> - 8123:8123
</span><span style="color:#323232;"> - 5683:5683
</span><span style="color:#323232;">
</span><span style="color:#323232;"> nginx-proxy-manager:
</span><span style="color:#323232;"> container_name: nginx
</span><span style="color:#323232;"> privileged: true
</span><span style="color:#323232;"> image: 'jc21/nginx-proxy-manager:latest'
</span><span style="color:#323232;"> ports:
</span><span style="color:#323232;"> - '80:80'
</span><span style="color:#323232;"> - '81:81'
</span><span style="color:#323232;"> - '443:443'
</span><span style="color:#323232;"> environment:
</span><span style="color:#323232;"> DB_MYSQL_HOST: "nginx-db"
</span><span style="color:#323232;"> DB_MYSQL_PORT: 3306
</span><span style="color:#323232;"> volumes:
</span><span style="color:#323232;"> - /nginx/data:/data
</span><span style="color:#323232;"> - /nginx/letsencrypt:/etc/letsencrypt
</span><span style="color:#323232;">
</span><span style="color:#323232;"> nginx-db:
</span><span style="color:#323232;"> container_name: nginx-db
</span><span style="color:#323232;"> image: 'jc21/mariadb-aria:latest'
</span><span style="color:#323232;"> environment:
</span><span style="color:#323232;"> volumes:
</span><span style="color:#323232;"> - /nginx/mysql:/var/lib/mysql
</span><span style="color:#323232;">
</span><span style="color:#323232;"> vaultwarden:
</span><span style="color:#323232;"> container_name: vaultwarden
</span><span style="color:#323232;"> image: vaultwarden/server:latest
</span><span style="color:#323232;"> restart: unless-stopped
</span><span style="color:#323232;"> volumes:
</span><span style="color:#323232;"> - /vaultwarden:/data/
</span><span style="color:#323232;"> ports:
</span><span style="color:#323232;"> - 8125:3012
</span><span style="color:#323232;"> - 8124:80
</span><span style="color:#323232;"> environment:
</span><span style="color:#323232;"> - DOMAIN=https://vw.xxxxx.duckdns.org
</span><span style="color:#323232;"> - LOGIN_RATELIMIT_MAX_BURST=10
</span><span style="color:#323232;"> - LOGIN_RATELIMIT_SECONDS=60
</span><span style="color:#323232;"> - ADMIN_RATELIMIT_MAX_BURST=10
</span><span style="color:#323232;"> - ADMIN_RATELIMIT_SECONDS=60
</span><span style="color:#323232;"> - ADMIN_TOKEN=
</span><span style="color:#323232;"> - SENDS_ALLOWED=true
</span><span style="color:#323232;"> - EMERGENCY_ACCESS_ALLOWED=true
</span><span style="color:#323232;"> - WEB_VAULT_ENABLED=true
</span><span style="color:#323232;"> - SIGNUPS_ALLOWED=true
</span>
I have forwarded the ports in the router.
I have set up nginx the following:
https://lemmy.world/pictrs/image/534b7ad1-c10d-42a8-9da4-90e2aac4c67f.png
Issue is when I open the website, it will give me the error that hsts is enabled, even though I definitely did not check this option ( and I never did (today!).
What is the reason for this?
Do I have to set some sort of header?
Same thing with vaultwarden, basically I set this up 1:1 except for the url whichi is vw.xxxxx.duckdns .org.
Add comment