Cloud storage is convenient, but your files live on someone else's servers, under someone else's rules and pricing. Free tiers fill up quickly, and handing personal documents, photos and backups to a third party is a trade-off many developers would rather avoid.
In this guide we build a private Nextcloud backed by PostgreSQL, running in Docker on your own VPS. It restarts automatically after a reboot, stays off the public internet and is reached through an SSH tunnel. We also test file sync over WebDAV and set up a nightly backup job. Self-hosting gives you full control over your data, predictable costs and a setup you can fully understand and reproduce.
What you need
A VPS with Ubuntu 24.04 (2 vCPU / 4 GB RAM is plenty). I use VDSina (affiliate link — it supports the channel at no extra cost to you) .
An SSH connection to it (any terminal works).
Short on time?…