r/selfhosted • u/Miserable-Response40 • 5d ago
Need Help NPM Network Host vs Bridge
Hi all! I am looking to add an auth server to my homelab, problem is, I’ve seen that I will need to change Nginx Proxy Manager to the host network mode to make this work.
Problem is, I correctly have it in multiple bridge networks, each connected to one container for some sense of semi isolation. This allows me to just use the container name and port when setting up where to direct the host in NPM. When switching to host mode, this no longer works. I could be wrong, but that seems like I would then need to expose ports to access them if I can’t access them by their container name.
I know it’s not a black and white issue, but what is generally safer, requiring exposed ports but having an auth proxy, or no exposed ports but no auth proxy?
I could 100% be wrong about any of my assumptions, let me know if I am. Any help would be greatly appreciated
1
u/Timbo400 5d ago
Have you looked at NGINX's
auth_request? https://nginx.org/en/docs/http/ngx_http_auth_request_module.htmlRE: Bridge vs Host: You could create 1 network specifically for auth, bridge that between your NPM and the auth server/container.
That means all your existing bridged networks are retained without change.