Illustrated title card for the guide: Nginx Proxy Manager WebSocket and Reverse Proxy Fixes
troubleshooting

Nginx Proxy Manager WebSocket and Reverse Proxy Fixes

Fix WebSocket failures behind Nginx Proxy Manager. Verify the HTTP upgrade in Chrome, trace a 502 to the upstream, and diagnose idle disconnects.

Enable Websockets Support on the Nginx Proxy Manager host and check the app’s WebSocket request in Chrome DevTools. For an HTTP/1.1 upgrade, look for 101 Switching Protocols. If the request returns a 502, check the upstream destination and the host’s error log. If it opens and drops while idle, check the proxy read timeout. Chrome DevTools · Nginx Proxy Manager host template · NGINX WebSocket proxying · HTTP 502 definition

Enable Websockets Support for the proxy host

  1. In Proxy Hosts, edit the entry for the app’s hostname. Open Details. Proxy host editor · Interface labels
  2. Check Scheme, Forward Hostname / IP and Forward Port against the app’s listener. Scheme describes the connection from Nginx Proxy Manager to the app. Select http for an HTTP listener or https for an HTTPS listener. Proxy host editor · Default forwarding configuration
  3. Under Options, turn on Websockets Support and click Save. In v2.17.1, the toggle adds forwarding for Upgrade and Connection and sets the upstream proxy HTTP version to 1.1 in the generated default and custom locations. Proxy host editor · Proxy host template · Custom location template

Verify the WebSocket request in Chrome

  1. Open Chrome DevTools and select Network. Reload the app or repeat the action that opens the socket. Select the WS filter. Chrome DevTools Network reference
  2. Select the WebSocket request and note its URL. In Headers → General, record its status. For the HTTP/1.1 handshake, look for 101 Switching Protocols. Chrome DevTools Network reference · WebSocket opening handshake
  3. Open Messages, then use the feature that needs the socket. Check for the expected messages from the app. If it disconnects, the Time column can help you identify the last message received. Chrome DevTools Network reference
What you seeWhat to check next
The socket request returns 404.The HTTP/1.1 upgrade did not complete. Compare the path with the app’s WebSocket endpoint. Under Request Headers, check that Upgrade includes websocket and Connection includes the Upgrade token. Chrome DevTools Network reference · WebSocket opening handshake
The request returns 502 Bad Gateway.Read the error log for that proxy host and confirm the upstream scheme, host and port. HTTP 502 definition · Proxy host template
The request returns 101, messages arrive, and the socket drops after a quiet period.Compare the interval with the proxy read timeout. NGINX WebSocket proxying

For example, if the app requests wss://app.example.com/ws, compare /ws with the endpoint the backend serves. The default proxy location forwards the request URI. If a Custom Locations entry matches the path, inspect that entry’s own forward target and any path in it. Default forwarding configuration · Custom location template

Trace a 502 to the upstream

Reproduce the failure and note the time and request path. With the official Compose layout, run this from the Nginx Proxy Manager Compose directory. Substitute your Compose service name if it differs from app. This prints the NGINX configuration, so inspect the output locally. Nginx Proxy Manager setup instructions · Docker Compose exec · NGINX command-line parameters

docker compose exec app nginx -T

Find the server block for the app’s hostname and read its error_log path. It has the form /data/logs/proxy-host-ID_error.log, where ID is the host’s numeric ID. With the official ./data:/data mount, open the corresponding file in ./data/logs/. Look for an entry around the time of the failure. Proxy host template · Nginx Proxy Manager setup instructions

If there is no matching error entry, look up the same time and path in proxy-host-ID_access.log. The proxy access log includes the HTTP status and a Sent-to field. Proxy host template · Proxy access log format

If the target is another Docker service on the same host, check that both containers are attached to the intended shared network. Replace scoobydoo with your network name and look for both containers in the output. Nginx Proxy Manager Docker network example · Docker bridge network inspection

docker network inspect scoobydoo

If either container is missing, use the same shared external network in both Compose configurations. For traffic between the two services, use the service name and container port. The Nginx Proxy Manager documentation uses portainer and 9000 as its example. Once the upstream fields match the app’s listener, reproduce the WebSocket request in Chrome again. Nginx Proxy Manager Docker network example · Docker Compose networking · Chrome DevTools Network reference

Fix disconnects after a successful upgrade

Nginx Proxy Manager v2.17.1 ships with proxy_read_timeout 90s; in its base NGINX configuration. The timeout measures the gap between reads from the backend. Use the configuration output above to check for a different value on your host or location. Base NGINX configuration · NGINX proxy read timeout

  1. If the app supports server-side WebSocket pings, configure it to send them before the read timeout expires. NGINX documents that periodic pings from the backend reset this timer. NGINX WebSocket proxying
  2. To allow a longer idle interval at the proxy, edit the host as an administrator and open the Settings gear. In Custom Nginx Configuration, add or edit proxy_read_timeout time;. Replace time with the intended idle limit, then click Save. Check for a location-level timeout on the socket’s path if you use a custom location. Proxy host editor · Interface labels · Proxy host template · NGINX proxy read timeout
  3. Reopen the app, confirm 101 for the new HTTP/1.1 WebSocket request, and leave it idle past the point where it previously dropped. Use the feature again and check Messages for the expected reply on that same connection. Chrome DevTools Network reference · NGINX WebSocket proxying

Evidence and limits. The interface and configuration were checked against Nginx Proxy Manager v2.17.1 and the linked official documentation on November 26, 2026. The steps were not run on a test system.

Browse Reverse Proxy Lab posts

Sources

  1. Nginx Proxy Manager v2.17.1 proxy host editor
  2. Nginx Proxy Manager v2.17.1 interface labels
  3. Nginx Proxy Manager v2.17.1 proxy host template
  4. Nginx Proxy Manager v2.17.1 default forwarding configuration
  5. Nginx Proxy Manager v2.17.1 custom location template
  6. Nginx Proxy Manager v2.17.1 proxy access log format
  7. Nginx Proxy Manager v2.17.1 base NGINX configuration
  8. Nginx Proxy Manager full setup instructions
  9. Nginx Proxy Manager advanced configuration
  10. Chrome DevTools Network features reference
  11. NGINX WebSocket proxying
  12. NGINX proxy module and proxy_read_timeout
  13. NGINX command-line parameters
  14. Docker Compose exec reference
  15. Docker bridge network driver
  16. Docker Compose networking
  17. RFC 6455 WebSocket opening handshake
  18. RFC 9110 HTTP semantics and 502 Bad Gateway

Related