Skip to content

Seafile Pro

Seafile Pro is the Blueprint’s file sync and sharing platform — private cloud storage with browser-based Office editing (OnlyOffice), collaborative document editing (SeaDoc), full-text search (SeaSearch), and antivirus scanning (ClamAV). All ten services deploy as a single Compose stack.

Written against 13.0.21 · no verification recorded against that version

Not exercised: backup and restore. Three databases, the block store and the search index have to be recovered in order, and none of it has been rehearsed.

Needs: Traefik running, a hostname, a Seafile Pro commercial license, and an external OnlyOffice instance for .docx/.xlsx/.pptx editing (optional — all other features work without it).

From apps/seafile-pro/:

  1. Terminal window
    cp .env.example .env
  2. Set required values in .env:

    APP_TRAEFIK_HOST=files.example.com
    SEAFILE_ADMIN_EMAIL=admin@example.com
    TZ=Europe/Vienna
  3. Generate passwords and the JWT key:

    Terminal window
    sed -i "s|^INIT_SEAFILE_MYSQL_ROOT_PASSWORD=.*|INIT_SEAFILE_MYSQL_ROOT_PASSWORD=$(openssl rand -base64 32 | tr -d '\n')|" .env
    sed -i "s|^SEAFILE_MYSQL_DB_PASSWORD=.*|SEAFILE_MYSQL_DB_PASSWORD=$(openssl rand -base64 32 | tr -d '\n')|" .env
    sed -i "s|^INIT_SEAFILE_ADMIN_PASSWORD=.*|INIT_SEAFILE_ADMIN_PASSWORD=$(openssl rand -base64 32 | tr -d '\n')|" .env
    sed -i "s|^JWT_PRIVATE_KEY=.*|JWT_PRIVATE_KEY=$(openssl rand -base64 48 | tr -d '\n')|" .env
    sed -i "s|^REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -hex 32)|" .env
  4. If using OnlyOffice, set the hostname and copy the JWT secret — it must match the OnlyOffice server exactly:

    ONLYOFFICE_HOST=office.example.com
    Terminal window
    # sed -i "s|^ONLYOFFICE_JWT_SECRET=.*|ONLYOFFICE_JWT_SECRET=<value-from-core/onlyoffice>|" .env
  5. Pull images:

    Terminal window
    docker compose pull
  6. Start the stack:

    Terminal window
    docker compose up -d
  7. Wait for all containers to be healthy — first boot initialises the databases and takes roughly three minutes:

    Terminal window
    docker compose ps
  8. Required: restart the app container once to inject Blueprint configs into Seafile’s settings files. This step only needs to run once — a marker prevents it from repeating on subsequent restarts:

    Terminal window
    docker compose restart app
  9. Build the initial full-text search index:

    Terminal window
    docker exec seafile-pro-app /opt/seafile/seafile-server-latest/pro/pro.py search --update
Terminal window
docker compose ps # all ten containers up; app, db, redis, clamav should show healthy

Confirm the config injection from step 8 ran:

Terminal window
docker exec seafile-pro-app grep "Blueprint" /shared/seafile/conf/seahub_settings.py
docker exec seafile-pro-app grep "SEASEARCH" /shared/seafile/conf/seafevents.conf
docker exec seafile-pro-app grep "virus_scan" /shared/seafile/conf/seafile.conf

Each command should return a matching line. No output means the injection step was skipped — run docker compose restart app and recheck.

Confirm the notification server is reachable:

Terminal window
curl -s https://your-domain/notification/ping # {"ret": "pong"}

Test antivirus:

Terminal window
docker exec seafile-pro-app bash -c "curl -s https://secure.eicar.org/eicar.com.txt | clamdscan -"
# Expected: stream: Eicar-Test-Signature FOUND

Then in the browser, confirm each service works:

  • Log in with the admin account.
  • Upload a file and download it back.
  • Create and edit a Markdown (.md) file.
  • Open a .docx in the OnlyOffice editor (requires OnlyOffice configured).
  • Create a .sdoc file and open it in SeaDoc.
  • Search for a word from an uploaded file — SeaSearch should return it.

OnlyOffice embeds a browser-based Office editor into Seafile. It runs as a separate server — either another Blueprint stack or a different machine — and both sides share the same JWT secret.

Server-to-server path: OnlyOffice needs a direct network route to Seafile’s configured hostname to fetch files and save edits back. That path can be a public internet connection or a private route such as Tailscale. If DNS for the Seafile hostname resolves to a Tailscale address on the OnlyOffice host, it will use that path automatically — no additional configuration is needed on the OnlyOffice side for the network path itself.

Allowed origins: On the OnlyOffice server, add the Seafile origin to ONLYOFFICE_ALLOWED_ORIGINS in its .env so browsers are permitted to embed the editor in an iframe. In the Blueprint’s core/onlyoffice stack this value is embedded in a Traefik label — changing it takes effect only after recreating the container, not after a plain restart:

Terminal window
# On the OnlyOffice server — restart is NOT enough:
docker compose up -d --force-recreate

SMTP is optional but required for password reset emails, share invitations, and file change notifications. Set the SMTP variables in .env:

SEAFILE_SMTP_HOST=smtp.example.com
SEAFILE_SMTP_PORT=587
SEAFILE_SMTP_USER=user@example.com
SEAFILE_SMTP_FROM=seafile@example.com
SEAFILE_SMTP_USE_TLS=true
SEAFILE_SMTP_PASSWORD=your-smtp-password

Then recreate the app so it picks up the new values — docker compose restart keeps the environment the container was created with, so a changed .env would have no effect:

Terminal window
docker compose up -d app

Backup and restore covers the host side — Borgmatic, the repository, the schedule and the database hooks. What this stack contributes:

  • volumes/seafile-data/ — all user files and library data
  • volumes/mysql/ — all three databases (Seafile, Seahub, Ccnet)
  • volumes/seadoc-data/ — collaborative document state
  • The .env file and any secrets
  1. Read the Seafile Pro release notes and the Docker upgrade guide for breaking changes.

  2. Back up all volumes before touching the stack.

  3. Update image tags in .envAPP_TAG for the main server, and the tags for any component services that changed.

  4. Pull and recreate:

    Terminal window
    docker compose pull
    docker compose up -d
  5. Watch app logs for any database migration output:

    Terminal window
    docker compose logs -f app
  6. Verify login, file access, editing, and search after the update.