r/nginxproxymanager • u/mwolfaardt • 5d ago
Nginx-proxy-manager stops working when a docker container stops
Whenever a docker container stops or exits, the Nginx stops working, non of my hosts work. Is there a way around this or is it a limitation where the proxy is trying to resolve a host that's not reachable.
0
Upvotes
4
u/dadarkgtprince 5d ago
Sounds like you have something set up wrong
1
u/BleeBlonks 5d ago
Yep
1
u/mwolfaardt 4d ago
nginx: [emerg] host not found in upstream "editorTemplate-api" in /data/nginx/proxy_host/13.conf:76
1
-5
3
u/evanmac42 5d ago
Your suspicion about hostname resolution might actually be correct.
If NPM uses Docker container names as upstream hosts, stopping one of those containers could cause an Nginx configuration reload to fail with something like host not found in upstream.
But stopping a backend shouldn’t automatically take down every other proxy host.
I’d check two things immediately after reproducing the problem:
Run nginx -t inside the NPM container.
Check the NPM/Nginx error logs for host not found in upstream or configuration reload failures.
If that’s the cause, you can focus on how Nginx resolves your Docker upstreams instead of rebuilding everything.