Nextcloud: Your Own Cloud Drive

← Self-Hosting · Files & Photos · Replaces: Google Drive, Dropbox, OneDrive, iCloud Drive

What You'll Build

Nextcloud is a complete, private cloud: sync folders between computers and phones, share links, and keep your calendar and contacts on your own server. The official All-in-One (AIO) image installs and updates Nextcloud and everything it needs (database, cache, optional office suite) for you.

Ports: 8080 (AIO admin), 11000 (Nextcloud behind the proxy) · RAM: 2–4 GB · Time: 45 minutes · Difficulty: Hard

What You Need

Step 1: Create the AIO Compose File

mkdir -p ~/stacks/nextcloud && cd ~/stacks/nextcloud
sudo mkdir -p /mnt/data/nextcloud
nano compose.yaml
services:
  nextcloud-aio-mastercontainer:
    image: ghcr.io/nextcloud-releases/all-in-one:latest
    init: true
    restart: always
    container_name: nextcloud-aio-mastercontainer   # AIO requires this exact name
    ports:
      - "8080:8080"                                 # AIO admin interface
    environment:
      APACHE_PORT: 11000                  # Nextcloud listens here for the reverse proxy
      APACHE_IP_BINDING: 0.0.0.0
      SKIP_DOMAIN_VALIDATION: "true"      # our domain is private (LAN/Tailscale only)
      NEXTCLOUD_DATADIR: /mnt/data/nextcloud   # where your files are stored
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro   # AIO starts the other containers

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer   # AIO requires this exact name too
docker compose up -d

The AIO "mastercontainer" is a manager: it creates and updates the real Nextcloud containers itself. That's why it needs the Docker socket, and why you won't see them in this compose file.

Step 2: Add the Proxy Host First

In Nginx Proxy Manager, create cloud.home.example.com → http, 192.168.1.50, port 11000, Websockets on, wildcard certificate, Force SSL. In the Advanced tab paste:

# Allow large uploads and long transfers through the proxy
client_max_body_size 0;
proxy_read_timeout 86400s;
proxy_request_buffering off;

Step 3: Run the AIO Setup

  1. Open https://192.168.1.50:8080 (accept the self-signed certificate warning).
  2. Copy the passphrase it shows into your password manager, then click Open Nextcloud AIO login and paste it.
  3. Enter your domain: cloud.home.example.com → Submit.
  4. Choose optional containers. Good starting picks: Imaginary (faster previews) and Collabora (edit Word/Excel files in the browser, ~1 GB extra RAM). Skip Talk and ClamAV for now.
  5. Set your time zone → Download and start containers. This takes 5–15 minutes.
  6. When everything is green, AIO shows the initial admin username and password. Save them, then click Open your Nextcloud.

Step 4: Connect Your Devices

DeviceAppWhat to do
Windows / macOS / LinuxNextcloud DesktopServer address https://cloud.home.example.com, log in in the browser, pick folders to sync.
Android / iPhoneNextcloudLog in the same way. Turn on Auto upload only if you're not using Immich for photos.
Calendar & contacts (Android)DAVx⁵Log in with your Nextcloud address to sync calendars and contacts to the phone's built-in apps.
Calendar & contacts (iPhone/Mac)Built-inSettings → Calendar → Accounts → Add → Other → CalDAV. Server: cloud.home.example.com.

For each device, create an app password (Personal settings → Security) instead of using your main password — you can revoke it if the device is lost.

Step 5: Built-In Backups and Updates

Troubleshooting

What's Next?

Nextcloud can store photos, but for a real Google Photos replacement use a dedicated app:

Immich: Your Own Google Photos →