Seafile Docker setup: separating config from user libraries?

Hi,

I’m want to run Seafile with Docker and I’m unsure about the recommended approach for separating configuration from user libraries.

My goal would be to keep all Seafile configuration, runtime files and the database on local storage, while storing user libraries on a remote filesystem (in my case a Hetzner Storage Box mounted via SSHFS). However, the official Docker Compose setup only mounts a single volume for the Seafile container itself, so I’m not sure whether this kind of separation is supported or even possible? For example in nextcloud i could just specifiy two directories like this:

volumes:
- /path/to/nextcloud/config:/config
- /path/to/data:/data

Is this also in any way possible with Seafile? Would be great if someone knew that as I wanna replace Nextcloud with Seafile.

I’d appreciate any guidance or best practices from the community.

Thanks!

The easy answer:
Set SEAFILE_VOLUME in the .env file to point to the remote storage, and everything else on local. There’s a few containers that will put their files there, but it isn’t much data.

Somewhat less easy answer:
Technically the above would put some logs and config on the remote storage, along with some files for some of the optional containers like the thumbnail server. Most of the big stuff that matters, like the database would be local. But if you want to put in some extra effort, you can break up the seafile-server directory a bit more.

The default is:
volumes:
- ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared

And you could add the remote storage to that. like:
volumes:
- ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
- /path/to/sshfs/remote:/shared/seafile
- /path/to/local/logs/space:/shared/seafile/logs