Google Drive is convenient until the bill, the storage cap, or the privacy policy changes under your feet. Nextcloud gives you the same shape of service — files, calendar, contacts, notes, and collaborative office documents — on hardware you control, with no per-user meter running. The catch used to be the install: a web server, PHP extensions, a database, Redis, a cron job, and a certificate, each with its own way to break. Nextcloud All-in-One (AIO) removes that wall. You start one Docker container, the mastercontainer, and it builds and manages the whole stack for you: Nextcloud itself, PostgreSQL, Redis, the push-notification backend, and optional extras like Nextcloud Office, Talk with video calls, ClamAV antivirus scanning, and a BorgBackup-based backup tool. Updates and backups happen from the same web interface, and it is free for up to 100 users, which covers any family or small team.
Before you start
- A VPS or home server running Ubuntu 22.04 or 24.04, 64-bit, with at least 4 GB of RAM and two CPU cores. That is the official minimum, and on a smaller box the office and Talk containers will struggle. If you still need to pick a server, this VPS buying guide covers what actually matters.
- A domain name with an A record pointing at the server, for example cloud.example.com. AIO fetches a real Let's Encrypt certificate for it, so the domain has to resolve before you start. No domain yet? AIO can register a free
*.dedyn.iosubdomain for you through deSEC, right from the setup screen. - Ports 80, 443, 8080, and 8443 reachable on the server, and nothing else already listening on 80 or 443. This guide assumes no web server or reverse proxy is already in place; if you run one, follow AIO's reverse-proxy documentation instead of the direct path below.
Step 1: Install Docker the official way
AIO needs Docker Engine from Docker's own repository. The quickest reliable path is the convenience script from Docker's documentation:
curl -fsSL https://get.docker.com | sudo sh
sudo docker --version
sudo docker run hello-worldOne trap to avoid: the Docker snap package that ships in Ubuntu's store is not supported by AIO. Check with sudo docker info | grep "Docker Root Dir" — if the path mentions /var/snap/docker, remove the snap and install Docker from the official repository instead. Our Docker install guide for Ubuntu Server walks through the repository method in full.
Step 2: Open the firewall
AIO needs ports 80 and 443 for the web traffic and the certificate, 8080 for its setup interface, and 8443 for the same interface over a valid certificate. If you plan to use Talk for calls, add 3478 for both TCP and UDP. With UFW:
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 8080/tcp
sudo ufw allow 8443/tcp
sudo ufw allow 3478/tcp
sudo ufw allow 3478/udp
sudo ufw enable
sudo ufw statusAllow SSH first, or you will lock yourself out of your own server. One honest caveat: Docker publishes its ports through iptables ahead of UFW, so a UFW rule alone does not shield a published container port — UFW still earns its keep for everything else on the box. Our UFW setup guide covers the details.
Step 3: Start the mastercontainer
This is the only container you start by hand. It creates and manages the rest:
sudo docker run \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 80:80 \
--publish 8080:8080 \
--publish 8443:8443 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
ghcr.io/nextcloud-releases/all-in-one:latestTwo names in that command are load-bearing: the container name nextcloud-aio-mastercontainer and the volume nextcloud_aio_mastercontainer. Do not rename either — updates and the built-in backups depend on them. The Docker socket mount looks alarming, but it is read-only, and it is how the mastercontainer manages the rest of the stack. For production use, Nextcloud suggests its example Compose file instead of docker run; the command above is the fastest way to a working install.
Step 4: Open the AIO interface and log in
Give the container a minute to pull its image, then open the setup interface using the server's IP address, not the domain:
https://<your-server-ip>:8080Port 8080 uses a self-signed certificate, so your browser will warn you. That is expected here; accept it and continue. Use the IP address rather than the domain on this port, because the HSTS header can block domain access to it later. The interface asks for a passphrase that the mastercontainer prints in its logs. Grab it with:
sudo docker logs nextcloud-aio-mastercontainerCopy the passphrase from the log output, paste it in, and change it to something you will remember once you are inside.
Step 5: Enter your domain and start the stack
The interface now walks you through the setup: enter your domain, pick the optional containers you want, and press Start containers. Sensible picks: Nextcloud Office for editing documents in the browser, Imaginary for better image previews, and ClamAV if strangers will upload files. Skip Talk unless you need calls — it adds the TURN server and the extra port. AIO validates the domain, fetches the certificate, and starts the stack. The first start takes several minutes while the images download; wait until the container list turns green.
Step 6: Create your admin account and verify
Once the stack is green, open https://cloud.example.com and create the admin account. Then verify the install the way an operator would, not the way a demo would:
- Upload a file and a photo, then open them from another device or the mobile app. Sync that only works on localhost is not a working install.
- Open Settings, Administration, Overview. A fresh AIO install should show no security warnings; if it flags the default phone region, set it — that warning is normal and takes ten seconds to fix.
- Confirm the stack is actually running:
sudo docker psshould show the mastercontainer plusnextcloud-aio-nextcloud,-database,-redis,-apache, and any optional containers you picked, all Up. - Run Nextcloud's own health check:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ statusshould reportinstalled: trueand a version number.
After the install: the three habits that matter
First, turn on the built-in backup before you move real data in. AIO's backup is BorgBackup under the hood, managed entirely from the AIO interface — point it at separate storage, enable the daily schedule, and test a restore on a spare weekend, not when you need it.
Second, update through the AIO interface, not by pulling images by hand. AIO updates the containers, Nextcloud, and its apps together in the right order; a manual docker pull can leave the database a version ahead of the app.
Third, enable two-factor authentication for the admin account and install the Nextcloud desktop and mobile clients, which is where the "private Dropbox" feeling actually comes from. If ports 80 and 443 are already taken by another web server, do not force this guide — follow AIO's reverse-proxy documentation and put Nextcloud behind your existing server instead. Caddy makes a good front door for that job.
A private cloud is not a weekend project you finish and forget; it is a small service you own. The AIO path gets you from an empty VPS to a working Nextcloud in about half an hour, and the interface keeps the maintenance — updates, certificates, backups — a few clicks away after that.
Sources
- Nextcloud All-in-One repository and documentation: https://github.com/nextcloud/all-in-one
- Nextcloud, "How to install Nextcloud All-in-One (AIO) on Linux with Docker": https://nextcloud.com/blog/how-to-install-the-nextcloud-all-in-one-on-linux/
- Docker Engine installation docs for Ubuntu: https://docs.docker.com/engine/install/ubuntu/


