Skip to main content

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.

UsersvCPURAMDisk
1–522–4 GB40 GB+ (grows with files)
5–2548 GB100 GB+
25–100816 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

  1. Provision a VPS sized for your users.

  2. Install the LEMP stack (Nginx, PHP-FPM with the required extensions, PostgreSQL/MariaDB).

  3. Create a dedicated database and user.

  4. Install Nextcloud, complete the setup wizard, and add TLS — Free TLS certificates.

  5. Configure background jobs as cron (not AJAX) for reliability:

bash
# every 5 minutes, as the web server user
*/5 * * * * php -f /var/www/nextcloud/cron.php
  1. Set 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