Error opening SeaDoc document

Newly setup Seafile Server and SeaDoc. This is the error I’m getting on my browser. My full config is available on GitHub. You can see all of the environment variables that are setup for my containers in that config already. I can also translate from Nix to Podman quadlet configs or provide any detail that may be necessary to help debug this.

I don’t see any error logs in the seadoc container logs.

My setup is basically seafile-server, mysql, and redis containers running in a Podman Pod called seafile. SeaDoc server is running as a separate container called seadoc. Both the Pod and the Container belong to the same Podman Network and can resolve each others’ IP addresses via hostnames.

Caddy is also running in the seafile container to act as a reverse proxy to seafhttp, seafdav, notifications-server, seadoc, and serving media.

I’m unable to link to my config on GitHub. It’s in the ananthb/machines repository in the hosts/endeavour/cloud.nix file.

Hello, thank you for providing the detailed information. Regarding the issue you’re encountering, I have a few suggestions:

  • Path matching: In your Caddy configuration, it is recommended to normalize the path matching for /sdoc-server and /socket.io by adding a trailing slash. For example:
handle_path /sdoc-server/* {
  reverse_proxy seadoc:7070
}
handle_path /socket.io/* {
  reverse_proxy seadoc:7070
}
  • Environment variables: The SeaDoc container may be missing some required environment variables, such as SEAHUB_SERVICE_URL. Adding this variable should help SeaDoc correctly connect to the Seafile service.
  • Variable names: Double-check for typos in your configuration file. For example, INNER_NOTIFICATIN_SERVER_URL should be INNER_NOTIFICATION_SERVER_URL.
  • Documentation comparison: It might also help to review the official Seafile and SeaDoc documentation and compare your current configuration against the recommended examples, to ensure that no required settings are missing.

I made the fixes you suggested. I’m getting the same error. Additionally, I opened up the console and tried to opent the URL that’s throwing an error directly and got this error: {“error_msg”:“You don’t have permission to access.”}.

Does SEAHUB_SERVICE_URLhave to be the internal one like seafile:4000 or the external one like seafile.external.url?

Looks like seahub is able to authenticate with sdoc-server. The request in my browser console uses an auth token and gets a different response from the one I get directly accessing the URL.

I’m getting this in the browser: Cannot GET /sdoc-server/api/v1/docs/3137cc78-380c-4f5a-8b1c-abc445c78175/, with a response code of 404.

Raw response headers:

HTTP/1.1 404 Not Found
Access-Control-Allow-Headers: Content-Type, Authorization, Accept
Access-Control-Allow-Methods: DELETE,PUT,POST,GET,OPTIONS
Access-Control-Allow-Origin: *
Content-Length: 200
Content-Security-Policy: default-src 'none'
Content-Type: text/html; charset=utf-8
Date: Sat, 30 Aug 2025 21:31:57 GMT
Via: 1.1 Caddy
X-Content-Type-Options: nosniff
X-Powered-By: Express

To debug the issue, I suggest you first identify which component return this 404 response.

Normally, the request should be handled by sdoc-server. Can you make sure sdoc-server correctly receive this request? Or is the request be served by seahub because the caddy proxy configuration is wrong?

I fixed the routing. The request is answered by an express server now, which can only be the seadoc server.

HTTP/1.1 404 Not Found
Access-Control-Allow-Headers: Content-Type, Authorization, Accept
Access-Control-Allow-Methods: DELETE,PUT,POST,GET,OPTIONS
Access-Control-Allow-Origin: *
Content-Length: 200
Content-Security-Policy: default-src 'none'
Content-Type: text/html; charset=utf-8
Date: Tue, 02 Sep 2025 19:22:42 GMT
Via: 1.1 Caddy
X-Content-Type-Options: nosniff
X-Powered-By: Express

Glad to see that the request is now correctly route to sdoc-server.

Then, what error do you have in sdoc-server’s logs?

The folder /shared in the seadoc container is mounted on my host at /srv/seafile/seadoc. I can see a sdoc-server.log file and a few more rotated versions of the same file from before.

T]> sudo tail -f /srv/seafile/seadoc/logs/sdoc-server.log
[2025-09-03 13:50:09] [INFO] document-manager.js[104] - 0 docs saved.
[2025-09-03 13:50:09] [INFO] excalidraw-manager.js[99] - 0 docs saved.
[2025-09-03 13:55:09] [INFO] document-manager.js[104] - 0 docs saved.
[2025-09-03 13:55:09] [INFO] excalidraw-manager.js[99] - 0 docs saved.
[2025-09-03 14:00:09] [INFO] document-manager.js[104] - 0 docs saved.
[2025-09-03 14:00:09] [INFO] excalidraw-manager.js[99] - 0 docs saved.
[2025-09-03 14:05:09] [INFO] document-manager.js[104] - 0 docs saved.
[2025-09-03 14:05:09] [INFO] excalidraw-manager.js[99] - 0 docs saved.
[2025-09-03 14:10:09] [INFO] document-manager.js[104] - 0 docs saved.
[2025-09-03 14:10:09] [INFO] excalidraw-manager.js[99] - 0 docs saved.

All of the sdoc-server.log files only have these lines over and over again.

I’m a little further along now @daniel.pan.

I’m getting this error from seadoc server:

{"error_type":"content_load_invalid","error_msg":"Internal Server Error"}

with a response status code of 500.

Any idea how I can fix this?

I’m getting this error in the seadoc access logs:

Load test.sdoc(ca54a6b4-36f1-4756-96bf-9d64db1e9053) from https://sf.<redacted>/seafhttp/files/06a43ad8-3dbf-4acd-81f6-9af803a25aa1/test.sdoc error

Make sure sdoc-server can connect Seafile server via path https://sf.<redacted>/seafhttp/files/06a43ad8-3dbf-4acd-81f6-9af803a25aa1/test.sdoc

Maybe your sdoc-server cannot connect Seafile server via external domain.

@daniel.pan spot on, my container was not able to resolve seafile.

I fixed that error and now I’m getting this when I try to open a sdoc file.

{"error_type":"content_invalid","error_msg":"Query data from Database error"}

On which log file do you have this error?

This is from the 500 response in the browser when I open an sdoc file. I can see the Query data from Database error in sdoc-server.log.

sdoc-server need to access the same database of seafile server. You should check your configuration of database for sdoc-server.

Ah I’m in the middle of migrating to a different database so sdoc-server is on a a separate database from seafile.

They’re both connected to the same database and I still get the exact same error.

Also sdoc-server hasn’t created any database tables. How can I get it to do that?

SeaDoc uses one database table seahub_db.sdoc_operation_log to store operation logs. The database table is cleaned automatically.

You can check SeaDoc Integration - Seafile Admin Manual

The table is created when by the seafile-server container during installation.