Deploying an ownCloud App
Introduction
ownCloud is an open-source file sync and share platform. This guide shows how to containerize ownCloud with a Dockerfile, connect it to MySQL, persist files and configs, and deploy it to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- MySQL database (managed or deployed separately).
- Klutch.sh project ready in klutch.sh/app.
Project structure
.└── DockerfileSample Dockerfile
FROM owncloud/server:latest
# Default ownCloud portENV HTTP_PORT=8080EXPOSE 8080Required environment variables
OWNCLOUD_DOMAIN– e.g.,example-app.klutch.shOWNCLOUD_DB_TYPE=mysqlOWNCLOUD_DB_NAMEOWNCLOUD_DB_USERNAMEOWNCLOUD_DB_PASSWORDOWNCLOUD_DB_HOST– MySQL host and portOWNCLOUD_ADMIN_USERNAMEOWNCLOUD_ADMIN_PASSWORDHTTP_PORT=8080
Optional environment variables
OWNCLOUD_REDIS_ENABLED=false(set true and configure if using Redis)OWNCLOUD_TRUSTED_DOMAINS=example-app.klutch.shOWNCLOUD_LOGLEVEL=2
Persistence
ownCloud requires durable storage:
- Mount path:
/mnt/data - Size: based on expected user files, logs, and app data
Networking
- Protocol: HTTP
- Internal port:
8080 - Users reach
https://example-app.klutch.shwhile Klutch.sh routes to port8080inside the container.
Health check (recommended)
curl -I http://localhost:8080Deployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
8080. - Add environment variables for the MySQL connection, admin credentials, domain, and any optional settings. Mark secrets as sensitive.
- Attach a persistent volume at
/mnt/datasized for your users’ files. - Deploy. After the app starts, complete the web installer and log in with your admin account.
Verification
-
UI: open
https://example-app.klutch.shand confirm the ownCloud login screen loads. -
Quick check:
Terminal window curl -I https://example-app.klutch.sh
Next steps
- Configure HTTPS at the edge and set trusted domains.
- Enable Redis for caching if desired.
- Schedule backups for MySQL and the
/mnt/datavolume.