How to install Nextcloud on an OVHcloud VPS with Docker

Knowledge Base

How to install Nextcloud on an OVHcloud VPS with Docker


Icons/System/eye-open Created with Sketch. 6 Views 04.02.2026 Virtual Private Servers

Objective

This guide explains how to install Nextcloud, a personal cloud solution (files, photos, contacts, calendar), on an OVHcloud VPS.

It is intended for beginner users who want a simple installation, without a reverse-proxy.

At the end of this guide, you will have:

  • A working Nextcloud on your VPS
  • Access via a web browser
  • A MariaDB database suitable for real use

Requirements

  • An OVHcloud VPS offer under Ubuntu 22.04 LTS (or equivalent)
  • Access via SSH to your VPS
  • A domain name (optional but recommended)

Instructions

Table of contents:

Step 1: Connecting to the VPS

Connect to your VPS via SSH with the user provided by OVHcloud (e.g. ubuntu).

ssh ubuntu@IPv4_OF_YOUR_VPS

Step 2: Preparing the system

Update the system:

sudo apt update && sudo apt upgrade -y

Install the required dependencies:

sudo apt install -y ca-certificates curl gnupg

Step 3: Installing Docker and Docker Compose

Install Docker:

curl -fsSL https://get.docker.com | sudo sh

Add your user to the Docker group:

sudo usermod -aG docker $USER
newgrp docker

Check the installation:

docker --version
docker compose version

Step 4: Deploying Nextcloud

Create a working directory:

mkdir ~/nextcloud && cd ~/nextcloud

Create the docker-compose.yml file:

services:
  db:
    image: mariadb:10.6
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    environment:
      MYSQL_ROOT_PASSWORD: change-root-password
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: change-user-password
    volumes:
      - db:/var/lib/MySQL

  app:
    image: nextcloud
    restart: always
    ports:
      - 8080:80
    depends_on:
      - db
    volumes:
      - nextcloud:/var/www/html

volumes:
  db:
  nextcloud:

Launch Nextcloud:

docker compose up -d

Step 5: Accessing Nextcloud

In your browser, open http://IPv4_DE_VOTRE_VPS:8080.

On first access:

  • Create an administrator account
  • Let Nextcloud automatically detect the database

Step 6: Best practices after installation

For long-term use, we recommend:

  • Configuring a domain name
  • Setting up HTTPS access (Nginx Proxy Manager or Traefik)
  • Enabling background tasks in Cron mode
  • Installing the Nextcloud PC and mobile clients for automatic synchronization
  • Setting up regular backups

Go further

This guide allowed you to quickly deploy Nextcloud on a VPS using Docker, without complex configuration.

If you want to go further - notably by adding automatic HTTPS, a reverse-proxy, or hosting multiple services on the same VPS - we recommend you consult the guide for advanced users, which presents a more robust architecture based on Docker and a modern reverse-proxy.

To deepen certain aspects or strengthen the security and reliability of your installation, you can also consult the following resources:

Secure an OVHcloud VPS

Official Nextcloud documentation

Join our community of users.


  1. Secure Shell (SSH) : un protocole de réseau sécurisé utilisé pour établir des connexions entre un client et un serveur. Il permet d'exécuter des commandes à distance de manière sécurisée. 

Related articles