Seadoc Load doc content error

I’ve had Seafile working for a few weeks using nginx proxy manager to connect to my Seafile instance at seafile.mydomain.

I added Seadoc to the same Docker Compose .yaml file and network, but I’m encountering issues. When I try to open a .sdoc file, I get a 403 error in the console with “Load doc content error” in red.

Here’s the relevant section of my seahub_settings.py file:

ENABLE_SEADOC = True
SEADOC_PRIVATE_KEY = '<the key I got from sdoc_server_config.json>'
SEADOC_SERVER_URL = ' my domain sdoc-server/'
FILE_CONVERTER_SERVER_URL = ' sdoc-server:8888'

Initially, I manually created the custom locations /sdoc-server/ and /socket.io in nginx Proxy Manager. However, visiting mydomain.com/sdoc-server would return a “403 Forbidden” error. I then removed these custom locations and copied the configuration from seafile.nginx.conf in the Seafile manual. Now, visiting mydomain.com/sdoc-server shows “Welcome to sdoc-server. The current version is 0.7.0.”

This seems like progress, but the “Load doc content error” and 403 error in the console persists when I try to open .sdoc files.

Also, the sdoc-server.log says:

[2025-01-18 12:38:44] [INFO] document-manager.js[104] - 0 docs saved.
server is serve on http local host :7070
[2025-01-18 12:39:12] [INFO] www.js[22] - Starting sdoc server process: 52
[2025-01-18 12:39:22] [ERROR] auth.js[25] - invalid signature
[2025-01-18 12:39:23] [ERROR] auth.js[25] - invalid signature
[2025-01-18 12:39:30] [ERROR] auth.js[25] - invalid signature
[2025-01-18 12:39:33] [ERROR] auth.js[25] - invalid signature
[2025-01-18 12:42:49] [ERROR] auth.js[25] - jwt malformed
[2025-01-18 12:43:09] [ERROR] auth.js[25] - jwt malformed
[2025-01-18 12:43:13] [ERROR] auth.js[25] - jwt malformed
[2025-01-18 12:44:11] [ERROR] auth.js[25] - jwt malformed
[2025-01-18 12:44:12] [INFO] document-manager.js[104] - 0 docs saved.
[2025-01-18 12:49:12] [INFO] document-manager.js[104] - 0 docs saved.

Here’s my Docker Compose .yaml file:

services:
  db:
    image: ${SEAFILE_DB_IMAGE:-mariadb:10.11}
    container_name: seafile-mysql
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:?Variable is not set or empty}
      - MYSQL_LOG_CONSOLE=true
      - MARIADB_AUTO_UPGRADE=1
    volumes:
      - "${SEAFILE_MYSQL_VOLUME:-/opt/seafile-mysql/db}:/var/lib/mysql"
    networks:
      - proxy-network
    healthcheck:
      test:
        [
          "CMD",
          "/usr/local/bin/healthcheck.sh",
          "--connect",
          "--mariadbupgrade",
          "--innodb_initialized",
        ]
      interval: 20s
      start_period: 30s
      timeout: 5s
      retries: 10

  memcached:
    image: ${SEAFILE_MEMCACHED_IMAGE:-memcached:1.6.29}
    container_name: seafile-memcached
    restart: unless-stopped
    entrypoint: memcached -m 256
    networks:
      - proxy-network

  seafile:
    image: ${SEAFILE_IMAGE:-seafileltd/seafile-mc:12.0-latest}
    container_name: seafile
    restart: unless-stopped
    volumes:
      - ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
    environment:
      - DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
      - DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
      - DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
      - DB_ROOT_PASSWD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-}
      - DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
      - SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db}
      - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
      - SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db}
      - TIME_ZONE=${TIME_ZONE:-Etc/UTC}
      - INIT_SEAFILE_ADMIN_EMAIL=${INIT_SEAFILE_ADMIN_EMAIL:-me@example.com}
      - INIT_SEAFILE_ADMIN_PASSWORD=${INIT_SEAFILE_ADMIN_PASSWORD:-asecret}
      - SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
      - SEAFILE_SERVER_PROTOCOL=${SEAFILE_SERVER_PROTOCOL:-http}
      - SITE_ROOT=${SITE_ROOT:-/}
      - NON_ROOT=${NON_ROOT:-false}
      - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
      - SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
      - ENABLE_SEADOC=true
      - SEADOC_SERVER_URL=${SEADOC_SERVER_URL:-domain.com/sdoc-server}
    depends_on:
      - db
      - memcached
    networks:
      - proxy-network

  sdoc-server:
    image: seafileltd/sdoc-server:latest
    container_name: sdoc-server
    ports:
      - 7070:7070
      - 8888:8888
    volumes:
      - ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
    environment:
      - DB_HOST=db
      - DB_PORT=3306
      - DB_USER=${SDOC_DB_USER}
      - DB_PASSWD=${SDOC_DB_PASSWD}
      - DB_NAME=${SDOC_DB_NAME}
      - TIME_ZONE=${TIME_ZONE}
      - SDOC_SERVER_LETSENCRYPT=false
      - SDOC_SERVER_HOSTNAME=mydomain.com
      - SEAHUB_SERVICE_URL=https://mydomain
    depends_on:
      - db
    networks:
      - proxy-network

networks:
  proxy-network:
    external: true

I’ve set up a .env file for secrets. Any insights on resolving this “Load doc content error” would be greatly appreciated!

What version do you use? Do you use version 12.0?

Yes 12.0

My error was following the V11 manual in another section of seafile and trying to make it fit to V12. I just followed Seafile Admin Manual V12 (I would add the link but it doesn’t let me)

I gave up on nginx proxy manager and followed the caddy config - was easy to get going after that.