Docker with self-signed certificate


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
-v /opt/seafile-data:/shared
-p 80:80
-p 443:443

When doing “ps” I get: “/sbin/my_init – /s…” 9 minutes ago Up 9 minutes>80/tcp,>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>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.