Public | Automated Build

Last pushed: a month ago
Short Description
Deploy the latest ownCloud on Debian 8 with Nginx and PHP-FPM.
Full Description

ownCloud Docker Image

Deploy the latest ownCloud on Debian 8 with Nginx and PHP-FPM.
There is no builtin encryption support. This ownCloud instance is supposed to be served by a HTTP proxy or load balancer, which handles the encryption...


The quickest way to get it up is:

docker run -d -p 80:80 desertbit/owncloud

Then go to http://localhost/ and log in as admin, password: changeme.

Fine tuning

Go to the admin page and set the cron job execution mode to Cron.

You should also set a custom e-mail smtp access point to be able to send e-mails from the ownCloud instance.

Environment variables

  • DB_TYPE: Either sqlite, mysql or pgsql. Default: sqlite
  • DB_HOST: Database host. Default: localhost
  • DB_NAME: Database name. Default: owncloud
  • DB_USER: Database user. Default: owncloud
  • DB_PASS: Database password. Default: owncloud
  • DB_TABLE_PREFIX: Prefix for all database tables. Default: oc_
  • ADMIN_USER: Username of the admin. Default: admin
  • ADMIN_PASS: Password of the admin account. Default: changeme
  • TIMEZONE: Timezone. Default: UTC

Database setup

The image currently supports linking against a MySQL or PostgreSQL container.
This container MUST be named db for this to work.


You have to set the binlog-format option to MIXED. Otherwise the owncloud setup will fail.

Either use the desertbit/mariadb image and set the binlog-format option with an environment variable or set it in the mariadb settings in /etc.


  • /var/www/owncloud/apps: ownCloud's plugin/apps directory
  • /var/www/owncloud/config: ownCloud's config directory
  • /var/www/owncloud/data: ownCloud's data directory
  • /var/log/nginx: Nginx logs

If /var/www/owncloud/apps is mounted as volume, then the apps files have to be copied manually from the ownCloud source.


There is a Turtlefile available to setup and run ownCloud in one shot.
Check the Turtle documentation for more information.

Systemd service

Description=Dockerized ownCloud
After=docker.service docker-owncloud-db.service
Requires=docker.service docker-owncloud-db.service

ExecStartPre=-/usr/bin/docker kill owncloud
ExecStartPre=-/usr/bin/docker rm owncloud
ExecStartPre=/usr/bin/docker pull desertbit/owncloud
ExecStart=/usr/bin/docker run --name=owncloud -h \
  -p 80:80 \
  --link owncloud-db:db \
  -e 'TIMEZONE=Europe/Berlin' \
  -e 'DB_TYPE=mysql' \
  -e 'DB_NAME=owncloud' \
  -e 'DB_USER=owncloud' \
  -e 'DB_PASS=PassWord' \
  -e 'ADMIN_USER=admin' \
  -e 'ADMIN_PASS=admin' \
  -v /srv/docker/owncloud/apps:/var/www/owncloud/apps \
  -v /srv/docker/owncloud/config:/var/www/owncloud/config \
  -v /srv/docker/owncloud/data:/var/www/owncloud/data \
  -v /srv/docker/owncloud/log:/var/log/nginx \


Run occ commands

ownCloud’s occ command (ownCloud console) is ownCloud’s command-line interface. You can perform many common server operations with occ.

Provided owncloud is the name of your container:

docker exec -it owncloud occ help

Use the following command to upgrade an ownCloud instance:

docker exec -it owncloud occ upgrade
Docker Pull Command
Source Repository

Comments (0)