[SOLVED] [Bug] Dockered Seafile: expose FUSE filesystem to host?


I have a dockered Seafile setup working fine.

What would be the best strategy to expose the FUSE filesystem to the HOST to initiate backups from the host (not from the container)?

My preferred approach would be a script on the HOST, mounting the FUSE filesystem and initiating rsync/rclone jobs, umounting FUSE. But I do struggle how to expose the FUSE FS…

Thanks, -MN


I found out that

docker exec -it seafile /bin/bash
mkdir /opt/seafile/seafile-fuse

/opt/seafile/seafile-server-latest/seaf-fuse.sh start /opt/seafile/seafile-fuse

will not work, as the kernel module fuse is missing. Neither insmod or modprobe are available inside the container. Loading fuse on the host side and retrying the mount does not work.

The main reason is that seaf-fuse binary is missing a library:

root@7bfaf4afe0c9:/opt/seafile/seafile-server-latest/seafile/bin# ./seaf-fuse
./seaf-fuse: error while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such file or directory

libevent is missing. This should be solved from Seafile within the docker-configuration, right?

Any ideas?

Inside container:

root@7bfaf4afe0c9:/opt/seafile/seafile-server-latest/seafile/lib# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/seafile/seafile-server-latest/seafile/lib

which holds a copy of libevent as required returns:

Failed to init log.

But this still not work:

root@7bfaf4afe0c9:/opt/seafile# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/seafile/seafile-server-latest/seafile/lib. 
root@7bfaf4afe0c9:/opt/seafile# ./seafile-server-latest/seaf-fuse.sh start seafile-fuse
Starting seaf-fuse, please wait ...
fuse: device not found, try 'modprobe fuse' first
Failed to start seaf-fuse

modprobe fuse has been executed on the host side, not on the container.

I’m sorry to hear that as I was considering converting my regular seafile installation into a docker-based one soon, but I use Seafile-Fuse right now, to make my image library available for my DLNA Server.
So without Fuse, I won’t convert. Have you made any progress on that issue?

Any idea how to fix this? Or is it currently simply impossible?

It is possible but too complex to use fuse inside docker. So we don’t have a plan to add such a feature to docker based installation.

Thanks for the fast reply!
In that case I’ll stick with my seafile installation directly on ubuntu.
Kind regards,

I respectfully disagree on both statements.

Too complex: Solution here: Docker loading kernel modules - Stack Overflow

No plans: FUSE is the recommended way to make backups. Being in production without backup is… not quite a good idea and will remove Seafile from a potential list of clients. Docker is the modern way to distribute software.

With all my respects, we need a solution or customers will jump the boat. It does not need to be a FUSE-based solution, but we need the same result (plan files available for backups).

Thanks, -MN

Got it working (and I am a Docker noob):


privileged: true # Comment if you do not require FUSE (seaf-fuse.sh) for backups

to the seafile container.


  - /lib/modules:/lib/modules # Only required for FUSE - see above
  - /sbin/modprobe:/sbin/modprobe

to the Seafile container volume section.

Now you can

docker exec -it seafile /bin/bash
modprobe fuse
/opt/seafile/seafile-server-latest/seaf-fuse.sh start /mnt

and it works. Took like 5 minutes of Google-Fu. I’ll update my GitHub repository accordingly.

I’m an even bigger Docker noob.
Where do I add this information? in the docker-compose file?
Kind regards,

@res80 I think it will not solve your use case (exporting the fuse’ed files to DNLA client).

However it will allow to run rsync/rclone for backup - local and encrypted to the cloud. I think I post the final setup by end of this week, once everything is working fine.

For your use case have you considered using WebDAV for your client? I do run Kodi on a Nvidia Shield Pro which works fine with WebDAV, NFS and cifs for up to 4K@60.

Thanks for sharing your setup.
I’m running a DLNA server on the same server as seafile.
The files served by seafuse can be scanned by the DLNA-server that way the dlna client of my TV can access them.
Works fine so far so I guess it should work with your setup too within docker :slight_smile:
I already use Webdav for syncing to my phone using foldersync on the phone as the original android client lacks features such as automatic syncing of phone folders and cloud folders in the presence of wifi. But my TV cannot use web-dav afaik.
Thank you.

Here you find the docker-compose.yml for Pro version which supports FUSE inside the container and rsync for backups. Requires an nginx-proxy-manager in front (see one directory up). There is a Readme.md (quite short).

@res80 To make your DNLA server work you will have to add it to the seafile container stack. Good luck

Thanks for sharing!
Btw, I’ve been using ZFS-snapshots and copying them to an external backup drive of the seafile program, the data-folder and the database for backup purposes, has been working great so far. I can even mount the external backup disk on another machine and fire up seafile there easily with all files in place. Rather nice and easy to maintain.

You can refer to this document to use FUSE in Docker

and Docker official document