Nextcloud

Self-hosted content collaboration and file sync platform

File Sync & Storage ★ 36.9k stars Medium setup AGPL-3.0

Nextcloud is a comprehensive content collaboration platform offering file sync, sharing, calendars, contacts, and an app ecosystem. It is aimed at individuals, teams, and enterprises who want full control over their data. It is typically deployed via Docker, a snap package, or a bare-metal LAMP stack.

Nextcloud setup guides & articles

Hands-on coverage of Nextcloud from the blog.

Key features

  • Huge app store with hundreds of add-ons
  • Built-in calendar, contacts and office docs
  • End-to-end encryption support
  • Strong mobile and desktop clients

Quick deploy

A starting point for self-hosting Nextcloud - check the official docs for the full set of options.

  • Web port 80
Docker Compose
services:
  db:
    image: mariadb:11
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    environment:
      - MYSQL_ROOT_PASSWORD=change-me
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=change-me-too
    volumes:
      - ./db:/var/lib/mysql
    restart: unless-stopped
  app:
    image: nextcloud:latest
    depends_on:
      - db
    ports:
      - "8080:80"
    environment:
      - MYSQL_HOST=db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=change-me-too
    volumes:
      - ./html:/var/www/html
    restart: unless-stopped

Watch out for

  • Avoid the SQLite default for anything beyond a test - use MariaDB or Postgres from day one
  • Add Redis caching and a background-jobs cron container before inviting other users
  • Extra domains must be added to trusted_domains in config.php

Pros & cons

Strengths

  • Feature-rich and extensible
  • Active development and large community
  • Integrates calendar, contacts and office

Trade-offs

  • Can be resource heavy
  • Performance tuning often needed

Nextcloud replaces

Last reviewed Aug 22, 2026 · 682 words

Nextcloud's reputation for being slow is really a reputation for being installed wrong. Three decisions made in the first hour — a real database, Redis caching, and proper cron — separate the installs people love from the ones they abandon. Make them up front, because two of the three are painful to retrofit.

Decide what you're actually replacing

Nextcloud is a Dropbox replacement first and a Google Workspace replacement second. Files, sync clients, and sharing links are mature and fast. Calendar and contacts (CalDAV/CardDAV) are rock solid and sync natively with iOS and Android. The office suite, Talk, and the longer tail of the app store are serviceable but each one you enable adds PHP weight and upgrade surface. Install the core, live with it a month, then add apps one at a time. If all you want is files moving between your own machines with no server-side sharing, Syncthing does that job with a tenth of the moving parts — the honest comparison is in Nextcloud vs Syncthing.

The database choice is permanent — make it MariaDB or Postgres

Nextcloud will happily initialise on SQLite, and that default has ruined more first impressions than any other single thing. SQLite locks under the concurrent writes that sync clients generate, and migrating a live install to a real database later is an afternoon of occ incantations. Start on MariaDB or PostgreSQL from the first docker compose up:

services:
  db:
    image: mariadb:11
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    environment:
      - MYSQL_ROOT_PASSWORD=change-me
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=change-me-too
    volumes:
      - ./db:/var/lib/mysql
    restart: unless-stopped
  app:
    image: nextcloud:latest
    depends_on: [db]
    ports:
      - "8080:80"
    environment:
      - MYSQL_HOST=db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=change-me-too
    volumes:
      - ./html:/var/www/html
    restart: unless-stopped

The three tweaks that fix "Nextcloud is slow"

  1. Redis for file locking and caching. Without it, every file operation hits the database for locks. Add a redis:7-alpine container and point config.php at it. This is the single largest perceived-speed win.
  2. Real cron. The default AJAX background-job mode runs maintenance only when someone loads a page, so previews, trash expiry, and federation lag behind. Run cron.php every 5 minutes from the host or a sidecar container.
  3. PHP memory and opcache headroom. 512 MB memory_limit and the opcache values from the admin-panel warnings. The Settings → Administration → Overview page audits most of this for you; a green check screen is achievable and worth the twenty minutes.

With those three done, a 4 GB mini PC serves a family without complaint. My deeper tuning notes, including preview generation and external storage, are in making Nextcloud fast.

Upgrades: one major version at a time, never skip

Nextcloud ships a major release roughly three times a year and supports upgrading only one major at a time. An instance three majors behind needs three sequential upgrades, each with its own app-compatibility check. This is the recurring cost of the platform: budget 30 minutes per major, read the release notes, and never let an auto-puller jump nextcloud:latest across a major boundary while you sleep. Snapshot or back up ./html and the database before each one; the 3-2-1 backup rules cover the how.

Two config lines everyone hits eventually

Every domain you serve Nextcloud from must be listed in trusted_domains in config.php, or you get an "Access through untrusted domain" page — this is the classic first-reverse-proxy stumble. And when that proxy terminates TLS, set 'overwriteprotocol' => 'https' so share links and redirects generate correctly.

What I'd do

MariaDB, Redis, and cron from day one on a 4 GB box, behind Caddy for TLS. Files, calendar, and contacts only for the first month. Nightly database dump plus data-directory backup. Then, and only then, start shopping the app store. Nextcloud run this way is genuinely low-drama infrastructure; Nextcloud run on defaults is a support forum thread waiting to happen.

Compare Nextcloud

31 head-to-head comparisons.

Similar file sync & storage apps