Would like to add SSL cert to Portainer but Apache2 using Port 443

Hi folks,

I’d like to use the ‘one liner’ by Portainer to install itself using Docker and add an SSL cert while doing so…

Official documentation is here > Secure Portainer using SSL

Problem is, the output comes back that it can’t bind to port 443 as its already in use.

I have an Apache2 Web Server serving NextCloud and it has an SSL cert provided by Certbot and is listening on Port 443. The output of sudo netstat -ntupl | grep :443 is >

`tcp6       0      0 :::443                  :::*                    LISTEN      868/apache2` 

Any idea, what i should do?

Cheers, Michael.

Hi Michael,

Because you’re trying to run multiple containers with SSLs and are making them available remotely, I feel like you might need to use a reverse proxy like NGINX Proxy Manager or Traefik to handle the SSLs and traffic on your system.

Yeap, from what i gather NGM ‘needs’ ports 80 and 443 as in - ‘hard wired’, ‘cannot be changed’ sort of ‘need’…!

I did mention this on your own Discord and folks like Soldierbane said Just point 80 & 443 at NPM and get certs for everything else inside NPM. (inluding Portainer…)

Fellow YouTuber The-Digital-Life has a Docker-Compose script on his latest vid that installs Nextcloud, NGM and gets an SSL cert in one go so that is my next port of call…

Ta, Michael.

Please let us know how that goes and if we can be of further assistance.

I am using NGM on my network without any issues. I have SSL presented via Let’s Encrypt and I am using 80 and 443 for my access to the websites (I have 5 of them). All using both port 80 and port 443 on the same server. All you have to do is configure it at the Website level with VHost access it will work fine.

Michael