Self-Hosting Nextcloud: Complete Setup Guide for Beginners

Run your own cloud for less than a streaming subscription: a practical guide to self-hosting Nextcloud on a €6/month VPS, from setup and security to backups and long-term upkeep.

Self-Hosting Nextcloud: Complete Setup Guide for Beginners

You can run your own cloud for less than a streaming subscription. I say that not as a slogan but as a line item on a spreadsheet: my Nextcloud instance has been running on a €6/month VPS for over two years, holding photos, tax documents, and the shared folder my partner and I use instead of email attachments. It has hiccupped. I once locked myself out of admin access for six hours because of a botched update. But the files were never lost, and I never went back to paying for storage by the gigabyte.

If you are reading this because you want to self-host Nextcloud and you want a guide that does not stop at "install the snap and you're done", you are in the right place. Below is the complete path: choosing hardware, installing, securing it, backing it up, and living with it long-term.

Key Takeaways

  • A working Nextcloud for one household fits on a 2 vCPU / 4 GB RAM VPS with 80 GB of storage at roughly €6–12 per month.
  • The Community Edition is free and open source — you pay for infrastructure, not for software.
  • Install via Docker Compose rather than a bare-metal LAMP stack; upgrades become one command instead of an afternoon.
  • Two things break self-hosted clouds more than anything else: unprotected public exposure and backups that have never been tested.
  • Budget a few hours a month for updates and monitoring. That is the real cost of ownership.

Why self-hosting Nextcloud still makes sense in 2026

The honest answer is not "because privacy". Privacy is the marketing pitch, and it is true enough, but it is not why most people I know stick with it. They stick with it because they outgrew the free tier of a commercial drive and did not want to rent space indefinitely at a rate that scales with every photo their children take.

Nextcloud is a suite, not just a file-sync tool. Once it is up, you also get a shared calendar, contact sync via CardDAV, a browser-based office editor, and a video-calling room. That matters practically: a family can replace three separate subscriptions with a single server they control.

Is Nextcloud free?

Yes. The server software itself is free and open source under the AGPL, and the Community Edition has no user cap or licence fee. That is the version this guide covers. There is no "pay after 5 users" trap: you can create as many accounts as your hardware can handle. What costs money is the server, the domain name, and eventually the electricity or hosting bill.

What the Community Edition does not give you

Support is community forums and GitHub issues, not a ticket queue. Enterprise features — like certain auditing or compliance tooling — sit behind paid subscriptions. If you are a business with regulatory obligations, that difference matters. For a household or a small team, it almost never does. And here is a comparison of the realistic hosting routes:

SetupUpfront costMonthly costGood fit forMaintenance burden
Managed VPS (Hetzner, Netcup, OVH)0€6–15Most households, small teamsLow — you handle apps and backups only
Home server / Raspberry Pi 5€150–400Electricity onlyTinkerers, large photo librariesHigh — power, uptime, dynamic DNS
Rented dedicated box0€30+20+ users, heavy video useMedium
Managed Nextcloud hosting0€10–25People who want zero operationsNone — but you lose the point

What hardware and host do you actually need?

Two gigabytes of RAM is the point where installs start failing under load. Four is where they stop being stressful. PHP-FPM workers love memory, and so does the database, and so does Redis if you enable caching, which you should.

What hardware and host do you actually need?

My sizing rule after a few builds: 1 vCPU and 1 GB per two active users, with a floor of 2 vCPU and 4 GB. That handles web uploads comfortably. If you plan to serve large video files or use the office suite heavily, double the RAM and check the bandwidth allowance — most cheap VPS plans throttle traffic far before you hit the storage limit.

Storage is the other trap. Block storage expands, but the filesystem does not grow on its own; you will need to resize the partition manually. Buy a bit more than you need on day one.

Should you run it at home instead?

A mini-PC with an SSD is tempting: no monthly fee, full ownership. The catch is availability. When your home connection drops, your cloud is gone, and residential IP addresses are often blocked or rate-limited by remote providers. For a first build, a VPS teaches you the software without the networking headache. Move it in-house later if you want.

How to install Nextcloud with Docker Compose

I tried the snap package in my first attempt. It worked, until the automatic refreshes conflicted with the configuration I had edited by hand, and I spent a Saturday debugging a web interface that refused to load. Docker Compose is what I use now and what I recommend.

How to install Nextcloud with Docker Compose

Step 1 — prepare the server

Provision Ubuntu 24.04 or Debian 12, create a non-root user, and lock down SSH so only key authentication is allowed. Point a DNS A record for something like cloud.yourdomain.tld at the server's IP. Not a subfolder — a dedicated subdomain avoids a long list of URL rewriting problems later.

Step 2 — write the compose file

A minimal stack has four services: the Nextcloud container, a MariaDB database, Redis for caching, and a reverse proxy (Traefik or Nginx) handling TLS. Keep the database and Redis on an internal Docker network with no published ports. Only the proxy touches the outside world.

  1. Install Docker and the compose plugin from the official repository.
  2. Generate strong passwords — and store them in a password manager, not in a note on the server.
  3. Mount the data directory on a separate volume so a container rebuild never touches your files.
  4. Set the trusted_domains and overwrite.cli.url values in the config to match your domain exactly.

Start the stack with docker compose up -d and watch the logs. First boot takes a minute while the database schema initialises.

Step 3 — finish the setup wizard

Open your domain, create the admin account, and immediately go to the administration panel to check the security and setup warnings. Those warnings are the single most useful diagnostic Nextcloud gives you. Fix every red line before you upload anything real.

How do you keep a self-hosted cloud secure?

Exposing an admin login to the open internet invites automated attacks within hours. I have watched fail2ban ban a few hundred IPs in the first day of a fresh install — that is normal, not a sign you did something wrong.

How do you keep a self-hosted cloud secure?
  • Force HTTPS and renew certificates automatically via your proxy.
  • Enable two-factor authentication on the admin account, ideally with a hardware key.
  • Install fail2ban and point it at the Nextcloud log; bruteforce attempts get dropped at the firewall.
  • Restrict admin access by IP if you can, or expose the instance only over a VPN such as WireGuard or Tailscale for personal use.
  • Disable app-store installs from the web interface in production, so a compromised session cannot add code.

For a family server, the VPN route is genuinely the easiest: no public login page, no scanning bots. The trade-off is that every device needs the client installed.

How do you back up and maintain it?

An untested backup is a rumour. That is the lesson from the six hours I mentioned at the top: I had backups, but the restore script had never been run, and it pointed at a directory the update had renamed. I got everything back, but it took most of a day.

What works: a nightly dump of the MariaDB database plus a file-level sync of the data directory, stored on a different provider than the server itself. The database dump matters as much as the files — file metadata lives there, and restoring files alone leaves you with an empty-looking account.

How often should you update?

Once a month for minor releases, and promptly for security patches. Read the release notes before a major version bump; the app ecosystem lags behind, and some plugins break. Take a snapshot first, update, verify the login and a file sync, then wait a week before removing the snapshot.

What it costs you in the end

The bill for my setup is roughly €8 a month, plus an hour of attention most months and one genuinely annoying evening a year. Compare that with a paid drive plan at the same capacity and the arithmetic favours self-hosting after the first year, once you stop counting your own time as free.

And that is the trade nobody puts in the marketing copy: you are not buying storage, you are taking on an operations role. If that sounds like a burden, do not self-host — pick a managed provider and sleep well. If it sounds like the point, start with the smallest VPS that fits your files, install the Compose stack this weekend, and put a tested backup in place before you move a single irreplaceable photo onto it. Then, and only then, cancel the subscription.

Vivian Ellery

Vivian Ellery

Vivian Ellery is a privacy engineer and writer whose work focuses on end-to-end encryption, threat modeling, and the practicalities of de-Googling and digital independence. She has spent years helping individuals and organizations adopt secure communication tools and build threat models that reflect their real risks rather than abstract fears. Her writing translates technical security concepts into clear, actionable guidance for people who want to take ownership of their digital lives.

See all articles →

Related articles