Skip to content

Command Palette

Search for a command to run...

Self-host Nextcloud

File sync & storage
prices checked · Jul 2026

Self-hosted file sync, sharing, calendar, and collaboration suite — the most complete Dropbox/Drive replacement.

Dropbox / yr$144
Self-hosted / yr~$55
You keep$89/yr

Key facts

CategoryFile sync & storage
LicenseAGPL-3.0
StackPHP, JavaScript
Min RAM1024 MB
Dockeryes
Difficulty
Our recommendation

Pick Nextcloud when you want one server that replaces Dropbox, Google Calendar, Contacts, and Office behind a single login — and you'll give it 4 GB of RAM, a real database, and the occasional afternoon of upkeep. If you only need files synced, ownCloud or Syncthing is less to run.

What you need

  • Any VPS with at least 1024 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • About an afternoon — budget time for troubleshooting

Install with Docker Compose

Save this as compose.yml and run docker compose up -d:

# Nextcloud + MariaDB
services:
  db:
    image: mariadb:11
    environment: { MARIADB_ROOT_PASSWORD: changeme, MARIADB_DATABASE: nextcloud }
  app:
    image: nextcloud:apache
    ports: ["8080:80"]
    depends_on: [db]
# docker compose up -d  →  http://SERVER_IP:8080

Two ways to run it

Official imageofficial

The project's own nextcloud:apache image — you supply the database, Redis, and a reverse proxy. Maximum control, the most pieces to wire up.

# official: nextcloud:apache + MariaDB
services:
  db:
    image: mariadb:11
    environment: { MARIADB_ROOT_PASSWORD: changeme, MARIADB_DATABASE: nextcloud }
  app:
    image: nextcloud:apache
    ports: ["8080:80"]
    depends_on: [db]
LinuxServer.io imagecommunity

The homelab favourite lscr.io/linuxserver/nextcloud — PUID/PGID, sane defaults, smaller footprint. Third-party, so it tracks upstream on its own cadence.

# community: linuxserver.io image
services:
  nextcloud:
    image: lscr.io/linuxserver/nextcloud:latest
    environment: { PUID: 1000, PGID: 1000, TZ: Etc/UTC }
    volumes: ["./config:/config", "./data:/data"]
    ports: ["8443:443"]

What you take on

Running Nextcloud yourself means owning the three things a SaaS quietly handles for you:

non-negotiableBackups are on you. A Compose volume is not a backup — snapshot the database and the data directory off the box, and actually test a restore before you trust it.
non-negotiableUpgrades are manual across major versions. Nextcloud won't skip versions; run occ upgrade one release at a time and read the notes, or an update will strand you mid-migration.
non-negotiableThe defaults are slow. Past a handful of users you need Redis for file locking and caching, and Postgres or MariaDB instead of SQLite — plan for it on day one, not after it feels sluggish.

An alternative to

Head-to-head

More in File sync & storage

Common questions

How much RAM does Nextcloud need?

Nextcloud's official requirement is around 1 GB of RAM for personal or small-team use; give it more if you turn on resource-heavy apps like full-text search or the built-in office suite for several concurrent users.

Can I self-host Nextcloud with Docker?

Yes — the standard setup pairs the official nextcloud:apache image with a MariaDB container in a docker-compose.yml. Running docker compose up -d brings it up on port 8080.

Is Nextcloud a good Dropbox alternative?

Nextcloud covers Dropbox's core file sync and sharing and adds built-in calendar, contacts, and document editing, all under the AGPL-3.0 license on a server you control.

Is Nextcloud hard to maintain?

It's a mid-difficulty stack (PHP plus a database that needs periodic updates and backups), but the official Docker image keeps day-to-day operation to pulling new image tags and running compose up.