intercity / intercity-next

Web control panel to deploy apps on your servers (with Dokku)
https://intercity.io/
MIT License
116 stars 23 forks source link

Feature request: Run on custom port #187

Closed michiels closed 8 years ago

michiels commented 8 years ago

I'd like to be able to have Intercity manage a single server. So the use case where both the Intercity dashboard and my apps are on the same server (similar to Plesk, DirectAdmin, etc.). Currently this does not work because the default Intercity dashboard runs on :80 and :443 and this clashes with the "proxy nginx" that Dokku installs.

If we would be able to customize this so the Intercity dashboard listens on custom ports, then we can run both Dokku and Intercity Next side-by-side on the same server.

Not sure if this feature request belongs on this repository or one of the installer repositories, but I'd like to hear thoughts/opinions on this feature :) I think it can be a great addition for someone hosting a single server with multiple apps (so no need to get a separate IC box).

michiels commented 8 years ago

I have one user trying this too.

jvanbaarsen commented 8 years ago

I think issues should be placed here as much as possible :-)

Interesting feature request. I'll look into it!

jvanbaarsen commented 8 years ago

@michiels For the first iteration I want to pick a fixed port that it can run on (I was thinking 888). We now have two options for the installer, 1) leave it as it is, and always run on port 888. 2) ask the user what they want, run on 80 or on custom port 888.

What do you think is the better option?

I think I would prefer the first option.

jvanbaarsen commented 8 years ago

@michiels This also includes running SSL on a different port.

I would suggest the following two ports: 880: HTTP 8443: HTTPS

michiels commented 8 years ago

@jvanbaarsen Oh wow that's super awesome! Hate to be a party stopper, but there is a potential issue with the port numbers you chose. Normally, ports under < 1024 are privileged and only used by standard and/or system services. It shows the outside world that those services are run by root and you can be sure that the system administrator installed these services.

Custom apps usually run on ports > 1024. For example, Plesk runs on :8443 too.

I'm thinking about a few directions to solve this issue:

  1. Choose port numbers > 1024 for both HTTP and HTTPS (8080 and 8843 for instance)
  2. Only have one port number, where you enable or disable SSL on (because why do we need two port numbers?) My preference would be to run on 8443 (same as Plesk) and enable/disable SSL based on the user configuration.
  3. Choose port numbers < 1024 for both HTTP and HTTPS (880 843 for example)

I highly prefer option 2 from a usage standpoint (because why two ports) and 8443 hints at an SSL port. Otherwise, option 1.

michiels commented 8 years ago

Oh, here's a StackOverflow explaining the port numbers: http://stackoverflow.com/questions/10182798/why-are-ports-below-1024-privileged

michiels commented 8 years ago

@jvanbaarsen also: I agree with the choice to always run on a custom port (and maybe allow customizing it later)

jvanbaarsen commented 8 years ago

@michiels Plesk is running on 2 ports as well. 8880 and 8843. We can do the same thing

jvanbaarsen commented 8 years ago

@michiels Resource: https://kb.plesk.com/en/391

michiels commented 8 years ago

@jvanbaarsen :+1: Let's choose 8880 for the non-secure port too.

jvanbaarsen commented 8 years ago

@michiels I picked: 8880 and 8843

michiels commented 8 years ago

@jvanbaarsen Perfect!