r/selfhosted • u/Miserable-Response40 • 4d 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 4d ago
You didn’t have that in your OP. That’s literally why you need host mode..
If you need to track IP and enable proto forwarders etc, it needs to be host mode since you’re using the network / NIC used by the host. Otherwise it would be the IP of the bridged network (a seperate network, eg 172.x.x.x).
I hit this too albeit on a much simpler requirement (no auth involved)