Home assistant docker not using nginx for SSL_certs

Hi all,

I bought a domain and forwarded it to my external IP_address of my router. From there the ports of 443 are forwarded to my ubuntu server where home assistant is running in a docker environment. I can reach the server fine through the domain, unfortunately so can others ;(. I already have a strong passwd and MFA, but I would like to integrate SSL_client authentication. When I tried to configure this, it seemed that my nginx-service was not regulating the webservice traffic.

I saw from some troubleshooting that the file configuration.yaml in my dockerconfig file is used to authenticate for SSL-certs. I get the same output when I comment all the entries in nginx/sites-available/default with a #. And for verification if I uncomment the SSL-certificate line in this file, it doesn’t work anymore

image

My question ( and goal ), is to use SSL-client authentication and I want to configure it in nginx, but somehow my home assistant docker env is not using the nginx service.

Perhaps y’ll got some troubleshooting steps for me to go through ?

Thanks in advance,

If using nginx as a proxy in docker you need nginx docker IP as a trusted proxy in HA config

In nginx you should be using HA’s hostname for the container. Docker IPs are subject to change so using hostnames to connect containers avoids this issue

I manually create a docker network for nginx and provide nginx with a static ip in this network to avoid IP changes at restart/rebuild. You must assign any connecting container to tjis network. Containers can be connected to multuple docker networks

I’m not using nginx in docker, should this be required? I only have home assistant and pihole running in my docker env

Yes. Traffic from nginx will come from nginx host ip. Since HA is in docker its host ip will not be the same

I will consider this. However, what kind of webservice is home assistant using for this?