Quick answer
The fastest reliable way to self-host Nextcloud today is the official All-in-One (AIO) Docker container: one command starts a master container that then installs and manages Nextcloud, its database, cache and TLS for you. You need a VPS, a domain pointing at it, and about twenty minutes.
What you need
- A Linux VPS with at least 2 GB of RAM; Nextcloud is happier with more, and disk matters more than CPU for typical use.
- A domain or subdomain, for example cloud.example.com, with an A record pointing at the server. The AIO setup validates this before it will issue certificates.
- Ports 80, 8080 and 8443 reachable, with nothing else already listening on 80 or 443.
- Docker Engine installed from its official repository (the install steps are identical to any Docker setup on Ubuntu or Debian).
Step 1: Start the AIO master container
sudo docker run \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 80:80 \
--publish 8080:8080 \
--publish 8443:8443 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
This container is the manager. It does not run Nextcloud itself; it installs and supervises the containers that do.
Step 2: The AIO interface
Open https://your-server-ip:8080 in a browser. The certificate warning at this step is expected, because the interface starts with a self-signed certificate; proceed. The first visit shows a generated passphrase: save it somewhere safe, it is your login for this admin interface from now on.
Enter your domain when asked. AIO checks that the domain really resolves to the server, then downloads and starts the Nextcloud containers and obtains a proper certificate. When it finishes, it shows the address and the initial admin credentials for your Nextcloud itself. Log in at your domain and you are running.
Where your data actually lives
Everything persists in named Docker volumes, so container updates do not touch your files. The two that matter most are the master container's configuration volume and the data volume holding user files. If you want user data on a separate disk, for example an attached block volume, set the data directory with an environment variable on the docker run command:
-e NEXTCLOUD_DATADIR="/mnt/data"
That has to be decided at first setup; moving it later is considerably more work.
Backups
AIO includes a built-in backup integration (based on BorgBackup) that can snapshot the whole installation to a local path or attached disk on a schedule; it lives in the same admin interface and is worth enabling on day one. Whatever you choose, keep a copy somewhere other than the server itself: provider snapshots and self-managed options per line are covered in our guide to VPS backups and snapshots. A sync server holding the only copy of your files is not a backup.
Sizing and storage honesty
Nextcloud is storage-bound long before it is CPU-bound. A 2 GB instance serves a small group comfortably once installed, but photos, phone backups and shared folders eat disk quickly. Plan for the disk you will need in a year, not the disk you need today. Several of the provider lines we sell offer block storage add-ons, so you can attach and grow a data volume instead of resizing the whole server; if you expect serious storage growth, starting with the data directory on such a volume (see above) is the clean path.
Common gotchas
- Something already on port 80: AIO needs it for certificate issuance. Stop or remove any web server that shipped with the VPS image before starting the master container.
- Domain check fails: the A record has not propagated yet, or a firewall blocks port 80/8443. Fix reachability first; nothing else proceeds without it.
- Login loop or odd behavior right after setup: give the containers a few minutes on first start; the apps finish initializing in the background.
- Running behind an existing reverse proxy: possible, and officially supported, but it is the advanced path with its own configuration; if this is your first install, let AIO own ports 80 and 443 on a dedicated VPS instead.
Updating
Updates are managed from the AIO interface: it shows when container updates are available and applies them in the right order, and a daily maintenance window can do it automatically. Because data lives in volumes, updates do not touch your files, but the backup section above still applies before major version jumps.
Connecting your devices
Once the web login works, the rest of the ecosystem points at the same address: the desktop sync client for Windows, macOS and Linux, and the mobile apps with automatic photo upload, all authenticate against your domain. Create a separate account per person rather than sharing the admin login, and if you enable two-factor authentication, use app passwords for devices instead of your main password.
A note on performance
The AIO stack already wires up caching and background jobs correctly, which are the two things manual installs most often get wrong. If the interface still feels slow on a small server, check memory first: swapping is the usual culprit, and moving from 2 GB to 4 GB of RAM does more than any tuning flag. Large photo libraries also take time to generate previews after a big first upload, so judge day-two performance rather than hour-one.