Nextcloud is the most capable self-hosted cloud storage and collaboration platform available. It replaces Dropbox, Google Drive, and Google Photos, adding collaborative document editing, calendar, contacts, and team file sharing, all running on hardware you own. This guide covers installing Nextcloud on a NAS using Docker Compose, which works on any NAS that runs Docker: Synology (Container Manager), QNAP (Container Station), or any Linux-based NAS. The Docker Compose approach is more reliable and maintainable than using pre-packaged NAS app store versions, which are typically outdated.
In short: Deploy Nextcloud via Docker Compose with a MariaDB database and NGINX Proxy Manager for HTTPS. The stack takes 20-30 minutes to set up. Once running, install the Nextcloud desktop client on your computers and the Nextcloud mobile app on your phone. For photo backup specifically, enable the Nextcloud auto-upload in the mobile app.
What Nextcloud Replaces (and What It Doesn't)
Nextcloud is a strong replacement for:
- Dropbox / OneDrive / Google Drive. File sync with desktop and mobile clients, folder sharing, offline access
- Google Photos / iCloud Photos. Photo and video backup with album organisation, facial recognition (via the Recognize app), and location maps
- Google Docs / Office 365. Collaborative document editing via OnlyOffice or Collabora Online integration (additional Docker containers required)
- Bitwarden (basic). Nextcloud has a password manager app, though Vaultwarden is a more complete replacement
Nextcloud is not a replacement for:
- Plex or Jellyfin. Nextcloud has video playback but is not a media server
- A full email server. Nextcloud integrates with existing mail, not replace it
Prerequisites
Before starting:
- A NAS with Docker support: Synology DS423+/DS923+ or higher, QNAP TS-264/TS-464 or higher, or any NAS with at least 4GB RAM and an Intel/AMD CPU (ARM is possible but slower)
- At least 8GB RAM on the NAS. Nextcloud with MariaDB uses ~1-2GB at rest; ML features add more
- Docker Compose installed or available through your NAS UI (Synology Container Manager, QNAP Container Station)
- A registered domain name with DNS control. Required for HTTPS. A free subdomain from DuckDNS works if you don't have a custom domain
- NGINX Proxy Manager (or similar reverse proxy). Covers HTTPS certificate management
This guide uses NGINX Proxy Manager for TLS, which is itself a Docker container. If you already have a reverse proxy running (Traefik, Caddy, bare NGINX), adapt the proxy configuration to your setup.
Step 1: Create the Docker Compose Stack
Create a directory for your Nextcloud stack (e.g. /volume1/docker/nextcloud/ on Synology or /share/docker/nextcloud/ on QNAP). Inside, create a docker-compose.yml file:
version: '3.8'
services:
db:
image: mariadb:10.11
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
environment:
- MYSQL_ROOT_PASSWORD=your_root_password
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=your_db_password
volumes:
- ./db:/var/lib/mysql
app:
image: nextcloud:latest
restart: always
ports:
- 8080:80
depends_on:
- db
environment:
- MYSQL_HOST=db
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=your_db_password
- NEXTCLOUD_TRUSTED_DOMAINS=your.domain.com
- NEXTCLOUD_ADMIN_USER=admin
- NEXTCLOUD_ADMIN_PASSWORD=your_admin_password
volumes:
- ./data:/var/www/htmlReplace passwords and domain with your values. Start the stack with docker compose up -d (or via your NAS UI's Compose stack deployment). First startup takes 2-3 minutes as Nextcloud initialises the database.
Step 2: Configure HTTPS with NGINX Proxy Manager
Nextcloud requires HTTPS for its mobile clients to work correctly and for secure remote access. NGINX Proxy Manager handles SSL certificate acquisition (via Let's Encrypt) and proxying.
If NGINX Proxy Manager is not already running, add it to a separate Docker Compose stack or to the same file. Once running, access the NPM admin UI (default port 81), add a new Proxy Host:
- Domain name: your.domain.com
- Forward hostname/IP: your NAS IP Forward port: 8080 (the Nextcloud port mapped above)
- Enable Websockets Support
- Under SSL: request a new Let's Encrypt certificate for your domain
After saving, NPM requests and configures the SSL certificate automatically. Nextcloud will be accessible at https://your.domain.com.
Step 3: Fix Trusted Domains and Security Headers
After HTTPS is configured, Nextcloud may show a warning about untrusted domains or missing security headers. Fix these by editing ./data/config/config.php on the NAS filesystem:
Trusted domains. Ensure your domain is listed:
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'your.domain.com',
2 => '192.168.1.x', // optional: local NAS IP
),Proxy headers. Add to config.php if using a reverse proxy:
'trusted_proxies' => ['172.18.0.0/16'],
'overwritehost' => 'your.domain.com',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://your.domain.com',After editing config.php, restart the Nextcloud container: docker compose restart app. The admin panel security checklist (Settings → Overview) should clear most warnings after these changes.
Step 4: Desktop and Mobile Clients
Download the Nextcloud desktop client from nextcloud.com/install. Install on each computer you want to sync. On first run, enter your Nextcloud server URL and credentials. Choose which local folders to sync and which NAS folders to map them to.
The Nextcloud mobile app (iOS and Android) provides:
- On-demand file access to all NAS folders
- Automatic photo and video upload (Camera Roll backup to a designated NAS folder)
- Offline file access for marked files
For photo backup specifically, enable Auto Upload in the mobile app settings. New photos are uploaded to your configured Nextcloud folder on the NAS within minutes of being taken (when connected to Wi-Fi). This is the self-hosted equivalent of iCloud Photos or Google Photos backup.
Performance and Resource Usage
Nextcloud performance on NAS hardware depends on CPU and storage configuration:
- Intel-based NAS (TS-464, DS423+): Nextcloud runs well. PHP processing and MariaDB queries are fast on Celeron N-series hardware. File sync and uploads saturate 2.5GbE easily
- ARM-based NAS (TS-233, DS223): Nextcloud works but feels sluggish under load. The web interface is slower, and the Recognize face recognition feature (if enabled) is very slow on ARM. Photo thumbnail generation takes longer
- NVMe SSD cache: Storing the
./dataNextcloud folder on an NVMe SSD cache tier (rather than spinning drives) significantly improves responsiveness for small-file operations common in Nextcloud
Nextcloud's background jobs (thumbnail generation, face recognition, file scanning) can cause periodic CPU spikes on NAS hardware. Run these during off-peak hours via cron by setting Nextcloud's background job mode to Cron rather than AJAX (Settings → Basic Settings → Background jobs).
🇦🇺 Australian Buyers: Remote Access and Performance Notes
NBN upload speed matters: Nextcloud over the internet is limited by your NBN upload bandwidth. On NBN 100 (typical 20Mbps upload), photo uploads from mobile while away from home are workable for incremental daily uploads. Large initial library syncs should be done on the local network first. NBN 250 and above offers proportionally better remote sync performance.
CGNAT: If your ISP places you behind CGNAT (common on residential NBN), direct inbound connections are blocked. Nextcloud requires a domain and inbound connection for remote access. Workarounds: (1) a cheap VPS (~$5-7 AUD/month) as a WireGuard exit node, or (2) a Cloudflare Tunnel (free tier) which routes traffic through Cloudflare without requiring open ports. See the NAS remote access guide for ISP-specific CGNAT status.
Recommended NAS for Nextcloud in AU (March 2026): Synology DS423+ (~$980) or QNAP TS-464 (~$989). Both Intel-based with 8GB+ RAM. Avoid ARM models for Nextcloud if you plan to enable the Recognize face recognition or OnlyOffice/Collabora integration.
Use our free Cloud vs NAS Cost Calculator to compare cloud storage against owning a NAS.
Related reading: our NAS buyer's guide, our NAS vs cloud storage comparison, and our NAS explainer.
Does Nextcloud work on a Synology NAS?
Yes. Nextcloud runs on Synology via Container Manager (DSM 7.2+) using Docker Compose. The setup process is the same as described in this guide. Create the Compose stack, deploy via Container Manager's Projects view, and configure NGINX Proxy Manager for HTTPS. Synology also has a Nextcloud package in the Package Center, but it is typically outdated compared to the Docker image. The Docker Compose approach is recommended for current Nextcloud versions and easier updates.
Is Nextcloud better than Synology Drive?
For pure file sync on a Synology NAS, Synology Drive is simpler and better integrated with DSM. Nextcloud is better if you want: a platform-agnostic self-hosted solution (works on QNAP, Synology, or any Linux server), collaborative document editing via OnlyOffice, a full Google Photos replacement with face recognition, or planning to migrate away from Synology in future. If you are fully committed to Synology and only need file sync and photo backup, Synology Drive and Synology Photos are easier to maintain.
How much RAM does Nextcloud need on a NAS?
Minimum 4GB available for Docker containers, but 8GB is the practical minimum for a comfortable experience. Nextcloud with MariaDB uses approximately 1-2GB at rest. If you enable the Recognize face recognition app, expect an additional 1-2GB during processing. For a NAS running Nextcloud plus other containers, 16GB RAM is recommended. On a 4GB ARM NAS, Nextcloud is possible but tight. Performance will be marginal.
Can I add collaborative document editing to Nextcloud?
Yes, via OnlyOffice or Collabora Online. Both are Docker containers that integrate with Nextcloud as a document editing backend. OnlyOffice has a free Document Server Community edition (limited to 20 simultaneous connections). Collabora Online has a free version limited to 10 connections. For a home or small team setup, either works. Add the editing service as an additional container in your Compose stack, then configure it under Nextcloud Settings → Office. Both provide Google Docs-style collaborative editing for DOCX, XLSX, and PPTX files.
How do I update Nextcloud on Docker?
Update by pulling the new image and restarting: docker compose pull && docker compose up -d. Nextcloud runs its database migration automatically on startup after an image update. For major version upgrades (e.g. 27 → 28 → 29), update one major version at a time. Skipping versions can break the database migration. Check Nextcloud's release notes before updating across multiple major versions. Always ensure your data directory is backed up before any update.
Running multiple Docker containers alongside Nextcloud? The NAS Sizing Wizard helps estimate how much RAM and CPU your NAS needs based on your planned container workload.
NAS Sizing Wizard →