Seafile File Sync & Share
Enterprise file sync and share platform with versioning, encryption, and team collaboration.
Overview
Seafile is an enterprise-grade open-source file synchronization and sharing platform developed by a team that previously worked on version control systems, bringing Git-like versioning concepts to file management. Originally created in 2012, Seafile distinguishes itself from competitors like Nextcloud or ownCloud through its unique block-level deduplication, client-side encryption capabilities, and distributed architecture that can scale to handle millions of files efficiently. The platform offers desktop clients for Windows, Mac, and Linux, mobile apps for iOS and Android, and a comprehensive web interface for browser-based access.
This stack combines Seafile with MariaDB for metadata storage, Memcached for session and object caching, and relies on Seafile's built-in web server for HTTP handling. MariaDB stores all file metadata, user information, and sharing permissions while the actual file data is stored in Seafile's proprietary storage format with block-level deduplication. Memcached accelerates the system by caching frequently accessed database queries, user sessions, and file metadata, significantly improving response times for large deployments with hundreds of concurrent users.
This configuration targets organizations requiring enterprise-level file collaboration with strong security controls, detailed audit trails, and the ability to maintain complete data sovereignty. Unlike cloud-based solutions, this self-hosted stack gives administrators full control over encryption keys, data location, and compliance requirements while providing features like remote device wipe, detailed access logs, and integration with LDAP/Active Directory for user management.
Key Features
- Block-level file deduplication reduces storage requirements by up to 90% for organizations with similar documents
- Client-side encryption with user-controlled keys ensures files remain encrypted even from system administrators
- Git-like file versioning with complete revision history and ability to restore any previous version
- MariaDB Aria storage engine provides crash-safe metadata storage with automatic recovery
- Memcached integration eliminates database bottlenecks during high concurrent access scenarios
- Two-way sync clients for desktop maintain offline access with conflict resolution
- Library-based organization allows granular sharing permissions at folder level rather than entire accounts
- WebDAV and RESTful API support enables integration with third-party applications and mobile workflows
Common Use Cases
- 1Law firms requiring client-privileged document sharing with audit trails and remote wipe capabilities
- 2Engineering teams collaborating on CAD files and technical drawings with version control and large file handling
- 3Healthcare organizations needing HIPAA-compliant file sharing with patient data encryption and access logging
- 4Educational institutions providing secure file storage for faculty and students with departmental isolation
- 5Remote development teams synchronizing code repositories and documentation across multiple time zones
- 6Financial services firms sharing sensitive documents with clients while maintaining regulatory compliance
- 7Manufacturing companies distributing technical specifications and quality documents to global facilities
Prerequisites
- Minimum 2GB RAM for MariaDB metadata storage and Seafile processing (4GB+ recommended for 50+ users)
- Port 80 and 443 available for Seafile web interface and client synchronization
- Valid SSL certificate or domain name for secure client connections and mobile app access
- Understanding of Seafile library concepts and permission models for proper organization setup
- Basic knowledge of MariaDB backup procedures for protecting user data and sharing configurations
- SMTP server configuration for user invitation emails and password reset functionality
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 seafile: 3 image: seafileltd/seafile-mc:latest4 environment: 5 DB_HOST: mariadb6 DB_ROOT_PASSWD: ${MYSQL_ROOT_PASSWORD}7 SEAFILE_ADMIN_EMAIL: ${ADMIN_EMAIL}8 SEAFILE_ADMIN_PASSWORD: ${ADMIN_PASSWORD}9 SEAFILE_SERVER_LETSENCRYPT: "false"10 SEAFILE_SERVER_HOSTNAME: ${SERVER_HOSTNAME}11 ports: 12 - "80:80"13 - "443:443"14 volumes: 15 - seafile_data:/shared16 depends_on: 17 - mariadb18 - memcached19 networks: 20 - seafile-net21 restart: unless-stopped2223 mariadb: 24 image: mariadb:10.1125 environment: 26 MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}27 volumes: 28 - mariadb_data:/var/lib/mysql29 networks: 30 - seafile-net31 restart: unless-stopped3233 memcached: 34 image: memcached:alpine35 networks: 36 - seafile-net37 restart: unless-stopped3839volumes: 40 seafile_data: 41 mariadb_data: 4243networks: 44 seafile-net: 45 driver: bridge.env Template
.env
1# MariaDB2MYSQL_ROOT_PASSWORD=secure_root_password34# Seafile Admin5ADMIN_EMAIL=admin@example.com6ADMIN_PASSWORD=secure_admin_password78# Server9SERVER_HOSTNAME=seafile.example.comUsage Notes
- 1Web UI at http://localhost
- 2Desktop and mobile clients available
- 3File versioning and encryption
- 4Team and group management
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
seafile
seafile:
image: seafileltd/seafile-mc:latest
environment:
DB_HOST: mariadb
DB_ROOT_PASSWD: ${MYSQL_ROOT_PASSWORD}
SEAFILE_ADMIN_EMAIL: ${ADMIN_EMAIL}
SEAFILE_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
SEAFILE_SERVER_LETSENCRYPT: "false"
SEAFILE_SERVER_HOSTNAME: ${SERVER_HOSTNAME}
ports:
- "80:80"
- "443:443"
volumes:
- seafile_data:/shared
depends_on:
- mariadb
- memcached
networks:
- seafile-net
restart: unless-stopped
mariadb
mariadb:
image: mariadb:10.11
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes:
- mariadb_data:/var/lib/mysql
networks:
- seafile-net
restart: unless-stopped
memcached
memcached:
image: memcached:alpine
networks:
- seafile-net
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 seafile:5 image: seafileltd/seafile-mc:latest6 environment:7 DB_HOST: mariadb8 DB_ROOT_PASSWD: ${MYSQL_ROOT_PASSWORD}9 SEAFILE_ADMIN_EMAIL: ${ADMIN_EMAIL}10 SEAFILE_ADMIN_PASSWORD: ${ADMIN_PASSWORD}11 SEAFILE_SERVER_LETSENCRYPT: "false"12 SEAFILE_SERVER_HOSTNAME: ${SERVER_HOSTNAME}13 ports:14 - "80:80"15 - "443:443"16 volumes:17 - seafile_data:/shared18 depends_on:19 - mariadb20 - memcached21 networks:22 - seafile-net23 restart: unless-stopped2425 mariadb:26 image: mariadb:10.1127 environment:28 MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}29 volumes:30 - mariadb_data:/var/lib/mysql31 networks:32 - seafile-net33 restart: unless-stopped3435 memcached:36 image: memcached:alpine37 networks:38 - seafile-net39 restart: unless-stopped4041volumes:42 seafile_data:43 mariadb_data:4445networks:46 seafile-net:47 driver: bridge48EOF4950# 2. Create the .env file51cat > .env << 'EOF'52# MariaDB53MYSQL_ROOT_PASSWORD=secure_root_password5455# Seafile Admin56ADMIN_EMAIL=admin@example.com57ADMIN_PASSWORD=secure_admin_password5859# Server60SERVER_HOSTNAME=seafile.example.com61EOF6263# 3. Start the services64docker compose up -d6566# 4. View logs67docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/seafile-cloud-storage/run | bashTroubleshooting
- Seafile service fails to start with database connection error: Verify MYSQL_ROOT_PASSWORD environment variable matches between mariadb and seafile services
- Desktop clients cannot sync with 'SSL certificate verify failed': Ensure SEAFILE_SERVER_HOSTNAME matches your actual domain name and SSL certificate
- File uploads fail with 'Request Entity Too Large': Modify Seafile's seahub_settings.py to increase FILE_UPLOAD_MAX_MEMORY_SIZE beyond default 200MB
- Slow performance during peak usage: Monitor memcached hit rates and increase memcached memory allocation or add additional memcached instances
- Users cannot access shared libraries: Check Seafile database ccnet-db for proper group memberships and sharing permissions in the EmailUser and Group tables
- MariaDB crashes during large file operations: Increase innodb_buffer_pool_size to at least 1GB and set innodb_log_file_size to 256MB for better transaction handling
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
seafilememcachedmariadbnginx
Tags
#seafile#sync#share#enterprise#collaboration
Category
Storage & BackupAd Space
Shortcuts: C CopyF FavoriteD Download