I am installing this on the production server, which I already have a website running on port 80.
How do I specify a different port to install Discourse?
Currently it won’t let me install and says:
# ./discourse-setup
Port 80 appears to already be in use.
If you are trying to run Discourse simultaneously with another web
server like Apache or nginx, you will need to bind to a different port
See https://meta.discourse.org/t/17247
However the above link says “assumes you already have Discourse working”, but I don’t.
Yes, that does appear to be something of a chicken-and-egg problem… what the discourse-setup script does, more-or-less, is just copy samples/standalone.yml to containers/app.yml and edit a bunch of stuff in response to your answers to a bunch of questions. You can do the same thing yourself – copy the file, edit to suit. It’s how all installs used to be done before @codinghorror decided he wanted to show he could write bash scripts with the best of 'em.
what is it that actually isn’t working when using different ports? did it some months ago for a little test install and can’t see any issues …
now would have to do a more serious installation and am not sure if i should bother doing the nginx-proxy-thing or just change the ports as i did with the other…
It breaks some parts, and since isn’t a priority for us (you can just use a reverse-proxy + subdomain or subfolder) we won’t be spending time to add support for this.
well, what are these parts? i still couldn’t uncover any…
and for me at least - on a plesk managed server where it’s a bit harder to see what’s actually happening behind the scenes - this reverse-proxying so far seems over my head… and from what i found so far most plesk related howtos and threads essentially end up using different ports as well…
That’s mostly unknown, but when you use a port and find out that it didn’t work, you’ll know. And then you can’t get help here, because it’s not supposed to work.
Is this still the case in 2020, that Discourse cannot or should not be installed on a port different than 80/443? Or was this problem eventually resolved?
Installing nginx seems like like a pretty big deal to deal with such a simple issue! Most software you can simply specify the port to which it needs to bind. And I do see the http/https ports in app.yml.
It’s a bit of a stretch to refer to this as a problem, there’s very few reasons to run anything on nonstandard ports these days. It’s easy to proxy with nginx/traefik now and free SSL certificates are ubiquitous.
Could you maybe elaborate as to why it’s a problem?
Because the K-12 school server where I’m trying to install it limits what software I can install, and to which ports I can bind. And that server already runs apache on 80, 443, and 8080 for other services the school runs.
I cannot imagine why in this day and age a linux server software wouldn’t support having a port definition in a configuration file so people can change the port. This is what all the software I can think about does, from way back in the telnet and ftp days up to modern day ssh, apache, etc.
I’ve been given permission to install a single server package, and a single port that we can use to test Discourse. Telling them that we need to involve other teams at the school board level because I have to install some other reverse proxy software because Discourse is hard-coded to bind to a port that is already used by another team is a deal breaker. They’ll never authorize such changes.
Then your only options would be to install it off-site, or maybe look for a different product. A $5 VPS would allow you to test Discourse extensively. You may even be able to secure a free trial.
It might be worth educating them on some of the trends a lot of projects are adopting. Automated installations using technology such as docker and standard port dependencies are becoming the norm now…
As a parent trying to help out a local K-12 school in these covid-19 times, me trying to convince an entire school board that they need to change how their IT infrastructure works is…unlikely.
As for educating people on adopting trends that people are using, I recommend having a supported “port” option like all other linux server software supports, so people can easily change the TCP port without having to also install reverse proxies.
Thanks for that covid-19 link, Sam. I will let them know. I cannot imagine I’ll be allowed to do any more modifications to their server, so hopefully they will go that route.
I used to be a university professor who tried to do that all that time and I know whey you’re talking about. The easiest solution will be to host externally.hopefully they have bandwidth and no rules that ask data must be stored on campus.
If you want to self host rather than host at cdck as offered, I’ll provide a free installation on digital ocean with mailgun. It’ll probably be easier to register your own domain unless the tech folks will be willing to create a bunch of dns records for you.
I think we lost our window to get this done. The principal has now axed this project, saying that solutions need to come from the school board, and I cannot install this on the server. Was worth a shot. Apparently the school board is investigating using Microsoft Teams as a solution.