Troubleshooting
Nginx Proxy Manager Troubleshooting: 502s, Certificates, and Offline Hosts
Nginx Proxy Manager publishes no troubleshooting manual — so this guide is built from its documentation's one architectural rule, its release notes, and its own issue tracker, with community fixes labeled as community fixes. Three symptoms cover nearly everything that goes wrong.
Published Nov 25, 2026
The short answer
Almost every Nginx Proxy Manager failure is one of three shapes. A 502 means the generated Nginx config cannot get a usable response from your upstream — most often because NPM and the app are not on the same Docker network, so use the project's own best practice: a shared Docker network, the service name as hostname, and the container's internal port. A certificate that will not renew is usually a certbot change, a Force SSL interaction, or a renewal that succeeded while Nginx kept serving the old cert (fixed in v2.17.0 — update). A host showing Offline is not about your app at all: the generated config failed, and hovering the red status dot in the UI shows you the error. Current version: v2.17.1.
502 Bad Gateway: work the pattern, not the vibes
NPM's official Advanced Configuration gives one architectural best practice, and most 502s are a violation of it: put NPM and the services it proxies on a shared custom Docker network (created once, attached as an external network in both Compose files), then address each service by its service name and its internal listening port. The documentation's own example proxies Portainer at hostname portainer, port 9000 — a port that is not published on the host at all. Against that pattern, the 502 checklist writes itself:
- Different networks. If NPM cannot resolve the service name, it is not on the service's network. This is the number one cause.
- Published port instead of internal port. Forward to the port the app listens on inside its container (9000), not the host-mapped one (9443 or whatever you published).
- Upstream down. A stopped or crash-looping app answers nothing on any name. Fix the app first; NPM is the messenger.
- Wrong target host. Pointing a proxy host at localhost or 127.0.0.1 aims Nginx at the NPM container itself. Use the service name (Docker) or the host's LAN address (bare-metal apps) — never loopback.
- Scheme mismatch. https to a plain-HTTP backend (or the reverse) produces handshake-flavored 502s and 400s. Match the scheme to what the app actually speaks internally; TLS usually terminates at NPM.
Certificates: renewals that fail, and renewals that "fail"
Start by updating: v2.17.0 fixed Nginx not reloading after a successful renewal (the renewed-but-still-serving-the-old-cert bug) and made the UI show certbot's actual failure reason instead of "Internal Error"; v2.17.1 fixed SSL toggles silently resetting when requesting a certificate on a new host. Both releases warn that certbot itself was updated — DNS plugins for EdgeDNS, Beget, and Infomaniak have breaking changes, and the project's advice is to create fresh DNS certificates with those providers and delete the old ones.
Still stuck? Two community-documented patterns from the project's own issue tracker, labeled as such because NPM publishes no troubleshooting manual: a Force SSL interaction (issue #2881) where renewal succeeds after removing stale .certbot.lock files, disabling Force SSL on the host, renewing from the SSL page, and re-enabling Force SSL — reported working across many sites; and broken symlinks after a migration (issue #3979), where letsencrypt/live entries copied as regular files instead of links to the archive directory broke renewal until the certificate was deleted and recreated. Repeated manual attempts can also hit Let's Encrypt's own rate limits — when the UI shows a rateLimited error, the fix is patience, not retries.
"Offline" hosts and the WebSocket toggle
Offline describes the config, not the app. When a saved host generates an Nginx config that fails its test, NPM marks the host Offline — hovering the red indicator reveals the error (a misplaced HSTS map block after custom locations was the documented example), and since v2.16.0 the failed config is preserved as a .conf.err file beside the generated ones for diagnosis. The fix is almost always in the last thing you saved: a custom location, an advanced snippet, an HSTS setting. Undo it, save, and the host returns.
And the quieter failure — an app that loads but never updates, logs that freeze, terminals that disconnect: the per-host Websockets Support toggle exists for exactly this. Apps with live connections (Home Assistant, Jellyfin, Portainer, Grafana live views) proxy their pages fine without it and lose their socket silently. If it moves in real time, the toggle goes on.
Official documentation and references
- Nginx Proxy Manager — GitHub releases (v2.17.x)
- Nginx Proxy Manager — Advanced Configuration (Docker network best practice)
Frequently asked questions
Why does Nginx Proxy Manager give a 502 on a new host?
Usually the network pattern: NPM and the app are not on the same Docker network, or the host uses the published port instead of the container's internal port. The project's best practice is a shared Docker network, the service name as hostname, and the internal port (their Portainer example uses portainer:9000, unpublished on the host).
My certificate renewed but the site still serves the old one. Why?
That was a real bug: Nginx did not reload after renewal. Fixed in NPM v2.17.0 — update. v2.17.0 also replaced the opaque "Internal Error" with certbot's actual failure reason, which makes every other renewal problem diagnosable.
What does an "Offline" proxy host mean?
The generated Nginx config failed its test — not that your app is down. Hover the red status indicator in the UI to read the error; the failed config is also kept as a .conf.err file. The cause is usually the last thing saved: custom locations, advanced snippets, or HSTS settings.
When do I need the Websockets Support toggle?
For any app with live connections — dashboards that update themselves, log streams, web terminals, Home Assistant, Jellyfin, Portainer. Without it the page loads over plain HTTP and the socket connection silently fails. It is a per-host toggle in the Details tab.

