Discourse HTTPS Web Socket


Anyone can guide or provide examples how to set up web socket with HTTPS for Discourse?

Simple HTTP works, but I would need it over HTTPS.

FWIW, as I read from your other post, this might be worth a shot

Not really, I run other websites just fine over 80/443 as I said, I am already running websites with LiteSpeed, even mail server is not blocked. I even tried with 8443 port, but nothing come up on that. Websocket way, I was able to at least run it over HTTP, but it was broken due to mixed content over HTTPS.

Discourse doesn’t support any port combination other than 80/443

Discourse may not support, but Docker does, but I can still pass it with sockets to outter Nginx.


This is over 8080.

My only issue is, I can’t seems to get HTTPS working in any way.

That’s why I said Discourse doesn’t support any ports other than 80/443

If you really want to attempt any alternative combination, You’re on your own.

1 Like

That’s a really dumb thing if you ask me. People usually run multiple services on the same server, you are literally restricting users not to do so. Also docker containers are usually not alone on the same server. You seems to be pushing other people to purchase seperated servers, just because you don’t want to support other ports than the default.

Literally thousands of people host other services on the same server as discourse. There are ways to do this. If you do your research, it is a very well supported usecase. You need to put it behind a reverse proxy to achieve it.

Here is one way of doing it Running other websites on the same machine as Discourse

I have my public discourse sandbox hosted on a NUC which hosts multiple other services behind Nginx Proxy Manager but that’s my way of doing it. It isn’t officially supported but I know my way around it.

1 Like

I already tried that before as well, it doesn’t comes through properly. Anyways, I don’t see the point of support in this case then at all, because as you said thousands of people do that. Yet there are no clear steps to make it work anywhere on Github or Wiki. Just straight the 80/443 option, that acts like a single service.

You’ll need a reverse proxy, like How to set up Discourse on a server with existing Apache sites.

1 Like

Except I am not running apache anyways, I would rather need nginx and litespeed, but neverthless, it would be simplier to just let use any other ports, then we can easily pass that to other web servers.

No, I don’t understand a bit about docker. But when I had a discourse at same VPS where I had Nginx and Varnish before Discourse I used sock without issues. But is it different thing?

Nowadays I have Discourse on different VPS than where is Nginx/Varnish so I can’t use socket. That’s why Varnish sends everyone to port 82 and from there to VPS of Discourse. And that’s why I have:

  - "82:80"

But is even that totally different thing than Discourse can use only ports 80/443?

Then you can find the nginx guide or use this one as an example.

That isn’t going to happen. You’ll need a reverse proxy that does https.


I found a way to get working, it wasn’t that hard afterall, and you can run Discourse on any port you wish.

Right. You can have the Discourse docker container open port 82 (or any port) if you have Varnish in front so that the URL is a normal https URL. As long as varnish manages the https certificates you should be able to proceed as you expect.

1 Like