Self-hosting Nextcloud: your own cloud storage
Files, calendars, contacts and collaboration you fully own — sizing and setup.
Nextcloud is a self-hosted replacement for Dropbox, Google Drive and more: files, calendars, contacts, notes, document editing and video calls. · source code
Why self-host it
Your data stays yours — no per-seat fees, no provider scanning your files.
Feature parity for most personal and small-team needs.
Extensible with hundreds of apps.
Sizing
Nextcloud is not lightweight, especially with apps enabled.
| Users | vCPU | RAM | Disk |
|---|---|---|---|
| 1–5 | 2 | 2–4 GB | 40 GB+ (grows with files) |
| 5–25 | 4 | 8 GB | 100 GB+ |
| 25–100 | 8 | 16 GB+ | scale storage separately |
The database is usually the first bottleneck. Use PostgreSQL, and put user files in object storage as you grow — see Object storage basics.
Setup
Provision a VPS sized for your users.
Install the LEMP stack (Nginx, PHP-FPM with the required extensions, PostgreSQL/MariaDB).
Create a dedicated database and user.
Install Nextcloud, complete the setup wizard, and add TLS — Free TLS certificates.
Configure background jobs as cron (not AJAX) for reliability:
# every 5 minutes, as the web server user
*/5 * * * * php -f /var/www/nextcloud/cron.phpSet your trusted domains, and enable caching (Redis) for speed.
Point clients at it
The desktop and mobile apps sync to your URL. Calendars and contacts sync over CalDAV/CardDAV — great for replacing a cloud calendar everywhere at once.
Security
Keep it patched; Nextcloud updates frequently and include security fixes.
Enable 2FA and brute-force protection.
Prefer putting it behind your private mesh for admin access, and expose only the web interface publicly. See Private mesh networking.
Back it up — files and database. See Back up your data.
Related reading