I am new to Seafile, and only a casual home server user/admin/noob.
I have successfully followed the instructions for setting up Seafile CE via Docker on Ubuntu 20.04. I can access the web portal via a no-ip domain and sync to Windows via the client.
To be honest, I have no idea how any of this works: Docker documentation states “Bind propagation is an advanced topic and many users never need to configure it.” Use bind mounts | Docker Documentation
It still doesn’t work. The error is now:
ERROR: for seafile Cannot start service seafile: path /home/jonathan/seafile/seafile-fuse is mounted on /home but it is not a shared mount
Well at least in my case I can use seadrive cli to mount the account of the admin user which has all the libraries for my install that are then shared with regular users. But I guess if you want everything for all users mounted you need to do what you are doing.
As to docker I would not load docker via a snap. Snaps and flatpaks run in a sandbox which is not a great idea for anything that has to interact with the filesystem (I avoid them). Because of that running docker in a snap may cause issues with mounting a container volume externally.
Load it directly with apt using their repo to get the latest or run the get docker script that does that all in one step. Make sure your ubuntu admin user is added to the docker group (I think the script does that). I spin up portainer to manage docker.
I also set up pip and pipx and then can load the latest docker-compose easily.
get pip installed (via sudo). Install pipx using pip (sudo). Set env and path. Now just run pipx install docker-compose
PIPX_BIN_DIR=/opt/python/apps/bin
PIPX_HOME=/opt/python/apps
put that bin directory in your path
One wonders if seafile-fuse can be run stand alone outside the container? If so then for example I have my blocks mounted on the host already and I could fuse mount them there and then backup. Actaully I’d just backup the blocks and only fuse mount them if the backups are needed. That’s probably the best idea since the blocks are already “compressed”.
version: '2.0'
services:
db:
image: mariadb:latest
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD= # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /data/files-server/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
ports:
- "11360:3360"
restart: unless-stopped
networks:
- seafile-net
memcached:
image: memcached:latest
container_name: seafile-memcached
entrypoint: memcached -m 256
restart: unless-stopped
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
ports:
- "11080:80"
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- /data/files-server/data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD= # Requested, the value shuold be root's password of MySQL service.
- TIME_ZONE=America/Los_Angeles # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL= # Specifies Seafile admin user, default is 'me@example.com'.
# - SEAFILE_ADMIN_PASSWORD= # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=files.gpccaor.net # Specifies your host name if https is enabled.
depends_on:
- db
- memcached
restart: unless-stopped
networks:
- seafile-net
networks:
seafile-net: null
so if I backup /data/files-server/ I have a complete system backup. In theory I just restore those, maybe sure my compose points to them and restart the containers and I should get an identical install.
tldr:
Use version 3.3 or above in the docker-compose file
Docker from snap does not work. Use the package manager as per the normal install instructions.