I’ve been struggling for the past 48 hours to get Seafile running with an external NFS volume, and I feel like I’m hitting a wall.
Seafile works perfectly fine when its volume is mounted locally. However, as soon as I point it to an external NFS volume (which I’ve successfully used for other containers without issue), Seafile simply refuses to start.
Here’s what I’ve tried so far:
Tested various docker-compose.yml configurations.
Experimented with different approaches to mounting the NFS resource
Rechecked permissions and ensured the NFS share works with other containers.
Despite all this, nothing works, and I can’t figure out why Seafile behaves differently.
Why is it impossible to use a straightforward setup with “external” volumes and a standard NFS network share, as we usually do with Docker?
I’m out of ideas, and my head feels like it’s about to explode. Any guidance would be greatly appreciated!
Hi, Seafile can definitely work with NFS. It’s the main way I’ve been using it, with the database on the local server machine and all the data accessed via NFS on a NAS.
The mount in the docker compose file is nothing different from any other volume mount, as long as your server has the proper access to it:
volumes:
- /nfs/documents/seafile/data:/shared
I’m using autofs in Ubuntu/Debian to automount my NFS shares on demand, and it works wonderfully.
Here’s the full compose.yaml I’ve been using for a couple of years, in case it helps:
(You can ignore the labels and Traefik bits if you don’t use traefik for reverse proxy.)
Thank you very much, I finally succeeded, and it’s now working perfectly with the data folder on my NAS using NFS.
I tested file uploads, and it works. However, one thing isn’t working: uploading a custom logo (and avatars). My custom logo is correctly uploaded to the NFS share in \seafile\seahub-data\custom, but it doesn’t appear on the site. Instead, the word “logo” is displayed as text. This is probably related to NFS, because during my previous tests when I wasn’t using NFS storage, it seemed to work fine.
A huge thank you to you! You solved both of my problems today! After mounting the resource to the NAS via NFS, I didn’t think a chmod would have any effect—but it did, and that’s exactly what needed to be done. Everything is working perfectly now, thanks to your help! A big, big thank you!