Seafile File Sync and Share
Enterprise file sync with Seafile, office editor, and backup.
Overview
Seafile is an open-source file hosting and synchronization platform that provides enterprise-grade file sharing capabilities similar to Dropbox or Google Drive, but with full control over your data. Originally developed by a team in China and first released in 2012, Seafile has evolved into a robust solution that combines file synchronization, sharing, and collaboration features with strong security and version control capabilities. Unlike simple file storage solutions, Seafile organizes files into libraries (encrypted repositories) and provides features like file locking, detailed audit logs, and client-side encryption.
This stack combines Seafile's core server with MariaDB for robust data persistence, Memcached for high-performance caching, and OnlyOffice Document Server for real-time collaborative editing of office documents. MariaDB serves as the primary database engine storing user accounts, file metadata, and sharing permissions, while Memcached accelerates file operations and reduces database load during high-traffic scenarios. The integration with OnlyOffice enables users to edit Word documents, Excel spreadsheets, and PowerPoint presentations directly within the Seafile web interface without downloading files locally.
This configuration targets organizations seeking a self-hosted alternative to commercial cloud storage services while maintaining professional document editing capabilities. Small to medium businesses, educational institutions, and teams handling sensitive documents will benefit from this setup's combination of data sovereignty, collaborative editing, and enterprise-level file management features. The stack provides both web access and desktop synchronization clients across Windows, macOS, and Linux platforms.
Key Features
- Library-based file organization with client-side encryption for secure data storage
- Real-time collaborative document editing through OnlyOffice integration for Word, Excel, and PowerPoint files
- Desktop synchronization clients for Windows, macOS, and Linux with selective sync capabilities
- File versioning and history tracking with rollback capabilities for accidental changes
- Advanced sharing controls including password protection, expiration dates, and permission levels
- MariaDB backend providing ACID compliance and Galera clustering support for high availability
- Memcached integration for accelerated file metadata queries and improved web interface performance
- Mobile applications for iOS and Android with offline file access and automatic photo backup
Common Use Cases
- 1Small business teams requiring secure file sharing with collaborative document editing capabilities
- 2Educational institutions managing student projects and faculty documents with version control
- 3Remote development teams synchronizing code documentation and project files across multiple locations
- 4Healthcare organizations storing patient documents with audit trails and access controls
- 5Legal firms managing case files with granular sharing permissions and document versioning
- 6Creative agencies collaborating on marketing materials and client presentations in real-time
- 7Non-profit organizations maintaining donor records and grant documents with secure sharing
Prerequisites
- Minimum 2GB RAM recommended (1GB+ for MariaDB, 512MB for Seafile, additional overhead for OnlyOffice)
- Available ports 80 and 8080 for web interfaces, with port 80 accessible from client networks
- Valid email server configuration for user registration and notification features
- SSL certificate for production deployment to enable desktop client synchronization
- Basic understanding of database management for MariaDB maintenance and backup procedures
- Domain name or static IP address for consistent client access and OnlyOffice integration
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 mariadb: 3 image: mariadb:10.114 environment: 5 - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}6 - MYSQL_LOG_CONSOLE=true7 volumes: 8 - mariadb_data:/var/lib/mysql9 networks: 10 - seafile_net1112 memcached: 13 image: memcached:alpine14 networks: 15 - seafile_net1617 seafile: 18 image: seafileltd/seafile-mc:latest19 ports: 20 - "80:80"21 environment: 22 - DB_HOST=mariadb23 - DB_ROOT_PASSWD=${MYSQL_ROOT_PASSWORD}24 - SEAFILE_ADMIN_EMAIL=${ADMIN_EMAIL}25 - SEAFILE_ADMIN_PASSWORD=${ADMIN_PASSWORD}26 - SEAFILE_SERVER_HOSTNAME=localhost27 volumes: 28 - seafile_data:/shared29 depends_on: 30 - mariadb31 - memcached32 networks: 33 - seafile_net3435 onlyoffice: 36 image: onlyoffice/documentserver:latest37 ports: 38 - "8080:80"39 environment: 40 - JWT_SECRET=${ONLYOFFICE_SECRET}41 volumes: 42 - onlyoffice_data:/var/www/onlyoffice/Data43 networks: 44 - seafile_net4546volumes: 47 mariadb_data: 48 seafile_data: 49 onlyoffice_data: 5051networks: 52 seafile_net: .env Template
.env
1# Seafile2MYSQL_ROOT_PASSWORD=secure_mysql_root_password3ADMIN_EMAIL=admin@example.com4ADMIN_PASSWORD=secure_admin_password5ONLYOFFICE_SECRET=secure_jwt_secret67# Seafile at http://localhost8# OnlyOffice at http://localhost:8080Usage Notes
- 1Seafile at http://localhost
- 2OnlyOffice at http://localhost:8080
- 3Desktop sync clients available
- 4Library-based organization
- 5Configure OnlyOffice in admin panel
Individual Services(4 services)
Copy individual services to mix and match with your existing compose files.
mariadb
mariadb:
image: mariadb:10.11
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_LOG_CONSOLE=true
volumes:
- mariadb_data:/var/lib/mysql
networks:
- seafile_net
memcached
memcached:
image: memcached:alpine
networks:
- seafile_net
seafile
seafile:
image: seafileltd/seafile-mc:latest
ports:
- "80:80"
environment:
- DB_HOST=mariadb
- DB_ROOT_PASSWD=${MYSQL_ROOT_PASSWORD}
- SEAFILE_ADMIN_EMAIL=${ADMIN_EMAIL}
- SEAFILE_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- SEAFILE_SERVER_HOSTNAME=localhost
volumes:
- seafile_data:/shared
depends_on:
- mariadb
- memcached
networks:
- seafile_net
onlyoffice
onlyoffice:
image: onlyoffice/documentserver:latest
ports:
- "8080:80"
environment:
- JWT_SECRET=${ONLYOFFICE_SECRET}
volumes:
- onlyoffice_data:/var/www/onlyoffice/Data
networks:
- seafile_net
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 mariadb:5 image: mariadb:10.116 environment:7 - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}8 - MYSQL_LOG_CONSOLE=true9 volumes:10 - mariadb_data:/var/lib/mysql11 networks:12 - seafile_net1314 memcached:15 image: memcached:alpine16 networks:17 - seafile_net1819 seafile:20 image: seafileltd/seafile-mc:latest21 ports:22 - "80:80"23 environment:24 - DB_HOST=mariadb25 - DB_ROOT_PASSWD=${MYSQL_ROOT_PASSWORD}26 - SEAFILE_ADMIN_EMAIL=${ADMIN_EMAIL}27 - SEAFILE_ADMIN_PASSWORD=${ADMIN_PASSWORD}28 - SEAFILE_SERVER_HOSTNAME=localhost29 volumes:30 - seafile_data:/shared31 depends_on:32 - mariadb33 - memcached34 networks:35 - seafile_net3637 onlyoffice:38 image: onlyoffice/documentserver:latest39 ports:40 - "8080:80"41 environment:42 - JWT_SECRET=${ONLYOFFICE_SECRET}43 volumes:44 - onlyoffice_data:/var/www/onlyoffice/Data45 networks:46 - seafile_net4748volumes:49 mariadb_data:50 seafile_data:51 onlyoffice_data:5253networks:54 seafile_net:55EOF5657# 2. Create the .env file58cat > .env << 'EOF'59# Seafile60MYSQL_ROOT_PASSWORD=secure_mysql_root_password61ADMIN_EMAIL=admin@example.com62ADMIN_PASSWORD=secure_admin_password63ONLYOFFICE_SECRET=secure_jwt_secret6465# Seafile at http://localhost66# OnlyOffice at http://localhost:808067EOF6869# 3. Start the services70docker compose up -d7172# 4. View logs73docker 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-complete/run | bashTroubleshooting
- OnlyOffice documents fail to open: Verify JWT_SECRET environment variable matches between Seafile admin settings and OnlyOffice container configuration
- Desktop clients cannot connect: Ensure SEAFILE_SERVER_HOSTNAME matches the actual domain/IP used by clients and SSL is properly configured for production
- Database connection errors on startup: Check that MariaDB container is fully initialized before Seafile attempts connection, increase depends_on wait time if necessary
- Slow file uploads or timeouts: Increase Memcached memory allocation and verify MariaDB has sufficient RAM allocated for file metadata operations
- User registration emails not sent: Configure SMTP settings in Seafile admin panel and verify firewall allows outbound email traffic
- OnlyOffice collaborative editing not working: Ensure both Seafile and OnlyOffice containers can communicate over the seafile_net network and JWT secrets match
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
seafilemariadbmemcachedonlyoffice
Tags
#seafile#sync#cloud#files#enterprise
Category
Productivity & CollaborationAd Space
Shortcuts: C CopyF FavoriteD Download