Docker or classic install: two ways to install Nextcloud
Nextcloud installs on a Linux VPS in two ways, described step by step in the guide installing Nextcloud on a VPS:
- With the system packages: Apache, PHP and MariaDB from the Debian or Ubuntu repositories, then Nextcloud from its official website. More commands, but everything stays visible and is simple to back up. Recent Nextcloud versions require at least PHP 8.3: choose Ubuntu 24.04 or Debian 13.
- With Docker, using the official Nextcloud All-in-One image: a master container installs and updates Nextcloud, the database, the cache and the HTTPS certificate. Docker works on our VPS (see installing Docker on a VPS). One caveat: in an LXC container, All-in-One's backup container only starts if FUSE is enabled. Ask support before relying on it, or run your backups yourself.
As for memory, the Nextcloud documentation requires at least 128 MB per PHP process and recommends 512 MB. For a few users, the first tier is enough; generating previews and adding apps call for more.
Storage, HTTPS and security
Disk decides the tier. Add up your files, their older versions and the trash, then keep some headroom: a full disk blocks uploads and can break an update. The Ryzen VPS ranges from 64 to 300 GB of NVMe, the Intel VPS from 64 to 250 GB. Also set a per-user quota in the Nextcloud administration.
HTTPS is a must. Point a domain name (for example cloud.example.fr) to the VPS's IPv4, then get a free Let's Encrypt certificate with Certbot; All-in-One handles this itself. The method is in Certbot and Let's Encrypt on a VPS.
Secure the VPS before putting your files on it: SSH key, a firewall limited to SSH, HTTP and HTTPS, automatic updates (see securing a Linux VPS), then two-factor authentication on the Nextcloud admin account. With Docker, remember that a port published by a container bypasses UFW rules.
Backups and updates: your responsibility
Plan your own backups, and send them off the VPS: a copy on the same disk protects against neither a failure nor a mistake. A Nextcloud backup covers the config folder, the data folder and the database. The Nextcloud documentation recommends maintenance mode during the copy. With the package install and the paths from the guide:
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
sudo mariadb-dump --single-transaction nextcloud > ~/nextcloud-db.sql
sudo rsync -Aax /var/www/nextcloud/config /var/nextcloud-data ~/nextcloud-db.sql user@backup-host:/backups/nextcloud/
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
For updates, Nextcloud moves one major version at a time: you cannot skip a version. Back up before each update, check that your PHP version is still supported, and update the VPS's system too. With All-in-One, the update is started from its interface.
When a Nextcloud VPS is not the right choice
- You do not want to administer anything: a Nextcloud instance needs regular updates and backups. The guide choosing French cloud storage helps you find a managed solution.
- You store several terabytes: a storage dedicated server gives you the space our VPS do not offer.
- You want All-in-One's built-in backup without depending on FUSE inside a container: a dedicated server gives you the whole machine.
- Your users are far from France: every upload and every sync feels the distance.