tl;dr; I solved the issues but I’d suggest an improvement. Seems like SEAHUB_SERVICE_URL
is only used to connect saehub /api/ endpoint. For downloading and saving the files though seadoc uses seahub’s public https URL. Surprisingly seahub too uses it’s own public https endpoint instead of communicating directly with itself. So basically the public https endpoint needs to be accessible directly to both - seadoc and seahub. And this makes installing them within an isolated container network very tricky. See below for details. I think much more efficient and reliable would be to have this communication happen through the internal container network endpoints.
— ORIGINAL POST —
Hi, I already wrote about it here but let me start a new topic because it may not be the same issue and there the thread might be lost.
The symptom of my problem is that trying to access an sdoc file, I get the dreaded “Load doc content error”.
I have a seafile 12 installation (upgraded from 11) in a private podman network that doesn’t have internet access. The services are accessible to the internet by a proxy container that can access the exported container ports.
With Seafile 11 I didn’t have Seadoc installed so this is a clean Seadoc installation on top of the current version 12.
The SEAHUB_SERVICE_URL
is set http://seafile
which is the correct container name of the Seafile container running within the private network.
On the seafile side I have SEADOC_SERVER_URL=https://seafile.EXAMPLE.com/sdoc-server
which is the correct way to access seadoc from the Internet that works in my browser. As I mentioned, this URL cannot work from within the private network so Seafile server cannot directly access it.
Now this is my first question - is it needed that URL to be accessible by seafile itself? It appears to me it is just a redirection URL for the user browser.
Now assuming it is not needed, I try to open such an empty sdoc
file results in the infamous Load doc content error
.
The only thing I see in sdoc-server.log
is
[2025-04-22 19:58:05] [ERROR] document-controller.js[74] - Load test.sdoc(55d418
e7-1ce7-4847-a0af-f90fa7e1006a) from https://seafile.example.com/seafhttp/files/6e914561-392e-49e0-b0f2-6f4b11bdc319/test.sdoc error
This makes me think that Seadoc tries to access seafile over the public domain instead of using the supplied SEAHUB_SERVICE_URL
.
So I decided to try adding a proxy within the private network which would be visible as https://seafile.example.com
and redirect everything to the seafile
container. I did this as a quick hack by adding a https redirect to the nginx config of seadoc and adding an additional domain to that container so it is resolvable to seafile.example.com
from within the private network.
This works because this indeed works from within the container.
curl -v https://seafile.example.com/seafhttp/files/4f5128a7-6eec-49dd-9f4a-38df0b7360dc/test.sdoc
But then I still see exactly the same behavior trying to open the sdoc file. I figure out one issue must be CA certificate. I think so because using a simple listener program in python I see an connection is performed but then the proxy I setup does not show any attempts in access log (while it does when I use curl). So it appears that seadoc tries to download the file but doesn’t like what it connects to and to me that most likely is that it doesn’t use the CAs from the standard debian location.
On container startup I make sure that debian CA certificates are updated by putting the custom CA into the right place and calling update-ca-certificates
with my_init
. I know this works because curl
works. But maybe Seadoc reads certificates from somewhere else?
I believe that ideally Seadoc should only access Seafile through the given SEAHUB_SERVICE_URL
. This seems to me as a bug that one has to specify SEAHUB_SERVICE_URL
but then it is only used for some calls, not everything.
But either case, could you help me understand how to pass the custom CA authority properly and any other things that may have to be changed for this feature to work?