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
- In Proxy Hosts, edit the entry for the app’s hostname. Open Details. Proxy host editor · Interface labels
- 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
httpfor an HTTP listener orhttpsfor an HTTPS listener. Proxy host editor · Default forwarding configuration - Under Options, turn on Websockets Support and click Save. In v2.17.1, the toggle adds forwarding for
UpgradeandConnectionand 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
- 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
- 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 - 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 see | What 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
- 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
- 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;. Replacetimewith 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 - Reopen the app, confirm
101for 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.