Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use

Well, I’d like to give Discourse a try so I’m installing it via docker, but I get this error. Actually by searching I see lots of people gets this error, but I can’t figure out how to solve it.

starting up existing container

    + /usr/bin/docker start app

    Error response from daemon: driver failed programming external connectivity on endpoint app (7336c875bdf9e3f18f08ca0af0a5aad10181ba37508f92c68f87a75637c56583): Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use

    Error: failed to start containers: app

Have alredy set this in /opt/discourse/containers/app.yml
expose:

  • “8880:80” # http
  • “8443:443” # https

It is a web server where I have a website running on Apache with https so yes, port 443 is already in use, but if I set app.yml to remap 443 to 8443, why am I still getting it?

You should see Discourse official Standard Installation and How to set up Discourse on a server with existing Apache sites.

Judging from the path you include, You might also check Troubleshooting Bitnami Installations

I’ve seen that document but shouldn’t changing the app.yml have an effect on the ports used or is it ignored? Discourse is the first app I try with some kind of “hard-coded” port I can’t change.

I really don’t like to put another piece of software between my customers and my website which is happily up and running, I’d rather map in Apache a subdomain to discourse

And what if I get another application which behaves like this and is forced to run on port 443?

Yes, but you have to ./launcher rebuild app (or maybe ./launcher destroy app;./launcher start app). My guess is that you just edited the file and then restarted the container that already had the ports configured.