Self-host Nextcloud
File sync & storageSelf-hosted file sync, sharing, calendar, and collaboration suite — the most complete Dropbox/Drive replacement.
Key facts
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:8080Two ways to run it
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]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:
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.