01What Nextcloud AIO Is (and Isn't)
If you would rather assemble each Nextcloud component yourself and control every service in Compose, AIO is probably the wrong tool. It trades fine-grained control for a managed, opinionated stack.
02Prerequisites Before You Start
1# Prints /var/snap/docker/ if you are on a snap-based Docker install (not supported by AIO)2sudo docker info | grep "Docker Root Dir" | grep "/var/snap/docker/"03The Compose File
1name: nextcloud-aio2services: 3 nextcloud-aio-mastercontainer: 4 # AIO updates itself and the containers it starts from the AIO interface5 image: ghcr.io/nextcloud-releases/all-in-one:latest6 init: true7 restart: always8 # AIO requires this exact container name9 container_name: nextcloud-aio-mastercontainer10 volumes: 11 # Keep this volume name or the built-in backup will not work12 - nextcloud_aio_mastercontainer:/mnt/docker-aio-config13 - /var/run/docker.sock:/var/run/docker.sock:ro14 network_mode: bridge15 ports: 16 - "80:80"17 - "8080:8080"18 - "8443:8443"1920volumes: 21 nextcloud_aio_mastercontainer: 22 name: nextcloud_aio_mastercontainerThe mastercontainer needs the Docker socket to do its job, which is a powerful permission. If you are uncomfortable with that, upstream documents a manual install that works without a container having socket access.
04First Start and the AIO Interface
1docker compose up -d2# Then browse to https://<server-ip>:8080 and accept the self-signed certificate05Running Behind a Reverse Proxy
Make your proxy changes in a test deployment first. Upstream itself points out that test deployments of AIO are cheap and disposable.