Docker with self-signed certificate

Hey,

I’ve generated “seafile.local.crt” and “seafile.local.key” in “/opt/seafile-data/ssl”. The vhost I’m using should be https://seafile.local

I’m running this:
docker run -d --name seafile
-e SEAFILE_SERVER_HOSTNAME=seafile.local
-e SEAFILE_USE_HTTPS=1
-v /opt/seafile-data:/shared
-p 80:80
-p 443:443
docker.seadrive.org/seafileltd/seafile-pro:latest

When doing “ps” I get:
docker.seadrive.org/seafileltd/seafile-pro:latest “/sbin/my_init – /s…” 9 minutes ago Up 9 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp seafile

HTTP is working properly, but HTTPS doesn’t works - posting “refused to connect”.

Any hints please?

You need to set SEAFILE_SERVER_LETSENCRYPT to true even if you don’t want certificates from letsencrypt.

These lines give it away:


BTW I couldn’t find any reference to SEAFILE_USE_HTTPS so setting it to 1 is probably useless

the 0.0.0.0:443->443/tcp is just telling you that port 443 on the container is exposed, not that there’s something that will respond to anything sent to it.