• Pricing
DashboardContact Sales
  • Blogs
  • Discover
  • Docs
  • Community
  • AgentBeta
⌘K

Over 80,000,000 Cloud Servers Launched

Over 80,000,000 Cloud Servers Launched

Cloud ComputeCloud GPUBare MetalFile SystemObject StorageBlock StorageManaged DatabasesCDNServerlessKubernetesContainer RegistryDirect ConnectLoad Balancers
RegionsAdvanced NetworkControl PanelOperating SystemsUpload ISO
Industry CloudOne-Click DeploymentUse Cases
Browse AppsBecome a Vendor
FAQDevelopers / APIsVultr DocsServer StatusBug BountyPromotionsSolution PartnersStart-Up Programs
Our TeamNewsBrand AssetsReferral ProgramCreator ProgramCareersSLALegalVultr Trust CenterContactYour Privacy ChoicesSubprocessorsAccessibility
Contact SalesSign Up

© Vultr 2026 | VULTR is a registered trademark of The Constant Company, LLC.

Terms of ServiceAUPDMCAPrivacy PolicyCookie Policy

In this Article

PrerequisitesInstall ownCloud Using Docker ComposeConfigure ownCloudAccess and Set Up ownCloudManage and Share Files with ownCloudInstall and Manage Apps in ownCloudBackup and Restore ownCloud DataConclusion
  1. Docs
  2. Articles & Guides
  3. Cloud Native

How to Deploy ownCloud - An Opensource File-sharing Application and Alternative to Google Drive

6 min readUpdated 11 September 2026
0 comments
How to Deploy ownCloud - An Opensource File-sharing Application and Alternative to Google Drive header image

ownCloud is an open-source file-sharing platform that enables you to store, sync, and manage files from a self-hosted server. It offers a privacy-focused alternative to cloud services like Google Drive and Dropbox by giving you full control over your data and infrastructure.

In this article, you will deploy ownCloud on an Ubuntu 24.04 server using Docker. You’ll set up a MariaDB database container, secure your environment, access the ownCloud web interface, and explore features such as file sharing, user management, and app integration.

Prerequisites

Before you begin:

  • Have access to an Ubuntu 24.04 instance as a non-root sudo user.
  • Create a domain A record that points to your server’s IP address. For example, cloud.example.com.

Install ownCloud Using Docker Compose

Docker Compose provides a structured way to manage multi-container applications like ownCloud. This method allows you to define services, networks, and volumes in a single file and manage them together with simple commands.

Install Docker Compose

  1. Update your APT package index.

    CONSOLE
    $ sudo apt update
    Powered by Vultr AgentBeta
  2. Install Docker.

    CONSOLE
    $ sudo apt install docker.io -y
    Powered by Vultr AgentBeta
  3. Enable and start Docker.

    CONSOLE
    $ sudo systemctl enable docker
    Powered by Vultr AgentBeta
    CONSOLE
    $ sudo systemctl start docker
    Powered by Vultr AgentBeta
  4. Add your user to the docker group to avoid using sudo with every command.

    CONSOLE
    $ sudo usermod -aG docker $USER
    Powered by Vultr AgentBeta

    Log out and log back in to apply the change.

  5. Install the new Docker Compose plugin.

    CONSOLE
    $ mkdir -p ~/.docker/cli-plugins
    Powered by Vultr AgentBeta
    CONSOLE
    $ curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
    Powered by Vultr AgentBeta
    CONSOLE
    $ chmod +x ~/.docker/cli-plugins/docker-compose
    Powered by Vultr AgentBeta
  6. Verify the installation.

    CONSOLE
    $ docker compose version
    Powered by Vultr AgentBeta

    Output should be similar to:

    Docker Compose version v2.X.X

Deploy ownCloud with Docker Compose

  1. Create a project directory and switch into it.

    CONSOLE
    $ mkdir ~/owncloud
    Powered by Vultr AgentBeta
    CONSOLE
    $ cd ~/owncloud
    Powered by Vultr AgentBeta
  2. Create a docker-compose.yml file.

    CONSOLE
    $ nano docker-compose.yml
    Powered by Vultr AgentBeta
  3. Add the following configuration to define the ownCloud and MariaDB services:

    YAML
    version: "3"
    
    volumes:
      files:
        driver: local
      mysql:
        driver: local
      redis:
        driver: local
    
    services:
      owncloud:
        image: owncloud/server:${OWNCLOUD_VERSION}
        container_name: owncloud_server
        restart: always
        ports:
          - ${HTTP_PORT}:8080
        depends_on:
          - mariadb
          - redis
        environment:
          - OWNCLOUD_DOMAIN=${OWNCLOUD_DOMAIN}
          - OWNCLOUD_TRUSTED_DOMAINS=${OWNCLOUD_TRUSTED_DOMAINS}
          - OWNCLOUD_DB_TYPE=mysql
          - OWNCLOUD_DB_NAME=owncloud
          - OWNCLOUD_DB_USERNAME=owncloud
          - OWNCLOUD_DB_PASSWORD=owncloud
          - OWNCLOUD_DB_HOST=mariadb
          - OWNCLOUD_ADMIN_USERNAME=${ADMIN_USERNAME}
          - OWNCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD}
          - OWNCLOUD_MYSQL_UTF8MB4=true
          - OWNCLOUD_REDIS_ENABLED=true
          - OWNCLOUD_REDIS_HOST=redis
        healthcheck:
          test: ["CMD", "/usr/bin/healthcheck"]
          interval: 30s
          timeout: 10s
          retries: 5
        volumes:
          - files:/mnt/data
    
      mariadb:
        image: mariadb:10.11 # minimum required ownCloud version is 10.9
        container_name: owncloud_mariadb
        restart: always
        environment:
          - MYSQL_ROOT_PASSWORD=owncloud
          - MYSQL_USER=owncloud
          - MYSQL_PASSWORD=owncloud
          - MYSQL_DATABASE=owncloud
          - MARIADB_AUTO_UPGRADE=1
        command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"]
        healthcheck:
          test: ["CMD", "mysqladmin", "ping", "-u", "root", "--password=owncloud"]
          interval: 10s
          timeout: 5s
          retries: 5
        volumes:
          - mysql:/var/lib/mysql
    
      redis:
        image: redis:6
        container_name: owncloud_redis
        restart: always
        command: ["--databases", "1"]
        healthcheck:
          test: ["CMD", "redis-cli", "ping"]
          interval: 10s
          timeout: 5s
          retries: 5
        volumes:
          - redis:/data
    Powered by Vultr AgentBeta

    Replace environment values like securepassword with secure production credentials.

  4. Start the containers using Docker Compose.

    CONSOLE
    $ docker compose up -d
    Powered by Vultr AgentBeta
  5. Check that both services are running.

    CONSOLE
    $ docker compose ps
    Powered by Vultr AgentBeta

    Output should show both the owncloud and db containers as Up.

Configure ownCloud

After deploying ownCloud with Docker Compose, secure and optimize it for production use with HTTPS, a reverse proxy using Nginx, and proper firewall configuration.

Configure Nginx as a Reverse Proxy

  1. Install Nginx if it’s not already installed.

    CONSOLE
    $ sudo apt update
    Powered by Vultr AgentBeta
    CONSOLE
    $ sudo apt install nginx -y
    Powered by Vultr AgentBeta
  2. Create a configuration file for ownCloud.

    CONSOLE
    $ sudo nano /etc/nginx/sites-available/owncloud
    Powered by Vultr AgentBeta
  3. Paste the following, replacing cloud.example.com with your domain:

    INI
    server {
       listen 80;
       server_name cloud.example.com;
    
       location / {
           proxy_pass http://localhost:8080/;
           proxy_set_header Host $host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-Forwarded-Proto $scheme;
       }
    }
    Powered by Vultr AgentBeta
  4. Enable the configuration.

    CONSOLE
    $ sudo ln -s /etc/nginx/sites-available/owncloud /etc/nginx/sites-enabled/
    Powered by Vultr AgentBeta
    CONSOLE
    $ sudo nginx -t
    Powered by Vultr AgentBeta
    CONSOLE
    $ sudo systemctl reload nginx
    Powered by Vultr AgentBeta

Allow Nginx Through the Firewall

  1. Open HTTP and HTTPS ports.

    CONSOLE
    $ sudo ufw allow 'Nginx Full'
    Powered by Vultr AgentBeta
    CONSOLE
    $ sudo ufw reload
    Powered by Vultr AgentBeta

Secure ownCloud with HTTPS

  1. Install Certbot and the Nginx plugin.

    CONSOLE
    $ sudo apt install certbot python3-certbot-nginx -y
    Powered by Vultr AgentBeta
  2. Generate and apply a TLS certificate.

    CONSOLE
    $ sudo certbot --nginx -d cloud.example.com
    Powered by Vultr AgentBeta

    Certbot will automatically edit your Nginx config to enable HTTPS.

Enable Automatic Renewal

  1. Ensure Certbot renewal is scheduled.

    CONSOLE
    $ sudo systemctl enable certbot.timer
    Powered by Vultr AgentBeta
  2. Test the renewal process.

    CONSOLE
    $ sudo certbot renew --dry-run
    Powered by Vultr AgentBeta

Verify Setup

Open your browser and navigate to:

https://cloud.example.com

You should see the ownCloud setup wizard served securely over HTTPS.

Access and Set Up ownCloud

Complete the final setup through the ownCloud web interface:

  1. Open your browser and visit your domain over HTTPS.

    https://cloud.example.com
  2. The ownCloud setup wizard will appear.

  3. Create an admin account by choosing a secure username and password.

  4. Under Database Configuration, enter the following:

    • Database user: ownclouduser
    • Database password: the password you used when starting the MariaDB container
    • Database name: owncloud
    • Database host: owncloud-db
  5. Click Finish Setup.

After setup completes, you'll be redirected to the login page. Use your admin credentials to sign in and access the ownCloud dashboard.

Manage and Share Files with ownCloud

After logging into the ownCloud dashboard, you can begin managing your files:

  1. Upload and organize files using the web interface. Drag-and-drop support is available.

  2. Create folders and move files to structure your storage.

  3. Share files or folders via public or private links. You can:

    • Set expiration dates
    • Require passwords
    • Enable or disable editing
  4. Create user groups and set granular permissions for collaboration.

  5. Sync files across devices by installing the ownCloud desktop or mobile clients. These apps automatically synchronize your data between the server and your devices.

ownCloud also supports WebDAV, making it compatible with third-party tools and OS-native file managers.

Install and Manage Apps in ownCloud

Backup and Restore ownCloud Data

To ensure data durability and prevent accidental loss, regularly back up your ownCloud installation. This includes both user files and database content.

If you deployed ownCloud using Docker, your data is typically stored in a named volume like owncloud_files.

  1. Export the ownCloud data volume to a tarball.

    CONSOLE
    $ docker run --rm \
     -v files:/volume \
     -v $(pwd):/backup \
     alpine \
     tar -czf /backup/owncloud_files_backup.tar.gz -C /volume .
    Powered by Vultr AgentBeta

    This command saves a .tar.gz backup of the ownCloud volume to the current directory on your host.

  2. Backup the MariaDB data directory (optional but recommended). If using a MariaDB container, you can similarly back up its volume.

    CONSOLE
    $ docker run --rm \
     -v mysql:/volume \
     -v $(pwd):/backup \
     alpine \
     tar -czf /backup/mariadb_backup.tar.gz -C /volume .
    Powered by Vultr AgentBeta

Backup Best Practices

  • Perform regular backups (daily or weekly) using a scheduled cron job.
  • Store backups off-server (e.g., to S3, rsync to remote machine).
  • Use snapshot-based backups if deploying with cloud storage.

For production deployments, also consider backing up your docker-compose.yml and .env files if using Docker Compose.

Conclusion

In this article, you deployed ownCloud on an Ubuntu 24.04 server using Docker. You configured a secure MariaDB backend, set up reverse proxy and firewall rules, optionally enabled SSL with Let's Encrypt, and accessed the ownCloud dashboard via the browser. You also explored optional configurations like background cron jobs, app installation, and backup strategies.

With ownCloud, you gain full control over your file storage and collaboration environment, making it a powerful alternative to third-party platforms like Google Drive and Dropbox.

To explore advanced features or troubleshoot issues, refer to the official documentation:

  • ownCloud Docs
  • Docker Docs
  • MariaDB Docs
Tags:Open SourceownCloudFile storageData & Storage

Tech Talk: Running a Self-Improving AI Agent with Hermes on Vultr

Have a suggestion or found an issue with this article?

About the Author

KA

Kunwar Abhay Singh

View Profile
View Profile

More to Explore

Show More
tech-talk-thumbnail

Tech Talk: Running a Self-Improving AI Agent with Hermes on Vultr

tech-talk-thumbnail

Tech Talk: Implementing Fine-Grained Access Control with Vultr IAM

tech-talk-thumbnail

Tech Talk: Getting Started with Vultr IAM

tech-talk-thumbnail

Tech Talk: Simplifying Zero-Trust Networking with NetBird on Vultr Marketplace

Show More

0 Comments

Start the conversation

Be the first to comment and share your perspective with the community.