Docker with SSL on non standard ports



Are there any docker users who have managed to deploy a container for seafile CE using Lets Encrypt, but with the container on non standard ports ?

As part of the process of the cert generation, letsencrypt tries to download a file that fails due to the fact the container is not available on port 80 or 443 (i map 8043:443 and 8091:80)

I’ve tried sticking the port in the host name during the container build, but that fails also.

My config looks like this for the build:

docker run -d --name seafile \
  -e \
  -e \
  -v /opt/seafile-data:/shared \
  -p 8091:80 \
  -p 443:443 \


Probably you could use nginx/apache as a reverse proxy, so you can access multiple services on port 80/443 on different subdomains/subfolders, and only the webserver need the certificate.