← All guides
Nextcloud
Self-hosted file sync, sharing, and collaboration suite — your own private Dropbox/Google Drive.
This guide is synthesized from Nextcloud's own official documentation, linked above — always cross-check exact package/version names there before running these commands on a production server, since distro and project versions move over time.
1Install Docker and Docker Compose
Follow Docker's own official install guide for Ubuntu if not already installed.
2Create a docker-compose.yml
The official AIO (All-in-One) image is Nextcloud's own recommended way to self-host — it bundles the app, database, and reverse proxy with automatic HTTPS.
mkdir nextcloud-aio && cd nextcloud-aiodocker run --sig-proxy=false --name nextcloud-aio-mastercontainer --restart always --publish 8080:8080 --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config --volume /var/run/docker.sock:/var/run/docker.sock:ro nextcloud/all-in-one:latest3Finish setup in the browser
Open https://your-server-ip:8080 — the AIO interface walks you through domain setup, backups, and starting all the bundled containers.
AIO needs a real domain name with a valid certificate for its automatic HTTPS to work — a bare IP address will not fully work for the end-user-facing Nextcloud interface.