Issues with WebSockets over custom port?

Has anyone used a non-80 port with WebSockets enabled successfully?

I have verified that my WebSockets server is listening on an HTTP port supported by Cloudflare (per this Help Center article: but after debugging, it seems as though the Upgrade header is not passed to my WebSockets server when Cloudflare is enabled.

WebSockets should work across all ports we support, though we typically recommend sticking to 80, 8080, 443 and 8443 due some exceptions.

  • What port are you attempting to use with WebSockets in this case?
  • What is the use case for supporting WebSockets on an alternative port?

Thanks for the reply!

Ports in use are 8080 and 2082; the use case is multiple WebSockets servers are open and listening, but I’m figuring that I can use nginx to proxy specific paths to the open ports instead (over 80).

It’s just odd to me that the Upgrade header wouldn’t be passed through with Cloudflare enabled. Thoughts/suggestions?

Update: I moved one of the WebSockets servers to port 80 and it’s still not passing the header or successfully switching protocols to WebSockets.

Never mind; I can’t believe I missed this. :joy:



I have faced similar issue with connection drop and mentioned details here: