Nextcloud AIO: Self-Hosted Google Drive Alternative
Set up Nextcloud All-in-One on Docker for file sync, photo backup, calendar, contacts, and office document editing, all on your own server.
Nextcloud is the most complete self-hosted cloud suite available. File sync, photo backup, calendar, contacts, notes, collaborative document editing — it covers most of what Google Workspace does, running on hardware you own. Nextcloud AIO (All-in-One) is the official Docker-based installer that handles the entire stack automatically.
The tradeoff is that Nextcloud is complex. It’s not a five-minute install. The AIO installer makes it significantly more manageable, but you’re still deploying a multi-container application with a real web server, a database, a caching layer, and optional add-ons. Plan for 30–60 minutes of setup.
Why AIO Over Manual Install
Nextcloud has historically been painful to self-host — Nginx config, Postgres setup, Redis, cron jobs, PHP settings, opcache tuning. The manual install works, but there’s a lot of room to get it wrong.
AIO automates all of that. One container manages the orchestration, pulls the components, handles certificates, and configures everything correctly. Updates are handled through the AIO interface. It’s the right approach for a homelab unless you have a specific reason to do it manually.
Requirements
- A domain name pointing to your server (required for HTTPS — Nextcloud insists on it)
- Port 443 accessible from the internet (or from your local network if you’re using a self-signed cert)
- At least 2GB RAM (4GB+ recommended)
- Storage space for your files — plan accordingly
If you don’t want to expose port 443 to the internet, you can use Nextcloud behind a reverse proxy with a self-signed cert, but this complicates mobile sync. I’d recommend either a real domain or using Tailscale with a local domain.
DNS Setup
Point a subdomain at your server. If your server is at home, use your public IP:
nextcloud.yourdomain.com → YOUR_PUBLIC_IP
Enable port forwarding on your router: port 443 (TCP) forwarded to your server.
If you’re using Cloudflare DNS, do not use the Cloudflare proxy (orange cloud) for Nextcloud — Cloudflare’s free plan limits upload file sizes and the proxy interferes with Nextcloud’s WebDAV sync. Use DNS-only (grey cloud).
Docker Compose
Create /opt/nextcloud-aio/docker-compose.yml:
services:
nextcloud-aio-mastercontainer:
image: nextcloud/all-in-one:latest
container_name: nextcloud-aio-mastercontainer
init: true
restart: always
ports:
- "8080:8080"
environment:
- APACHE_PORT=11000
- APACHE_IP_BINDING=0.0.0.0
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
APACHE_PORT=11000 — The port Nextcloud’s internal web server uses. You’ll point your reverse proxy at this.
This compose file is minimal — the AIO master container handles creating and managing all the other containers (Nextcloud, Postgres, Redis, Collabora for document editing, Talk, etc.).
Start AIO
cd /opt/nextcloud-aio
docker compose up -d
Open the AIO interface at https://YOUR_SERVER_IP:8080. Accept the self-signed certificate warning — this is the admin interface, not the user-facing Nextcloud.
Initial AIO Setup
The setup wizard walks you through:
-
Domain name — Enter your domain (e.g.,
nextcloud.yourdomain.com). AIO will verify it’s pointing at your server before proceeding. -
Optional containers — AIO asks what optional components to install:
- Collabora — Online document editing (LibreOffice in the browser). Add it if you want to edit office documents.
- Talk — Video conferencing and chat. Skip it unless you specifically need this.
- Clamav — Antivirus scanning. Optional, adds memory usage.
- Fulltextsearch — Full-text search across your files. Useful, adds memory usage.
-
Start containers — AIO pulls and configures everything. First pull takes several minutes.
-
Open Nextcloud — After all containers are healthy, AIO shows you the initial admin credentials. Use them to log in to Nextcloud and change the password.
Nextcloud Behind Nginx Proxy Manager
If you’re using Nginx Proxy Manager as your reverse proxy (instead of letting AIO handle certificates directly):
Add a proxy host in NPM:
- Domain:
nextcloud.yourdomain.com - Scheme:
http - Forward Host: Your server IP
- Forward Port:
11000 - SSL: Let’s Encrypt, Force SSL
- Custom Locations: None needed
Then in the AIO interface, under the domain field, click the link to configure for reverse proxy use and ensure you’ve set the right APACHE_PORT and IP binding.
Mobile Apps
Install the Nextcloud app on your phone (Android and iOS — both free). Enter your server URL (https://nextcloud.yourdomain.com) and log in.
Enable Auto Upload in the app settings to automatically back up photos and videos from your phone. Unlike Immich, Nextcloud stores photos in your regular file directory, so they’re accessible through the Files interface.
Desktop Sync
Download the Nextcloud desktop client (Windows, macOS, Linux). It creates a local sync folder — everything in that folder syncs to your Nextcloud server, similar to Google Drive or Dropbox. Files changed on one device propagate to all others.
CalDAV and CardDAV (Calendar and Contacts)
Nextcloud includes calendar and contacts sync via CalDAV/CardDAV. Apps that support these standards (which includes most native calendar and contacts apps):
- iOS Calendar/Contacts: Settings > Mail > Accounts > Add Account > Other > Add CalDAV Account. Server:
https://nextcloud.yourdomain.com/remote.php/dav/principals/users/YOUR_USERNAME/ - Android: Use DAVx⁵ (free on F-Droid) to sync CalDAV and CardDAV. Point it at your Nextcloud URL.
- Thunderbird: Install the TbSync extension for calendar and contact sync.
Memory Requirements
Nextcloud AIO with Collabora enabled uses significant RAM — expect 2–3GB at rest. If your homelab server has 4GB or less, think carefully about what else is running alongside it.
If you’re tight on memory, skip Collabora. File sync, photo backup, calendar, and contacts work fine without it.
Updating
Updates are handled through the AIO interface at https://YOUR_SERVER_IP:8080. When an update is available, AIO shows it there. The update process stops all Nextcloud containers, updates them, and restarts. Budget 5–10 minutes of downtime for updates.
Don’t use docker compose pull directly — let AIO manage updates. Pulling images manually outside of AIO can break the managed installation.
Backups
AIO includes a built-in backup system. Go to the AIO interface and click the backup section. Configure a backup directory and a schedule. AIO backs up the database, config, and files to the specified directory.
Copy those backups off the server using the same strategy from the homelab backup guide.