I made a Droplet with the Discourse One-Click application installer. Everything’s fine but when I want to install Let’s Encrypt via Traefik, it appears that port 443 is already bound to docker-proxy
****@discourse-s-1vcpu-2gb-nyc1-01:~/traefik# docker-compose up
Pulling reverse-proxy (traefik:latest)...
latest: Pulling from library/traefik
7a433ecdf92b: Pull complete
6fbbd8a41c7f: Pull complete
Digest: sha256:a9512e9e1d2c0eda3a971926f50e97467fbeecfe07eeeedc4224af4ee5329a4e
Status: Downloaded newer image for traefik:latest
Creating traefik_reverse-proxy_1 ...
Creating traefik_reverse-proxy_1 ... error
ERROR: for traefik_reverse-proxy_1 Cannot start service reverse-proxy: driver failed programming external connectivity on endpoint traefik_reverse-proxy_1 (4c7b38d20dba0120a83174eba7c18e5b179c70c7d39da8a44285b8172ac021b5): Bind for 0.0.0.0:443 failed: port is already allocated
ERROR: for reverse-proxy Cannot start service reverse-proxy: driver failed programming external connectivity on endpoint traefik_reverse-proxy_1 (4c7b38d20dba0120a83174eba7c18e5b179c70c7d39da8a44285b8172ac021b5): Bind for 0.0.0.0:443 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
****@discourse-s-1vcpu-2gb-nyc1-01:~/traefik# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 658/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1274/sshd
tcp6 0 0 :::22 :::* LISTEN 1274/sshd
tcp6 0 0 :::443 :::* LISTEN 22124/docker-proxy
tcp6 0 0 :::80 :::* LISTEN 22135/docker-proxy
I believe that the Discourse One-Click Install is the cause because there was a similar issue found here:
https://meta.discourse.org/t/the-connection-has-timed-out/77930/8
So what should I do so that I can use port 443? I do not want to start from scratch.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I don’t know if you found the solution to this or even started from scratch, but I believe gave with the solution to a similar issue I had with bitwarden being bound to port 80/443 when trying to install Traefik. I solved it by changing the port exposed on the docker-compose file for the container that had been bound to port 443.
In your case, being a pre-installed app there must be some variables on a volume for persistent data that can be changed. Then rebuild with the launcher script provided by Discourse. Something around the lines of: launcher rebuild.
Hope this helps!