Total noob question, I’ve tried adding a custom SSL cert via the supplied caddy.yml file as follows:
./ssl:/etc/caddy/certs:ro
and I’ve added labels to the seafile container in the seafile-server.yml file as follows:
labels:
caddy: “${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}”
caddy.reverse_proxy: “{{upstreams 80}}”
caddy.tls: |-
{
certificates {
certificate /etc/caddy/certs/cert.crt
key /etc/caddy/certs/key.key
}
}
but I’m getting the following errors when I get the logs from caddy in docker:
{“level”:“info”,“ts”:1737112664.476233,“logger”:“docker-proxy”,“msg”:“Process Caddyfile”,“logs”:“[ERROR] Removing invalid block: parsing caddyfile tokens for ‘tls’: wrong argument count or unexpected line ending after ‘/etc/caddy/certs/key.key’, at Caddyfile:3\nURL-REDACTED {\n\treverse_proxy 172.28.0.5:80\n\ttls certificates certificate /etc/caddy/certs/cert.crt key /etc/caddy/certs/key.key\n}\n\n”}
Have you been able to find a solution to the problem in the meantime?
I am faced with the problem that I would like to use the purchased certificate.
In addition, my server is behind another nginx proxy - i.e. not directly accessible from the WAN, which makes the acme challenge impossible without forwarding port 80.
I’ve got a similar deploy:
nginx reverse proxy which handles ssl certs and renew in front of everything. Before docker I was just pushing ssl certs inside seafile’s nginx. Now we must to use docker and caddy: how to push certs inside caddy? and should we enable https in the .env file or not?
ho to disable caddy’s feature to handle ssl certs renewal?
I’m missing also how to use caddy + seafile with different possibillities to provide a certificate. I like the attempt to keep as simple as possible - but sometimes it causes the opposite…