Self-Hosting Nextcloud: The Complete Google Drive & Dropbox Replacement
You're paying $10/month for Google One, $12/month for Dropbox Plus, or $3/month for iCloud+ — and all your files live on someone else's servers. What if you could get the same functionality (and more) on hardware you control?
Nextcloud is the most popular self-hosted file sync and collaboration platform. It replaces Google Drive, Dropbox, iCloud, Google Calendar, Google Contacts, and even parts of Google Docs — all from a single installation.
This guide covers what Nextcloud actually does well, where it falls short, and how to set it up properly.
What Nextcloud Replaces
Nextcloud isn't just file storage. Through its app ecosystem, it can replace a surprising number of SaaS subscriptions:
| SaaS Service | Nextcloud Equivalent | Quality |
|---|---|---|
| Google Drive / Dropbox | Files (core) | Excellent |
| Google Calendar | Calendar app | Good |
| Google Contacts | Contacts app | Good |
| Google Docs (basic) | Nextcloud Office (Collabora) | Adequate |
| Google Keep | Notes app | Basic |
| Google Photos | Memories app | Getting better |
| Trello | Deck app | Basic |
| Slack (basic) | Talk app | Adequate |
The file sync core is solid. Calendar and Contacts via CalDAV/CardDAV work well with any standards-compliant client. The collaboration features (Docs, Talk) are functional but not as polished as dedicated SaaS alternatives.
Honest Assessment: Where Nextcloud Struggles
Before you invest time in setting this up, know the pain points:
Performance — Nextcloud's PHP codebase can feel sluggish, especially the web interface. Initial file scans on large libraries are slow. You'll want to invest in proper caching (Redis/APCu) and a decent server.
Mobile apps — The Android and iOS apps work but aren't as polished as Dropbox or Google Drive. Auto-upload of photos is reliable but can be battery-hungry.
Office collaboration — Nextcloud Office (powered by Collabora or OnlyOffice) works for basic editing, but don't expect Google Docs-level real-time collaboration. Complex spreadsheets may have formatting issues.
Updates — Major version upgrades occasionally break things. Always back up before upgrading, and don't skip major versions.
Hardware Requirements
Nextcloud runs on surprisingly modest hardware:
| Setup | CPU | RAM | Storage | Users |
|---|---|---|---|---|
| Minimal (1-2 users) | 2 cores | 2 GB | 50 GB SSD | 1-5 |
| Recommended | 4 cores | 4 GB | 500 GB SSD | 5-20 |
| Performance | 8+ cores | 8+ GB | 1+ TB NVMe | 20-100 |
For a personal or family setup, a $5-10/month VPS with attached block storage works well. For larger deployments, consider dedicated hardware or a home server.
Installation: Docker Compose
The fastest way to get Nextcloud running with all recommended components:
# docker-compose.yml
services:
nextcloud:
image: nextcloud:28
restart: unless-stopped
ports:
- "8080:80"
volumes:
- nextcloud_data:/var/www/html
- /mnt/storage/nextcloud:/var/www/html/data
environment:
MYSQL_HOST: db
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: ${DB_PASSWORD}
REDIS_HOST: redis
NEXTCLOUD_TRUSTED_DOMAINS: cloud.example.com
depends_on:
- db
- redis
db:
image: mariadb:11
restart: unless-stopped
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: ${DB_PASSWORD}
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis_data:/data
volumes:
nextcloud_data:
db_data:
redis_data:
Start it:
# Generate passwords
echo "DB_PASSWORD=$(openssl rand -base64 24)" > .env
echo "DB_ROOT_PASSWORD=$(openssl rand -base64 24)" >> .env
docker compose up -d
Essential Post-Install Configuration
After the initial setup wizard, these configurations make a significant difference:
Enable memory caching
Edit config/config.php:
'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
'host' => 'redis',
'port' => 6379,
],
Set up cron jobs
Background tasks should run via system cron, not AJAX:
# Run Nextcloud cron every 5 minutes
*/5 * * * * docker exec -u www-data nextcloud php cron.php
Then set the background job method to "Cron" in Settings → Administration → Basic settings.
Enable pretty URLs
'overwrite.cli.url' => 'https://cloud.example.com',
'htaccess.RewriteBase' => '/',
Then run:
docker exec -u www-data nextcloud php occ maintenance:update:htaccess
Desktop and Mobile Sync
Nextcloud provides sync clients for all platforms:
- Desktop (Windows, macOS, Linux): The desktop client supports selective sync, virtual files (on-demand download), and conflict resolution. It's comparable to Dropbox's client.
- Android: Automatic photo/video upload, file browsing, and offline access. Available on F-Droid (no Google account needed).
- iOS: Similar features to Android. Photo upload works reliably in the background.
Recommended Apps
After installation, add these apps from the Nextcloud App Store (built-in):
- Calendar — Full CalDAV calendar with sharing, event invitations, and room booking
- Contacts — CardDAV contacts that sync with your phone
- Notes — Simple markdown notes with mobile app support
- Deck — Kanban boards (basic Trello replacement)
- Memories — Photo gallery with AI-powered face recognition and maps view
Cost Comparison
| Option | Monthly Cost | Storage |
|---|---|---|
| Google One | $3-10 | 100 GB - 2 TB |
| Dropbox Plus | $12 | 2 TB |
| iCloud+ | $3-10 | 50 GB - 2 TB |
| Nextcloud on VPS | $5-10 | 200 GB - 1 TB |
| Nextcloud at home | $0 (electricity) | Unlimited |
The VPS route costs roughly the same as cloud storage, but you get a complete collaboration platform instead of just file sync. A home server eliminates monthly costs entirely.
When to Stick with Google Drive or Dropbox
Self-hosting Nextcloud isn't for everyone:
- You need rock-solid mobile auto-upload — Google Photos and iCloud still handle this more seamlessly
- You collaborate heavily with external people — Sharing links work, but the collaboration experience with non-Nextcloud users is clunky
- You don't want maintenance overhead — Nextcloud needs occasional updates, monitoring, and backup management
- You need 99.99% uptime — Home internet goes down; VPS providers generally offer 99.9%, but you're responsible for your stack
Backup Strategy
Your self-hosted data is only as good as your backups:
# Daily backup script
#!/bin/bash
# 1. Put Nextcloud in maintenance mode
docker exec -u www-data nextcloud php occ maintenance:mode --on
# 2. Dump the database
docker exec db mysqldump -u nextcloud -p"$DB_PASSWORD" nextcloud > backup/db-$(date +%Y%m%d).sql
# 3. Rsync data directory to backup location
rsync -a /mnt/storage/nextcloud/ backup/data/
# 4. Exit maintenance mode
docker exec -u www-data nextcloud php occ maintenance:mode --off
Store backups off-site — a second VPS, Backblaze B2 ($0.005/GB/month), or a friend's server running Nextcloud with shared folders.
The Bottom Line
Nextcloud is the single most impactful self-hosted application you can run. It replaces file sync, calendar, contacts, and basic collaboration in one package. The web interface isn't as snappy as Google Drive, and the office suite isn't as polished as Google Docs, but for file sync and PIM (personal information management), it's genuinely excellent.
If you self-host one thing, make it Nextcloud.