How to Self Host Your Own Cloud with Nextcloud
Put Nextcloud on a small always-on computer at home, give it a real SSD, and point your devices at it.
The install takes an afternoon.
Backups and remote access take the rest of the weekend, and they are the parts that matter.
The install was never the hard part; the years of small maintenance afterwards are.
To self host your own cloud, you install a server application such as Nextcloud on a computer you own, put it on your home network, and point your phone and laptop at it instead of at Google Drive, iCloud or Dropbox. It does the same jobs: file sync, phone photo backup, calendars, contacts, shared folders. The difference is that the disk is in your house and nobody can change the terms on you.
This is the build guide, not the sales pitch: hardware that works, three honest install paths, remote access, backups that survive a fire, and a straight answer about the upkeep. For the wider argument, read what data sovereignty means.
What You Are Actually Building
Self-hosting a cloud means running the server software yourself, on hardware you own, instead of renting space. Most people land on Nextcloud: an open-source application that stores your files, syncs them to your devices, and serves calendars and contacts over CalDAV and CardDAV, standards your phone already speaks.
Dropbox is a hotel room. Nextcloud is the spare room in your own house. Same bed either way, different answer to who holds the key and who fixes the plumbing at midnight.
Here is what one ordinary Nextcloud box takes over:
| What you use now | Self-hosted replacement |
|---|---|
| Drive, iCloud Drive, Dropbox | Nextcloud Files and the desktop sync client |
| Google or iCloud Photos | The Memories app, or Immich alongside |
| Calendar and contacts | Nextcloud Calendar and Contacts |
| Google Docs | Collabora Online or OnlyOffice |
| Small video calls | Nextcloud Talk |
| Password manager | Vaultwarden, a separate install |
Nextcloud is not the only choice. Seafile syncs faster and sits lighter, with fewer apps around it. Syncthing keeps folders in step with no server at all, but has no web interface and no sharing links. Immich beats Nextcloud at photos and does nothing else. Nextcloud wins most first builds because one install covers the widest ground.
Hardware That Actually Runs a Home Cloud
The machine runs all the time, so it has to be quiet and cheap to power. That rules out the old gaming tower. Three options come up repeatedly:
| Option | Good for | The catch |
|---|---|---|
| Used business mini PC (OptiPlex Micro, ThinkCentre Tiny, EliteDesk Mini) | Almost everyone. Quiet, x86, fits an NVMe plus a 2.5 inch SATA drive | Used gear: budget for a new disk |
| Raspberry Pi 5 with a proper SSD | Small households, learning, low power | Slower under load; USB storage is the usual failure point |
| Purpose-built NAS box | Drive bays and a vendor UI | Locked to that vendor for updates |
Details matter more than the badge. Give it 8 GB of RAM; 4 GB works until you add Collabora or Immich, then it does not. Keep the system and database on an SSD, put the bulk data directory on the larger drive, and use wired ethernet. Never keep live data on a microSD card, because they fail without warning.
For sizing, total what you use today across cloud drive, phone photos and laptop, then buy at least double, because photo libraries only grow. A small uninterruptible power supply is cheap insurance: a power cut during a database write is one of the few ways to genuinely corrupt an install.
Installing Nextcloud: Three Honest Paths
Start with a boring base. Debian stable or Ubuntu LTS, minimal server install, SSH key login, no desktop. Boring is the point.
Path A, Nextcloud All-in-One. The official Docker approach. One master container manages the rest for you: Nextcloud, the database, Redis, Collabora, Talk, and a BorgBackup routine already wired up. You drive it from a browser admin panel. This is the right default for most people, because the pieces that are easiest to get wrong come pre-configured.
Path B, the snap package. One command, sudo snap install nextcloud, gives you a self-contained install that updates itself. Good on a Raspberry Pi or for a first attempt you might throw away. The tradeoff is flexibility: anything unusual means fighting the packaging.
Path C, by hand. Nginx or Apache, PHP-FPM, MariaDB or PostgreSQL, Redis, and the Nextcloud files unpacked yourself. Maximum control and the most ways to get it subtly wrong, on guides that rot faster than the software changes. Pick this when you know why you want it.
Whichever path, do two things right after first login: create a normal account for daily use and stop working as admin, and learn occ, the command-line admin tool, because most real fixes start there.
Reaching Your Cloud From Outside the House
Your server does not need to be on the public internet. For most households the better answer is a VPN back home, which leaves it invisible to everyone except your own devices.
- WireGuard is fast, small and built into the Linux kernel. One config file per device, one forwarded UDP port.
- Tailscale is WireGuard with the hard part solved, punching through home routers automatically, at the cost of a third party running the coordination layer.
- Headscale is an open-source version of that coordination server, so you host the control plane yourself.
For a public address, put a reverse proxy in front. Caddy fetches and renews Let's Encrypt certificates from a few lines of config; nginx with certbot does the same with more typing. You need a real domain, plus dynamic DNS if your provider rotates your IP. Behind carrier-grade NAT, where port forwarding is impossible, a Cloudflare Tunnel gets traffic in without an inbound port, routed through someone else.
The moment port 443 answers the whole internet, you are the security team: patching within days, two-factor everywhere, brute-force protection on, and an admin account you never use daily. A VPN skips all of that, and the only thing you give up is easy sharing links for outsiders.
Backups: The Part Everyone Skips
A self-hosted cloud with no backup is not a cloud. It is a single point of failure with a nice web interface. This section matters more than the rest of the page.
Three things must be captured together or the restore will fail: the data directory where files live, the config directory, and a dump of the database. Files alone leave you a pile of documents with no accounts, shares or metadata. The order is maintenance mode on, dump the database, copy or snapshot the data, maintenance mode off. All-in-One does this on a schedule for you, which is one of the better arguments for it.
Use a deduplicating, encrypting tool: BorgBackup or restic. Both store only what changed, so nightly runs over a large library stay quick. Follow three-two-one: three copies, two kinds of media, one somewhere else. Offsite can be a drive at a relative's house, a cheap object-storage bucket, or a reciprocal deal with a friend who also runs a server.
Two things that feel like backups and are not: RAID, which survives one dead disk and nothing else, and snapshots kept on the same machine. Neither survives fire, theft or a mistyped delete. Then test a restore: pick a date, pull it into a scratch directory, open a file. An untested backup is a rumour.
The Real Maintenance Burden
The install is the short part. What you commit to is a small permanent chore on no fixed schedule. It is manageable, but pretending it does not exist is how home servers end up unpatched and abandoned.
Automatic: turn on unattended upgrades so operating system security patches land without you. Monthly, five minutes: check free disk space, confirm backups ran, and open the Nextcloud admin overview page, which lists configuration and security warnings. Once or twice a year: a major version upgrade.
Upgrades have one unbreakable rule: one major version at a time, never skip, back up first. Read the release notes for the add-on apps you rely on, because third-party apps lag behind core releases and an upgrade can quietly disable something the household uses daily.
Set up alerts you will actually see, not a log nobody opens. A push notification or email when a backup fails or a disk passes eighty percent is the difference between a five-minute fix and a lost weekend. Silence is not the same as healthy. Budget roughly an hour a month, plus one or two evenings a year that do not go to plan.
What Self-Hosting Your Own Cloud Is Bad At
Honest limits, because a guide that only sells the upside costs you data later.
Availability. Your house has one internet line, one power feed, one box. A large provider has thousands of each. If the router wedges while you are away, your files are unreachable until someone is home.
Upload speed. Home connections upload far more slowly than they download. A first full sync of a big photo library can run for days, and anyone you share a large file with pulls it through that same narrow pipe.
Encryption is not what people assume. Server-side encryption protects data at rest if someone walks off with the disk. It does not protect you from a compromised server, because the server holds the keys. The end-to-end encryption app exists, but client support is limited. For genuine zero-knowledge storage, self-hosting alone is not enough.
Nobody to call. When it breaks at eleven at night, you are the support desk. And if your partner's photos stop syncing, it is open source is not an acceptable answer. Get buy-in before migrating anyone else's life onto your hardware.
It does not replace radio. Long-range LoRa mesh hardware, like the kind Blackout Labs builds, carries text and sensor data when the internet is gone, not gigabytes of photos. See how mesh networks work.
A First Weekend, and What to Add Next
One path, no decisions left in it. Stop when you get tired; nothing here breaks if you resume next weekend.
- Buy a used business mini PC and an SSD holding double what you store today.
- Install Debian stable or Ubuntu LTS, minimal and no desktop, then turn on unattended upgrades.
- Install Nextcloud All-in-One, or the snap package if the machine is small.
- Create an admin account, then a normal account, and use the normal one from then on.
- Sync one folder from a laptop and confirm it lands on a second device.
- Set up WireGuard or Tailscale, then reach the server on mobile data with home wifi off.
- Configure encrypted backups to a second drive, then to somewhere outside the building.
- Restore one file from that backup today, before you trust it with anything.
- Only now enable phone photo upload, and let the first sync run overnight.
Add a second service only once the first has been dull for a month: Immich for photos, Vaultwarden for passwords, Paperless-ngx for scanned post, Jellyfin for media. Two habits stop this becoming a haunted house. Every new service joins the backup job the day it goes in, and one text file records each service, its port and where its data lives.
If the goal is leaving Big Tech rather than only replacing Drive, order matters: our guide to leaving Google covers which accounts to unpick first. More guides sit in the learn section.
Frequently asked questions
What is the best computer for self-hosting Nextcloud at home?
A used business mini PC such as a Dell OptiPlex Micro, Lenovo ThinkCentre Tiny or HP EliteDesk Mini suits most households. They are quiet, draw little power, run standard x86 Linux, and take an NVMe drive for the system plus a larger drive for data. Aim for 8 GB of RAM and buy a new disk, since a used one has unknown hours on it.
Can I self-host a cloud on a Raspberry Pi?
Yes. A Pi 5 with a proper SSD handles a small household comfortably. Two rules decide whether it works. Never keep live data on a microSD card, because they fail without warning. And expect slower performance once you add extras like Collabora or a photo service. For one or two people with modest libraries, a Pi is genuinely fine.
How do I back up a self-hosted Nextcloud server properly?
Capture three things together: the data directory, the config directory and a database dump. Put Nextcloud into maintenance mode first so files and database match. Use BorgBackup or restic, which deduplicate and encrypt, and keep one copy physically elsewhere. Then restore a file into a scratch folder to prove the backup actually works.
Is it safe to expose a self-hosted cloud to the internet?
It can be, but it is real work. A public server needs prompt patching, two-factor authentication, brute-force protection, valid HTTPS certificates and an admin account you never use day to day. The lower-effort option is a VPN such as WireGuard or Tailscale, which keeps the server invisible to everyone but your own devices.
How much storage do I need for a self-hosted cloud?
Add up what you use today across cloud drive, phone photos and your laptop, then buy at least double. Photo and video libraries only grow, and file versions plus the deleted-files bin consume space too. Remember the backup target needs comparable capacity, so budget for two drives rather than one.
Is self-hosting cheaper than paying for Google Drive or iCloud?
Over several years, usually yes on hardware and storage, because you buy disks once instead of renting them monthly. The honest accounting also includes electricity, replacement drives, an offsite backup target and your own time. If your hours are worth anything, treat control and privacy as the reason to do it, not savings.