ownCloud is a convenient platform for organizing personal cloud storage. Installation via Docker allows you to quickly deploy the system without complicated configuration of the server environment. In this article, we'll look at how to launch ownCloud in a container.
What will be needed?
- Linux server (Ubuntu, CentOS, RedOS, etc.)
- Installed Docker and Docker Compose
- SSH access with sudo or root rights
Step 1. Install Docker and Docker Compose
If Docker is not installed yet:
Ubuntu / Debian
sudo apt update
sudo apt install -y docker.io docker-compose

CentOS / RedOS
sudo yum install -y docker
sudo systemctl enable --now docker
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Check that everything is working.:
docker --version
docker-compose --version
Step 2. Creating a Docker Compose file
Creating a working folder:
mkdir -p ~/owncloud-docker
cd ~/owncloud-docker
Creating a docker-compose file.yml:
version: '3.1'
services:
owncloud:
image: owncloud/server:latest
container_name: owncloud
restart: always
ports:
- 8080:8080
environment:
- OWNCLOUD_DOMAIN=your-data
- OWNCLOUD_TRUSTED_DOMAINS=your-data
- OWNCLOUD_ADMIN_USERNAME=admin
- OWNCLOUD_ADMIN_PASSWORD=admin
- OWNCLOUD_DB_TYPE=mysql
- OWNCLOUD_DB_NAME=owncloud
- OWNCLOUD_DB_USERNAME=owncloud
- OWNCLOUD_DB_PASSWORD=secret
- OWNCLOUD_DB_HOST=db
depends_on:
- db
volumes:
- owncloud_files:/mnt/data
db:
image: mariadb:10.5
container_name: owncloud-db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=owncloud
- MYSQL_USER=owncloud
- MYSQL_PASSWORD=secret
volumes:
- db_data:/var/lib/mysql
volumes:
owncloud_files:
db_data:
Please note that in order for the service to be accessible via an IP address, you must specify your ip a. And make an OWNCLOUD_TRUSTED_DOMAINS entry, in order to change it, you need to delete the storage and restart the container.
Step 3. Launching ownCloud
Launching containers:
docker-compose up -d

Checking the status:
docker ps
Step 4. Access to ownCloud
Open it in the browser:
http://ip_server:8080

Log in to the panel using login: admin and password: admin
Step 5. Safety recommendations
- Configure proxying via Nginx and HTTPS (for example, via Let's Encrypt)
- Change the default passwords
- Configure Docker volume backups (owncloud_files, db_data)
Installing ownCloud via Docker is a fast and flexible way to run cloud storage without unnecessary configuration. You get all the features of ownCloud with the ability to scale and easily upgrade.