Hello,
I’m working of a brand new seafile 13 docker install on debian with cady and custom certificates as described here HTTPS and Caddy - Seafile Admin Manual. This all works w/o any issues and when I access https://seafile.mydomain.ca seafile loads and I can see that my custom certificates are used. The log file of the seafile-caddy container confirms the loading of my custom certificates:
{"level":"info","ts":1764970157.3133643,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000233880"}
{"level":"warn","ts":1764970157.3161247,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [sksrv04.safeback.ca]: no OCSP server specified in certificate"}
{"level":"info","ts":1764970157.3164048,"logger":"http.auto_https","msg":"skipping automatic certificate management because one or more matching certificates are already loaded","domain":"seafile.mydomain.ca","server_name":"srv0"}
{"level":"info","ts":1764970157.316458,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
When I add seadoc to the environment according to SeaDoc Integration - Seafile Admin Manual. The seadoc server loads without any issues. https://seafile.mydomain.ca/sdoc-server/ returns:

However, when I try to load a sdoc file I get the “Load doc content error” and in the log file /opt/seadoc-data/logs/sdoc-server.log the following error is shown:
[ERROR] index.js[179] - error_message: unable to verify the first certificate
[2025-12-05 15:37:41] [ERROR] index.js[177] - Service unknown error
[2025-12-05 15:37:41] [ERROR] index.js[178] - error_type: UNKNOWN_ERROR
[2025-12-05 15:37:41] [ERROR] index.js[179] - error_message: unable to verify the first certificate
[2025-12-05 15:37:41] [ERROR] index.js[180] - error_stack: Error: unable to verify the first certificate
at AxiosError.from (/opt/sdoc-server/sdoc-server-2.0.9/sdoc-server/node_modules/axios/dist/node/axios.cjs:907:14)
at RedirectableRequest.handleRequestError (/opt/sdoc-server/sdoc-server-2.0.9/sdoc-server/node_modules/axios/dist/node/axios.cjs:3328:25)
at RedirectableRequest.emit (node:events:536:35)
at eventHandlers.<computed> (/opt/sdoc-server/sdoc-server-2.0.9/sdoc-server/node_modules/follow-redirects/index.js:38:24)
at ClientRequest.emit (node:events:524:28)
at emitErrorEvent (node:_http_client:101:11)
at TLSSocket.socketErrorListener (node:_http_client:504:5)
at TLSSocket.emit (node:events:524:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at Axios.request (/opt/sdoc-server/sdoc-server-2.0.9/sdoc-server/node_modules/axios/dist/node/axios.cjs:4483:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2025-12-05 15:37:41] [ERROR] document-controller.js[56] - The content of the document loaded error
[2025-12-05 15:37:41] [ERROR] document-controller.js[74] - Load tsdoc.sdoc(f16ed131-5265-48c9-8ebd-88560f13d247) from https://sksrv04.safeback.ca/seafhttp/files/bc03f5a6-a3c4-4315-a5b7-f57878738a84/tsdoc.sdoc error
If I disable https for seafile, seadoc works without any issues. I assume the issue is around:
- seafile 13
- caddy with https and custom certificate
- seadoc not able to access the custom certificate
This error is reproducable and consitent as soon as caddy is configured with a custom certificate.
Any help, suggestion on how to fix this is appreciated.