Choose Nextcloud All-in-One (AIO) if you want a Docker deployment with a browser interface for updates and backups. Choose Docker Compose with the community Nextcloud image if you want to manage the app and database yourself. Choose Nextcloud Snap if you run Ubuntu and want a package that updates automatically to subsequent stable releases by default. AIO documentation, Nextcloud Docker image, Snap requirements, Snap installation
Which Nextcloud install fits your server?
| Install path | What you configure | Where does HTTPS come from? |
|---|---|---|
| AIO | Domain and optional add-ons in the AIO interface. AIO Linux setup | AIO handles HTTPS in the direct setup. |
| Community image with Compose | App, database and persistent volumes in Compose. Docker image examples | The base Apache example uses HTTP. For internet access, the image maintainers recommend an HTTPS reverse proxy. |
| Snap | Administrator account in the browser after installing the package. Snap installation | The snap includes a command to enable HTTPS with Let’s Encrypt. The snap’s renewal service keeps the certificate up to date automatically. Snap HTTPS configuration |
AIO can use Compose too. Its Compose file starts the mastercontainer, which still manages the other containers through the Docker socket. With the community image, your Compose file defines the database and application services directly. AIO Compose file, Community image examples
Start Nextcloud AIO with Compose
For this direct install, use a standard Docker Engine installation with Compose. The AIO setup guide warns against the Docker snap. If you use your own domain, point it at your public IP and forward TCP port 443 to the host. If you enable Nextcloud Talk, also forward its default TURN port, 3478, over TCP and UDP. AIO project setup, AIO Linux domain setup
If another web server already uses TCP port 443 on the public IP you plan to use for AIO, start with the AIO reverse proxy guide. For a private deployment, use the AIO local installation guide.
-
Save the upstream Compose file as
compose.yaml. Keepnextcloud-aio-mastercontainerand thenextcloud_aio_mastercontainer:/mnt/docker-aio-configvolume mapping. AIO’s built-in backups rely on that mapping. The file publishes host ports 80, 8080 and 8443. -
If you need a host directory for user files, uncomment the
environment:andNEXTCLOUD_DATADIR: /mnt/ncdatalines and set your path before the first installation. Changing this setting after installation requires a separate procedure. AIO Compose file, AIO data directory instructions -
From the directory containing the file, start the mastercontainer. AIO project documentation
docker compose up -d -
Open the AIO setup screen from your private network at
https://<server-ip>:8080. Accept its expected self-signed certificate warning. Save the displayed passphrase, click Open Nextcloud AIO login and enter it. AIO Linux setup guide, AIO port reference -
Enter your domain. After it passes validation, pick your add-ons and click Start containers. Once AIO displays the Nextcloud admin credentials, open the new instance at your domain and sign in. AIO Linux setup guide
Backups and updates. While Nextcloud is running, sign in to Nextcloud as an admin, open Administration settings → Overview, and use the button at the top to reopen the AIO login. AIO admin access
In the AIO interface, enter a backup path on a mounted drive, such as /mnt/backup, and click Create Backup. Store the displayed encryption key safely. After the first Borg backup, you can enable scheduled backups. With scheduled backups enabled, you can opt in to automatic updates. For manual updates to the application containers, back up first, stop the containers and select Start and update containers. AIO backup instructions, AIO update instructions
Start the community image with Docker Compose
For a host-local first start, copy the Apache and MariaDB example into a separate compose.yaml. Use the example’s nextcloud and db volumes for persistent application and database storage. Nextcloud Docker image documentation
-
In the
dbservice, set a value forMYSQL_ROOT_PASSWORD. Set the same application database password inMYSQL_PASSWORDin bothdbandapp. Keep these values private. The image documentation also provides a Docker Secrets example. -
Under
app→ports, use127.0.0.1:8080:80as a quoted string. With Docker Engine releases before 28.0.0, hosts on the same Layer 2 segment may still reach a port bound to localhost. Compose port syntax, Docker port publishing -
From the directory containing the file, run the command below. Then open
http://localhost:8080/on the Docker host and choose your Nextcloud administrator username and password. The example passes hostdb, database and usernextcloud, and the application database password through environment variables. Apache example, First-use instructionsdocker compose up -d
For internet access, put the app behind an HTTPS reverse proxy. The image maintainers link to a Compose example that handles Let’s Encrypt certificate issuance and renewal. HTTPS for the community image
Backups and updates. Before updating, back up the database plus the config, data and theme directories. Include the custom apps directory if you have custom apps installed. Check that the Nextcloud image advances by at most one major release. From the same Compose project directory, run docker compose pull and then docker compose up -d to recreate the services with the pulled images. Server backup checklist, Docker image upgrade instructions
Start Nextcloud Snap on Ubuntu
The Nextcloud Snap maintainers list Ubuntu as the supported distribution. Install the snap on your Ubuntu host with the command below. The service starts automatically. Snap requirements, Snap installation instructions
sudo snap install nextcloud
Open the server’s IP in a browser on the same network and create your Nextcloud admin account. Snap first start
For direct HTTPS with Let’s Encrypt, point your DNS name at your router’s public IPv4 address and forward ports 80 and 443 to the Snap host. Add the name to trusted_domains using a free index, such as 1 in this example. Replace cloud.example.com with your real domain. Run the HTTPS command and follow its prompts for your email address and domain. Snap trusted domain configuration, Snap HTTPS requirements, Snap network requirements
sudo nextcloud.occ config:system:set trusted_domains 1 --value=cloud.example.com
sudo nextcloud.enable-https lets-encrypt
Once the certificate is issued, open the site at your domain over HTTPS. Snap HTTPS configuration
Backups and updates. The stable snap updates automatically by default. For a manual snapshot, stop the snap, save it and start it again. The service is offline between the stop and start commands. Copy the resulting ZIP from /var/lib/snapd/snapshots to your backup location. Snap installation, Snap backup procedure
sudo snap stop nextcloud
sudo snap save nextcloud
sudo snap start nextcloud
For an existing Nextcloud instance that you plan to move to AIO, start with the AIO migration guide.
Evidence and limits. Checked November 26, 2026 against the upstream docs for AIO (the Compose template using the latest tag), the community Docker image and the stable Snap channel. Docker Docs and the Nextcloud 35 Server Administration Manual were used for port and backup details. The setup steps were documented from these references and were not run.