What adjustments are needed when discourse uses a non-443 port?

AI-generated summary

The discussion revolves around issues encountered when running Discourse on a non-443 port, such as 3443. tom_eric reports multiple problems, including email failures, users being redirected to unreachable interfaces after registration, and images not loading. Even after changing the port, the Discourse logo fails to load, and the default post image wall is disabled. tom_eric tried setting DISCOURSE_PORT: 3443 and DISCOURSE_FORCE_HTTPS: true but found many images still fail to load, such as https://mydomain/uploads/default/optimized/1X/_129430568242d1b7f853bb13ebea28b3f6af4e7_2_32x32.png. The user also notes that after login, users are redirected to https://domain/latest, which doesn’t work on non-standard ports. pfaffman clarifies that Discourse won’t work on port 3443 because many components are hardcoded to port 443. tom_eric acknowledges this but expresses interest in pushing the setup further, such as running multiple sites. pfaffman suggests using a reverse proxy like Traefik for multiple sites, as Discourse isn’t designed to run on non-standard ports without significant modifications. tom_eric reiterates the desire to explore this further, even if it’s not cost-related.

Some of the issues I found include email failure, and users are also redirected to an unreachable interface after registration.

Additionally, the default post image wall is also disabled, and none of the uploaded images can be loaded.

Even after changing it to port 3443, I found that the Discourse logo cannot be loaded.

It seems that many problems have occurred

Is there a way to fix it with one click? Thank youSome of the issues I found include email failure, and users are also redirected to an unreachable interface after registration.

Additionally, the default post image wall is also disabled, and none of the uploaded images can be loaded.

Even after changing it to port 3443, I found that the Discourse logo cannot be loaded.

It seems that many problems have occurred

Is there a way to fix it with one click? Thanks

I haven’t tried adding these in env yet

DISCOURSE_PORT: 3443
DISCOURSE_FORCE_HTTPS: true

Don’t know if it will be useful after adding

After changing the port, many images fail to load properly, for example https://mydomain/uploads/default/optimized/1X/_129430568242d1b7f853bb13ebea28b3f6af4e7_2_32x32.png fails to load
But when I manually change it to https://mydomain:3443/uploads/default/optimized/1X/_129430568242d1b7f853bb13ebea28b3f6af4e7_2_32x32.png it can load
But there are too many places where 3443 needs to be added. Is there a quick way to modify it? 443 is not availableI haven’t tried adding these in env yet

Can I use the following operation when I have disabled nginx inside the container?

DISCOURSE_EXTERNAL_BASE_URL: “https://domain:3443”

Moreover, I found that after users log in, they are automatically redirected to https://domain/latest, and the default port 3443 is not added, causing it to fail to load. At this point, you must manually add https://domain:3443/latest.

Discourse won’t work on port 3443. You have to use 443.

Is this a standard install?

:face_with_peeking_eye:

Thank you for your reply

Yes, I know there are many components hardcoded to port 443. My port 443 is not usable, so I had to switch to port 3443. Currently, many functions are not working. I thought someone had studied this issue

Those who have studied the issue know that it won’t work on a non-standard port. I promise.

It’s pretty well documented, or so I thought.

It seems I have to give up on this huge project

If it’s not worth a $12/month VM or configuring a reverse proxy, then I think you’re right.

Not about cost. Maybe I want to push it a bit further, like installing multiple Discourse instances on one big server

If you want multiple sites then you either need multisite or a reverse proxy. I usually use traefik, but nginxproxy/nginx-proxy - Docker Image is a little easier. Just add some docker labels and it works.