Cannot get SeaDoc working on fresh install

Hello all!

I am looking for help regarding initial setup. On my fresh instance, Seadoc and related features are not working. Wiki features do not work, and I am unable to create/edit .sdoc files.

My configuration is relatively simple, and close to the stock setup. I am using the latest Seafile 13 community edition Docker setup instructions. I consolidated the compose files into a single compose file, and deployed using Portainer’s stack feature. Because I have multiple stacks/containers running on one server IP, I use Nginx Proxy Manager (NPM) to terminate SSL and handle all incoming connections on one port.

Because of this, I had to make adjustments to the compose file to account for a reverse proxy handling SSL. I have caddy container attached to a second network, so that NPM can reach it. In several places, I had to customize the XXX_PROTOCOL or other service URLs to be http or https , depending on whether the URL was internal or external. All of the caddy labels use http because they are internal traffic. And in the seahub_settings.py, I added CSRF_TRUSTED_ORIGINS = [“https://seafile.example.com”] . These steps fixed the issue of not being able to proceed after initial login (403).

I am able to access https://seafile.example.com/sdoc-server/ and I see a page with: Welcome to sdoc-server. The current version is 2.0.9.

The symptom I see is when opening an sdoc file, the request for the document (ex, https://seafile.example.com/sdoc-server/api/v1/docs/bd262c77-0e5c-4f30-895f-4c8ef22bbae3/ hangs and eventually terminates. A similar problem happens when I try to create a page in a Wiki.

The error in sdoc-server.log that appears once the request terminates is

[2026-03-27 16:30:25] [ERROR] index.js[177] - Service unknown error
[2026-03-27 16:30:25] [ERROR] index.js[178] - error_type:  UNKNOWN_ERROR
[2026-03-27 16:30:25] [ERROR] index.js[179] - error_message:  timeout of 60000ms exceeded
[2026-03-27 16:30:25] [ERROR] index.js[180] - error_stack:  AxiosError: timeout of 60000ms exceeded
    at RedirectableRequest.handleRequestTimeout (/opt/sdoc-server/sdoc-server-2.0.9/sdoc-server/node_modules/axios/dist/node/axios.cjs:3365:16)
    at RedirectableRequest.emit (node:events:524:28)
    at Timeout.<anonymous> (/opt/sdoc-server/sdoc-server-2.0.9/sdoc-server/node_modules/follow-redirects/index.js:210:12)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7)
    at Axios.request (/opt/sdoc-server/sdoc-server-2.0.9/sdoc-server/node_modules/axios/dist/node/axios.cjs:4483:41)
[2026-03-27 16:30:25] [ERROR] document-controller.js[56] - Get doc download link error
[2026-03-27 16:30:25] [ERROR] document-controller.js[64] - Get doc download link error. request url is: https://seafile.example.com/api/v2.1/seadoc/download-link/bd262c77-0e5c-4f30-895f-4c8ef22bbae3/

I cannot find any cross-correlating log in seafile-data/seafile/logs.

I tried:

I have not tried:

  • Editing the NGINX inside seafile from this post: "Load doc content error" - #7 by TechnicallyReal
    • I do not want to be tinkering with an auto generated NGINX file. That just sounds like a recipe for a fragile build that I have to redo every time the container is restarted.
  • Setting up SeaDoc as a standalone service
    • I do not believe this would fix the issue because I have proven I can access the SeaDoc server just fine from the end client.

Any tips or suggestions are helpful. Hopefully i have not missed something simple, but I am willing to look like a fool on the internet if it solves this problem, and maybe helps someone else. :sweat_smile: I really like Seafile and would like to use it for my home file management. If I cannot get Seadoc working, it is not the end of the world. From reading many forum posts and github issues trying to dig for a solution, it seems many people run into issues trying to terminate SSL outside of the seafile stack. My suggestion would be to include some additional guide on how to do an “http-only” seafile deployment for these kinds of users. Thank you all for your hard work on this project and for answering questions on this forum.

Here is the analysis by our AI:


Based on the logs and configuration details provided, here is an analysis of the issue where SeaDoc (sdoc-server) fails to open or create files in a fresh Seafile 13 installation with a reverse proxy setup.

Problem Analysis

The core issue is a network loopback or routing failure between the sdoc-server container and the Seafile server.

According to the sdoc-server.log provided:

[ERROR] document-controller.js[64] - Get doc download link error. request url is: https://seafile.example.com/api/v2.1/seadoc/download-link/...
...
[ERROR] index.js[180] - error_stack: AxiosError: timeout of 60000ms exceeded

When a user tries to open an .sdoc file, the sdoc-server attempts to contact the Seafile API to fetch a download link. In this setup, sdoc-server is trying to reach Seafile via the external URL https://seafile.example.com. Because the environment uses Nginx Proxy Manager (NPM) and multiple network layers, the sdoc-server container is likely unable to resolve or route to its own external domain name from within the Docker network, leading to the 60-second timeout.

Key Points to Check

  1. Internal URL Communication:
    The sdoc-server needs to talk to the Seafile API. In Docker environments, it is often more reliable to use the internal container name (e.g., http://seafile:80) for service-to-service communication rather than the external HTTPS URL. Check the sdoc_server_config.json (or the environment variables passed to the SeaDoc container) to see if SEAFILE_SERVER_ROOT is pointing to the external URL.

  2. Docker Network Loopback:
    If you must use https://seafile.example.com internally, ensure the sdoc-server container can actually reach that address. You can test this by running a shell inside the container:

    docker exec -it sdoc-server curl -v https://seafile.example.com
    

    If this fails or hangs, it confirms a routing issue.

  3. Nginx Proxy Manager (NPM) Configuration:
    Since you are using NPM → Caddy → Seafile, there are multiple layers of proxying. Ensure that the headers (especially Host, X-Forwarded-For, and X-Forwarded-Proto) are being passed correctly through both NPM and Caddy. SeaDoc is sensitive to the Origin and Host headers.

  4. DNS Resolution (extra_hosts):
    A common fix for this in Portainer/Docker Compose is to add an extra_hosts entry to the sdoc-server service in your compose file, mapping seafile.example.com to the internal IP of your proxy or the Seafile container:

    extra_hosts:
      - "seafile.example.com:172.xx.x.x" # Internal IP of the gateway or seafile container
    

Recommended Next Step

Check the configuration file for SeaDoc (usually located at /shared/seafile/conf/sdoc_server_config.json or passed as SDOC_SERVER_HOSTNAME in Docker). Ensure the internal communication URL is set to use the internal Docker network (HTTP) instead of the external HTTPS address to avoid the hairpin NAT/routing timeout.


Personally, I suggest you to remove the Caddy to avoid another middle layer in your setup.