Skip to content

Self-host Nextcloud

updated Jul 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

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

Key facts

LicenseAGPL-3.0
StackPHP, JavaScript
Min RAM1024 MB
Official imageyes
Measured idle RAM210 MB
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.

Follow the Nextcloud deploy guide →

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
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

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

File sync & storage

FileBrowser Quantum

A web file manager for folders on your server, with indexed search, share links, multiple users with OIDC or LDAP sign-in, WebDAV and file previews. It is a heavily reworked fork of the original File Browser project, whose filebrowser/filebrowser repository has since been archived on GitHub.
GoVue
easyRead guide →
File sync & storage

OpenCloud

A Go file sync and share server built on ownCloud Infinite Scale's code and developed since 2025 by OpenCloud GmbH, part of Berlin's Heinlein Group. It runs with no database: files are stored as a normal folder tree on disk and their metadata in extended attributes. Spaces, share links, desktop and mobile apps, and Collabora for office editing through an optional compose module.
Go
moderateRead guide →
File sync & storage

ownCloud

ownCloud's modern flagship, Infinite Scale (oCIS) — a cloud-native rewrite in Go that replaces the legacy PHP server Nextcloud originally forked from. Single binary, lighter to run, enterprise-focused file sync and sharing.
Go
moderateRead guide →
File sync & storage

Seafile

File sync and share built around libraries: each one syncs separately with delta transfers and resumable uploads, and any library can be encrypted on the desktop client with a password the server never stores. The Community Edition server core is AGPL-3.0 with an Apache-2.0 web UI; the Professional Edition adds full-text search, file locking, audit logs and S3 storage, and is free for up to three users.
CGoPython
moderateRead guide →

Common questions

How much RAM does Nextcloud need?

Nextcloud's manual asks for at least 128 MB per PHP process and recommends 512 MB; our catalog floor is 1 GB for a small instance. 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.

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.