I’m so close to figuring this out, but simply cannot.
What I’d like to do is use the NGINX addon in HA to reverse proxy to other addons that I install in HA as well like Grocy, Vaultwarden, etc. Specifically I want to migrate my self-hosted Bitwarden password manager to be hosted inside HA using the Vaultwarden addon.
When I install the Vaultwarden addon, I can reach it at <ip_address_of_ha>:7227
. Awesome.
Next I tried setting up the NGINX reverse proxy so that under the “Customize” option, it’s set to active: true
, and I create a new configuration for vaultwarden in /share/nginx_proxy/vaultwarden.conf
.
In the /share/nginx_proxy/vaultwarden.conf file, I have the following:
server {
ssl on;
ssl_certificate /ssl/<my_cert>.fullchain;
ssl_certificate_key /ssl/<my_cert>.key;
server_name pw.<domain_name>;
location / {
proxy_pass http://127.0.0.1:7277;
}
}
I’m 90% certain that the problem is the proxy_pass
directive. I think that because if I curl
from inside HA (using the terminal addon), I get the following:
curl: (7) Failed to connect to 127.0.0.1 port 7227 after 0 ms: Connection refused
I know just enough about NGINX outside of the addon, but inside the Home Assistant container, I’m not sure how to reach the Vaultwarden addon. Is it some 172. docker container address? Can anyone advise how to reach the Vaultwarden IP from the reference point of HA (edit: or from the perspective of the NGINX addon, I realized) so that I can get the reverse proxy to work? Or is this not possible?
Any advice would be awesome because once I figure this out, I can use it as a launchpad to move a few of my self-hosted apps into HA, which would be amazing.
(I’ve tried searching for this, but a lot of the search results are how to use NGINX to reach HA itself, which works for me, and because “home assistant NGINX to proxy to addons” gets really muddled, I apologize if this has been answered and I haven’t found it).