
ownCloud is an open-source file-sharing platform that allows you to securely store, share, and access your files from anywhere. It serves as a private alternative to services like Dropbox or Google Drive, providing you with full control over your data.
This article demonstrates how to deploy ownCloud on Ubuntu 24.04 using Docker Compose.
Before you begin:
owncloud.example.com, pointing to your server’s public IP address.ownCloud requires persistent storage for user files and the database, as well as configuration for the domain and administrative credentials. This section prepares the necessary directory structure and sets the required environment variables.
Create the project folders.
files - Stores the actual user data and uploaded files.mysql - Persistent storage for the MariaDB database.redis - Data persistence for Redis cache.letsencrypt - Stores Traefik ACME certificates.Navigate to the root ownCloud directory.
Create an .env file to store your configuration.
Add the following values:
Replace the placeholders with your own values:
owncloud.example.com – Your actual domain name.STRONG_ADMIN_PASSWORD – The password you will use to log in to the web interface.STRONG_DB_PASSWORD – Secure password for the ownCloud database user.admin@example.com – Your email for SSL certificate notifications.Save and close the file.
This section deploys the full ownCloud stack behind Traefik. The configuration includes services for the application, database, and cache.
Add your user account to the docker user group.
Apply the new group membership.
Create the Docker Compose manifest file.
Add the following contents:
Save and close the file.
This Docker Compose file deploys ownCloud behind Traefik, uses MariaDB for storage and Redis for caching. Each service has a specific purpose:
owncloud service
owncloud/server image.mariadb service for database storage and redis for caching session data and managing file locks../files directory (mounted to /mnt/data).mariadb service
owncloud database and user credentials defined in your .env file../mysql directory.redis service
./redis directory.traefik service
${OWNCLOUD_DOMAIN}.Start all services in detached mode.
Check the container status.
For more information on managing a Docker Compose stack, see the How To Use Docker Compose article.
Open your web browser and visit your domain https://owncloud.example.com.
The login screen appears. Enter the ADMIN_USERNAME and ADMIN_PASSWORD you configured in your .env file.
Upon successful login, the ownCloud dashboard loads. You can now begin uploading files, creating users, and installing apps from the marketplace.
By following this article, you successfully deployed ownCloud on Ubuntu 24.04 using Docker Compose. Your file-sharing platform is now accessible over HTTPS and ready for use. For more information, refer to the ownCloud Documentation.
0 Comments
Be the first to comment and share your perspective with the community.