ownCloud
File sync and share platform for enterprise.
Overview
ownCloud is an open-source file synchronization and sharing platform that enables organizations to maintain complete control over their data while providing Dropbox-like functionality. Originally founded in 2010 as a response to growing privacy concerns with cloud storage providers, ownCloud allows enterprises to host their own private cloud storage infrastructure, ensuring data sovereignty and compliance with strict regulatory requirements. The platform supports file versioning, collaborative editing, and extensive third-party integrations while maintaining enterprise-grade security features. This Docker stack combines ownCloud with MariaDB as the primary database backend and Redis for high-performance caching and session management. MariaDB provides robust data storage with its enhanced MySQL-compatible engine, offering better performance and additional features like the Aria storage engine for improved crash recovery. Redis accelerates the ownCloud experience by caching frequently accessed data, managing user sessions, and enabling real-time features through its sub-millisecond response times. This combination is ideal for organizations seeking a self-hosted alternative to commercial cloud storage solutions, particularly those in regulated industries like healthcare, finance, or government sectors where data locality and privacy are paramount. The stack scales effectively from small team deployments to enterprise installations supporting thousands of users, making it valuable for companies transitioning away from external cloud providers or establishing hybrid cloud strategies.
Key Features
- File versioning and conflict resolution with automatic backup retention policies
- External storage integration supporting FTP, SMB/CIFS, SharePoint, and object storage backends
- MariaDB Aria storage engine providing crash-safe tables with better recovery capabilities
- Redis-powered session clustering enabling horizontal scaling across multiple ownCloud instances
- Built-in antivirus scanning integration with ClamAV for uploaded file security
- LDAP and Active Directory authentication with group-based access controls
- WebDAV protocol support for native desktop integration and third-party client compatibility
- Federated sharing capabilities allowing secure file sharing between different ownCloud instances
Common Use Cases
- 1Healthcare organizations needing HIPAA-compliant file storage with audit trails
- 2Financial institutions requiring SOX compliance for document management and retention
- 3Educational institutions providing secure file sharing for students and faculty
- 4Government agencies maintaining data sovereignty while enabling remote collaboration
- 5Law firms managing confidential client documents with granular access permissions
- 6Manufacturing companies sharing CAD files and technical documentation across global teams
- 7Small businesses replacing expensive enterprise storage solutions with self-hosted alternatives
Prerequisites
- Minimum 2GB RAM (4GB+ recommended for production with multiple concurrent users)
- Port 8080 available for web interface access
- Basic understanding of file permission management and user access controls
- SSL certificate and reverse proxy knowledge for production HTTPS deployment
- Backup strategy planning for both database and file storage volumes
- Network configuration knowledge for trusted domains and client synchronization
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 owncloud: 3 image: owncloud/server:latest4 container_name: owncloud5 restart: unless-stopped6 environment: 7 OWNCLOUD_DOMAIN: localhost:80808 OWNCLOUD_TRUSTED_DOMAINS: localhost9 OWNCLOUD_DB_TYPE: mysql10 OWNCLOUD_DB_NAME: owncloud11 OWNCLOUD_DB_USERNAME: owncloud12 OWNCLOUD_DB_PASSWORD: ${DB_PASSWORD}13 OWNCLOUD_DB_HOST: mariadb14 OWNCLOUD_ADMIN_USERNAME: ${ADMIN_USER}15 OWNCLOUD_ADMIN_PASSWORD: ${ADMIN_PASSWORD}16 OWNCLOUD_REDIS_ENABLED: true17 OWNCLOUD_REDIS_HOST: redis18 volumes: 19 - owncloud_data:/mnt/data20 ports: 21 - "8080:8080"22 depends_on: 23 - mariadb24 - redis25 networks: 26 - owncloud2728 mariadb: 29 image: mariadb:10.1130 container_name: owncloud-mariadb31 restart: unless-stopped32 environment: 33 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}34 MARIADB_DATABASE: owncloud35 MARIADB_USER: owncloud36 MARIADB_PASSWORD: ${DB_PASSWORD}37 volumes: 38 - mariadb_data:/var/lib/mysql39 networks: 40 - owncloud4142 redis: 43 image: redis:alpine44 container_name: owncloud-redis45 restart: unless-stopped46 networks: 47 - owncloud4849volumes: 50 owncloud_data: 51 mariadb_data: 5253networks: 54 owncloud: 55 driver: bridge.env Template
.env
1DB_ROOT_PASSWORD=rootpassword2DB_PASSWORD=owncloud3ADMIN_USER=admin4ADMIN_PASSWORD=changemeUsage Notes
- 1Docs: https://doc.owncloud.com/
- 2Access at http://localhost:8080 - login with ADMIN_USER/PASSWORD
- 3Desktop sync clients: https://owncloud.com/desktop-app/
- 4Mobile apps for iOS and Android
- 5OWNCLOUD_TRUSTED_DOMAINS: add your domain for production
- 6Enterprise features: audit logs, workflows, Collabora integration
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
owncloud
owncloud:
image: owncloud/server:latest
container_name: owncloud
restart: unless-stopped
environment:
OWNCLOUD_DOMAIN: localhost:8080
OWNCLOUD_TRUSTED_DOMAINS: localhost
OWNCLOUD_DB_TYPE: mysql
OWNCLOUD_DB_NAME: owncloud
OWNCLOUD_DB_USERNAME: owncloud
OWNCLOUD_DB_PASSWORD: ${DB_PASSWORD}
OWNCLOUD_DB_HOST: mariadb
OWNCLOUD_ADMIN_USERNAME: ${ADMIN_USER}
OWNCLOUD_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
OWNCLOUD_REDIS_ENABLED: true
OWNCLOUD_REDIS_HOST: redis
volumes:
- owncloud_data:/mnt/data
ports:
- "8080:8080"
depends_on:
- mariadb
- redis
networks:
- owncloud
mariadb
mariadb:
image: mariadb:10.11
container_name: owncloud-mariadb
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MARIADB_DATABASE: owncloud
MARIADB_USER: owncloud
MARIADB_PASSWORD: ${DB_PASSWORD}
volumes:
- mariadb_data:/var/lib/mysql
networks:
- owncloud
redis
redis:
image: redis:alpine
container_name: owncloud-redis
restart: unless-stopped
networks:
- owncloud
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 owncloud:5 image: owncloud/server:latest6 container_name: owncloud7 restart: unless-stopped8 environment:9 OWNCLOUD_DOMAIN: localhost:808010 OWNCLOUD_TRUSTED_DOMAINS: localhost11 OWNCLOUD_DB_TYPE: mysql12 OWNCLOUD_DB_NAME: owncloud13 OWNCLOUD_DB_USERNAME: owncloud14 OWNCLOUD_DB_PASSWORD: ${DB_PASSWORD}15 OWNCLOUD_DB_HOST: mariadb16 OWNCLOUD_ADMIN_USERNAME: ${ADMIN_USER}17 OWNCLOUD_ADMIN_PASSWORD: ${ADMIN_PASSWORD}18 OWNCLOUD_REDIS_ENABLED: true19 OWNCLOUD_REDIS_HOST: redis20 volumes:21 - owncloud_data:/mnt/data22 ports:23 - "8080:8080"24 depends_on:25 - mariadb26 - redis27 networks:28 - owncloud2930 mariadb:31 image: mariadb:10.1132 container_name: owncloud-mariadb33 restart: unless-stopped34 environment:35 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}36 MARIADB_DATABASE: owncloud37 MARIADB_USER: owncloud38 MARIADB_PASSWORD: ${DB_PASSWORD}39 volumes:40 - mariadb_data:/var/lib/mysql41 networks:42 - owncloud4344 redis:45 image: redis:alpine46 container_name: owncloud-redis47 restart: unless-stopped48 networks:49 - owncloud5051volumes:52 owncloud_data:53 mariadb_data:5455networks:56 owncloud:57 driver: bridge58EOF5960# 2. Create the .env file61cat > .env << 'EOF'62DB_ROOT_PASSWORD=rootpassword63DB_PASSWORD=owncloud64ADMIN_USER=admin65ADMIN_PASSWORD=changeme66EOF6768# 3. Start the services69docker compose up -d7071# 4. View logs72docker 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/owncloud/run | bashTroubleshooting
- Database connection failed: Verify MariaDB container is running and DB_PASSWORD matches between services
- Trusted domain error: Add your server's domain/IP to OWNCLOUD_TRUSTED_DOMAINS environment variable
- File upload fails on large files: Increase PHP memory limit and upload size in ownCloud configuration
- Desktop client sync issues: Check firewall settings and ensure WebDAV ports are accessible
- Redis connection timeout: Verify Redis container health and network connectivity between services
- Permission denied on file operations: Check owncloud_data volume permissions and container user mapping
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
Ad Space
Shortcuts: C CopyF FavoriteD Download