Seafile docker image based on Debian
Seafile is an open source storage system which can be self hosting for more privacy
- Auto configuration on first run, based on the manual setup described in the official documentation
- Auto import previous installation, including non docker installation
- Support FASTCGI mode (this mode is no longer supported by Seafile since version 6.3.1)
- Upgrade Seafile with one simple command
- Support LDAP configuration
- Support reverse proxy configuration
- Support MySQL and Sqlite
Tags, based on Semantic Versioning, follow the schema x.y.z-a where x.y.z is the version of Seafile and a is an increment to follow features and bug fix of this image
- latest Development version, may be unstable
- 8.0.3 Updated Seafile version, migrated to Python 3 and changed bases image to slim-buster
- 6.3.4 Updated Seafile version
- 6.3.3 Updated Seafile version
- 6.3.2-1 Fixed issue in proxy configuration
- 6.3.2 Updated Seafile version
- 6.3.1-1 Added Sqlite support
Complete rewrite to easily add more configuration
Fixed issue when upgrading (empty cache) - 6.3.1 Updated Seafile version
- 6.2.5 Updated Seafile version
- 6.1.2-2 Added reverse proxy configuration
- 6.1.2-1 Added LDAP configuration (thanks to zsoerenm)
- 6.1.2 Updated Seafile version
- 6.1.1 Updated Seafile version
-
- 8000 (seafile port)
- 8082 (seahub port)
-
-
This image exposes only one volume
- /seafile
-
Directory Structure
├── ccnet │ └── seafile.ini │ ├── conf │ ├── ccnet.conf │ ├── seafdav.conf │ ├── seafile.conf │ ├── seahub_settings.py │ └── seahub_settings.pyc │ ├── logs │ ├── ccnet.log │ ├── controller.log │ ├── seafile.log │ ├── seahub.log │ └── seahub_django_request.log │ ├── seafile-data │ ├── seahub │ └── media │ ├── seahub-data │ └── sqlite └── seahub.db
- The folder seafile/seahub/media must be shared with Apache/Nginx when running behind a reverse proxy
-
-
-
- SERVER_NAME (default is seafile): name of the server
- SERVER_ADDRESS (default is 127.0.0.1): IP or domain name of the server
- FASTCGI (default is false): If true or True then run seafile in fastcgi mode
- SEAFILE_ADMIN (required): email for the admin account
- SEAFILE_ADMIN_PASSWORD (required): password for the admin account
-
By default Seafile is configured to use Sqlite unless MYSQL_SERVER is set
- MYSQL_SERVER: MySQL/Maria DB Server name or ip
- MYSQL_PORT (default is 3306): port used by the database server
- MYSQL_ROOT_PASSWORD (required if MYSQL_SERVER is set): root user is needed by Seafile to create its own databases
- MYSQL_USER (required if MYSQL_SERVER is set): MYSQL user used by Seafile
- MYSQL_USER_PASSWORD (required i MYSQL_SERVER is set): password for MYSQL_USER
- MYSQL_CCNET_DB (default is ccnet-db): name of CCNET database
- MYSQL_SEAFILE_DB (default is seafile-db): name of SEAFILE database
- MYSQL_SEAHUB_DB (default is seahub-db): name of SEAHUB database
-
- LDAP_URL : LDAP URL (e.g. ldap://openldap)
- LDAP_BASE (required if LDAP_URL is set): LDAP BASE (e.g. ou=people,dc=example,dc=org)
- LDAP_LOGIN_ATTR (required if LDAP_URL is set): LDAP Login attribute (e.g. mail)
- LDAP_USER_DN (optional): LDAP user DN (e.g. cn=admin,dc=example,dc=org)
- LDAP_PASSWORD (optional): LDAP user password
-
- REVERSE_PROXY_MODE (value=HTTP or HTTPS): configure Seafile to run behind a reverse proxy.
-
version: '2'
services:
seafile:
image: sabaitech/seafile
container_name: seafile
ports:
- "8000:8000"
- "8082:8082"
environment:
- SERVER_ADDRESS=my.domain.com
- REVERSE_PROXY_MODE=HTTPS
- FASTCGI=true
- MYSQL_SERVER=mariadb
- MYSQL_USER=seafile
- MYSQL_USER_PASSWORD=test
- MYSQL_ROOT_PASSWORD=passw0rd!
- [email protected]
- SEAFILE_ADMIN_PASSWORD=passw00rd
- LDAP_URL=ldap://openldap
- LDAP_BASE=ou=people,dc=example,dc=org
- LDAP_LOGIN_ATTR=mail
- LDAP_USER_DN=cn=admin,dc=example,dc=org
- LDAP_PASSWORD=ldap_passw0rd
volumes:
- ./seafile:/seafile
depends_on:
- mariadb
mariadb:
image: mariadb:10.1
container_name: mariadb
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=passw0rd!
- MYSQL_USER=seafile
- MYSQL_PASSWORD=test
volumes:
- ./mysql/db:/var/lib/mysql
and just run docker-compose up -d
If you already have a previous installation of Seafile server (including non docker installation) and want to use this image you just have to:
- Put
conf
,logs
,seafile-data
directories in the associated volume - Run
docker-compose up -d
You can start, stop, restart seafile and seahub with a command like :
docker-compose exec seafile server command
where:
-
seafile is the name of the service defined in docker-compose.yml file
-
server is seafile or seahub
-
command is start, stop, restart
To upgrade the current version of Seafile server, you just have to run the following command:
docker-compose exec seafile upgrade 6.3.1
where:
-
seafile is the name of the service defined in docker-compose.yml file
-
6.3.1 is the new version
Once you have upgraded the server, you can change the version of the image in the docker-compose.yml
file to keep the change permanently.
To remove unused data blocks, you can run the garbage collector:
docker-compose exec seafile gc
It will stop Seafile server, run the garbage collector, and then restart Seafile
Seafile comes with a tool to check the integrity, to repair the corrupted or to export libraries. To run this tools, you can execute:
docker-compose exec seafile fsck
It a simple shortcut to seaf-fsck.sh
. The manual describes all the options of this tool