Hello everyone!
I’ve finally managed to move my Sqlite based seafile running directly on ubuntu to a docker-based seafile including mariadb in docker too.
I was using seafuse to share my media stored in seafile with a jellyfin server running on the same host.
Sadly, I realized that seafuse can only be started manually within docker, so I was looking for another solution and I found one, so I would like to share it with you.
Rclone supports seafile and it is rather easy to mount a webdav folder either directly in the host file system or add it as a docker volume.
You need to install rclone and the docker plugin and add some config to the docker compose file of your application where you want to use the seafile data.
E.g. see here: https://www.reddit.com/r/jellyfin/comments/xnv9vb/how_to_use_content_from_a_remote_webdav_server_in/
Up and running since several days and no need to run seafuse at all
Interesting! Does the rclone plus docker plugin access the files directly from Seafile? Or does it make a copy of all files out of Seafile into another location. And does this work with encrypted libraries as well?
It accesses Seafile directly, via Webdav protocol. So it is also not limited to read-only access (compared to seaf-fuse). And no need to perform a copy of the files.
According to the rclone manual it should work with encrypted libraries too, but I haven’t tested that yet.
P.S. If there is interest for this, I can write a short tutorial that can be added to the seafile manual.
Just a small note for anyone that might want to try this:
This is excellent for media files that are mostly going to be read by the server, not written to that much. Seafile has top tier conflict resolution and delta sync implemented on the clients, using rclone might not be a great idea if you have a bunch of small files that change often or could be changed by the server and other users at the same time.
That is true!
I use it mainly to access my media files, that I accessed with seafuse in the past.
But at least I can also update the mp3-tags now as we have write access as well.
Unlikely that other users would interfere here
Update after some weeks:
The docker volume plugin has a drawback. It gets disabled on reboot when the docker container running seafile is not up before the plugin checks the availability.
Thus I have removed the volume plugin and replaced it with an rclone docker container found here: https://hub.docker.com/r/mumiehub/rclone-mount
I’ve added a depends_on for that container so it only starts after seafile container.
And now I can share my videos to jellyfin using a docker container chain If someone needs help to figure that out, just let me know.
Thanks a lot for highlighting rclone! It’s truly an awesome piece of software. I wasn’t aware that there are alternatives to Seafile’s WebDAV implementation. From what I understand, rclone implements Seafile support natively and doesn’t rely on the WebDAV interface. That’s why encrypted libraries and two factor auth are also supported. I’ve read that it’s supposed to be significantly faster than Seafdav.
I have a similar use case: I want to access my music library in Seafile with a lyric music server. However, since the Seafile server is running on the same host and managed with Docker, the rclone Docker plugin doesn’t work for me. The reason is that the volumes are created before the services are started. That’s why I also tried to use the Docker mount approach.
Update:
this is my docker compose part for rclone-mount:
Basically it works, but unfortunately the service starts before Seafile is accessible via https, despite the depends_on part. What does this look like for you?
Thank you for your reply! Yes, the Seafile server is included in the same Docker Compose file.
It seems that even though the Seafile server starts correctly, it takes a few more seconds before a connection through SSL can be established. I’m not sure if it would be possible to access the server locally without SSL, but I just found a workaround with adding a health check to the compose configuration for the rclone-mount service: