Skip to content
Guide · Self-hosting

How do I self-host Nextcloud on a VPS?

The quickest reliable way to self-host Nextcloud is the official Docker Compose stack on a KVM VPS: deploy the box, install Docker, drop in a compose file and point a domain at it. The Standard plan (3 vCPU, 4 GB RAM, 90 GB NVMe at $8.90/month) comfortably runs Nextcloud with its database for a household or small team.

30 min7 min readUpdated Aug 2026

Nextcloud replaces Dropbox, Google Drive and a good deal of Google Workspace with software you run yourself, so your files live on a server you rent directly rather than in someone else's cloud. This guide uses the maintained Docker Compose setup, which is the least fragile way to run it.

Prerequisites: a KVM VPS (the Standard plan is a good starting point; add storage if you will hold large media libraries), root access, and a domain name pointed at the server's IP for TLS. Larger libraries are better served by moving the data directory onto a Storage VPS volume.

  1. 1

    Deploy the server

    Order a Standard-sized KVM VPS with Debian 12 or Ubuntu 24.04 and SSH in as root. Point an A record for your domain at the server IPv4 so certificates can be issued later.

  2. 2

    Install Docker and Compose

    Install Docker Engine and the compose plugin from the official Docker apt repository, then verify with docker run --rm hello-world. Full KVM means Docker runs natively with no host restrictions.

  3. 3

    Create the compose stack

    In a directory such as /opt/nextcloud, write a docker-compose.yml with three services: the Nextcloud app image, a PostgreSQL (or MariaDB) database, and a reverse proxy such as Caddy that will obtain TLS automatically for your domain.

  4. 4

    Set environment and volumes

    Put database credentials and the trusted domain in an .env file, and map named volumes for the database and for Nextcloud data so your files survive a container rebuild. Keep the .env readable only by root.

  5. 5

    Bring the stack up

    Run docker compose up -d, then watch docker compose logs -f until Nextcloud reports it is installed and the proxy has issued a certificate for your domain.

  6. 6

    Complete setup and harden

    Open the domain in a browser, create the admin account, then enable server-side encryption if desired, set up the background cron job, and schedule off-site backups of the data and database volumes to a second jurisdiction.

Storage growth: Nextcloud data grows with use; when it outgrows a compute plan, move the data volume onto a Storage VPS reaching up to 16 TB rather than over-buying CPU. Backups: off-site snapshots stored in a different jurisdiction from the server are available as an add-on and are worth enabling before you rely on the instance.

Frequently asked questions

What are the VPS requirements for Nextcloud?

For a household or small team, 4 GB of RAM and a couple of vCPUs are comfortable, which the Standard plan provides at $8.90/month alongside the database. The resource that grows is disk, driven by how much you store — move the data directory to a Storage VPS if it outgrows the compute plan.

Can I run Nextcloud in Docker on a VPS?

Yes. NimbusVPS is full KVM with your own kernel, so Docker and Docker Compose run natively and the official Nextcloud compose stack deploys unchanged. This would be restricted on a shared-kernel container platform.

Is self-hosting Nextcloud private?

Your files sit on a server you rent directly rather than in a third party's cloud, and on NimbusVPS that server carries no identity linked to you and keeps 0-day access logs. Privacy still depends on your own hardening — TLS, strong admin credentials and encrypted off-site backups.

Deploy a server for this in under 5 minutes — no ID, crypto payment.

Deploy in the next five minutes.

Pick a location, size the box, pay in crypto. No account signup wall, no ID, no waiting on a human.

7-day money-back guarantee · No KYC · Cancel any time from the panel