What Is Nextcloud#
Nextcloud is a popular open-source platform for building your own cloud storage and collaboration hub. It lets you store files, documents, and photos, sync them across devices, and use a set of built-in services:
- calendar and tasks;
- video conferencing (Nextcloud Talk);
- office documents (Nextcloud Office / Collabora);
- notes and collaborative editing.
Nextcloud is often called a self-hosted alternative to Google Workspace and Microsoft 365 - one you can fully control and host on your own server without depending on external clouds.
What Is Nextcloud AIO#
Nextcloud AIO (All-in-One) is the official Nextcloud build created by the project’s developers to make installation and updates as simple as possible.
Unlike a classic install, where you have to manually configure Apache/Nginx, PHP, Redis, MariaDB, and Cron, AIO uses Docker and bundles everything you need into containers:
- Nextcloud (web interface);
- PostgreSQL (database);
- Redis (caching);
- Collabora Online (document editing);
- OnlyOffice (optional);
- a backup container (automatic backups).
The main advantage of AIO is automatic updates for all components and the ability to deploy a working cloud in just a few minutes. This build is ideal for home servers, LXC containers in Proxmox, or VPS, where simplicity and stability matter most.
When Should You Use Nextcloud AIO?#
If you want to quickly deploy Nextcloud with minimal effort and without having to configure individual components yourself.
Installation Requirements#
Before you begin, make sure you have:
- Docker and Docker Compose (version 2.0+);
- a server with at least 2 GB of RAM;
- a domain name and HTTPS access (ideally via Traefik, Caddy, or Nginx Proxy Manager).
Docker Compose for Nextcloud AIO#
Below is a minimal example docker-compose.yml for running Nextcloud AIO behind the Traefik reverse proxy, as shown in the video at the top of the article:
services:
nextcloud-aio-mastercontainer:
image: ghcr.io/nextcloud-releases/all-in-one:v13.3.1 # The official image moved from Docker Hub (nextcloud/all-in-one) to ghcr.io due to new Docker Hub download restrictions - if you find an old nextcloud/all-in-one link, it's outdated. It's better to pin the version and check the latest one at https://github.com/nextcloud/all-in-one/releases rather than using latest
init: true
restart: always
container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
- /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
#network_mode: bridge # add to the same network as docker run would do
ports:
#- 80:80 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
- 8087:8080
#- 8443:8443 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
environment: # Is needed when using any of the options below
AIO_DISABLE_BACKUP_SECTION: false # Setting this to true allows to hide the backup section in the AIO interface. See https://github.com/nextcloud/all-in-one#how-to-disable-the-backup-section
APACHE_PORT: 11000 # Is needed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
APACHE_IP_BINDING: 0.0.0.0 # Should be set when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
BORG_RETENTION_POLICY: --keep-within=7d --keep-weekly=4 --keep-monthly=6 # Allows to adjust borgs retention policy. See https://github.com/nextcloud/all-in-one#how-to-adjust-borgs-retention-policy
# COLLABORA_SECCOMP_DISABLED: false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature
NEXTCLOUD_DATADIR: /media/nextcloud # Allows to set the host directory for Nextcloud's datadir. ⚠️⚠️⚠️ Warning: do not set or adjust this value after the initial Nextcloud installation is done! See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
NEXTCLOUD_MOUNT: /media # Allows the Nextcloud container to access the chosen directory on the host. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host
# NEXTCLOUD_UPLOAD_LIMIT: 10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud
# NEXTCLOUD_MAX_TIME: 3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud
# NEXTCLOUD_MEMORY_LIMIT: 512M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud
# NEXTCLOUD_TRUSTED_CACERTS_DIR: /path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defined-certification-authorities-ca
# NEXTCLOUD_STARTUP_APPS: deck twofactor_totp tasks calendar contacts notes # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup
NEXTCLOUD_ADDITIONAL_APKS: imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-os-packages-permanently-to-the-nextcloud-container
NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS: imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container
# NEXTCLOUD_ENABLE_DRI_DEVICE: true # This allows to enable the /dev/dri device in the Nextcloud container. ⚠️⚠️⚠️ Warning: this only works if the '/dev/dri' device is present on the host! If it should not exist on your host, don't set this to true as otherwise the Nextcloud container will fail to start! See https://github.com/nextcloud/all-in-one#how-to-enable-hardware-transcoding-for-nextcloud
# NEXTCLOUD_KEEP_DISABLED_APPS: false # Setting this to true will keep Nextcloud apps that are disabled in the AIO interface and not uninstall them if they should be installed. See https://github.com/nextcloud/all-in-one#how-to-keep-disabled-apps
# TALK_PORT: 3478 # This allows to adjust the port that the talk container is using. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-talk-port
# WATCHTOWER_DOCKER_SOCKET_PATH: /var/run/docker.sock # Needs to be specified if the docker socket on the host is not located in the default '/var/run/docker.sock'. Otherwise mastercontainer updates will fail. For macos it needs to be '/var/run/docker.sock'
# security_opt: ["label:disable"] # Is needed when using SELinux
networks:
- nextcloud
# # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588
# caddy:
# image: caddy:alpine
# restart: always
# container_name: caddy
# volumes:
# - ./Caddyfile:/etc/caddy/Caddyfile
# - ./certs:/certs
# - ./config:/config
# - ./data:/data
# - ./sites:/srv
# network_mode: "host"
go-vod:
image: radialapps/go-vod
restart: always
depends_on:
- nextcloud-aio-mastercontainer
environment:
- NEXTCLOUD_HOST=https://next.domain.ru
- NVIDIA_VISIBLE_DEVICES=all
volumes:
- /media/nextcloud:/mnt/ncdata:ro
runtime: nvidia
networks:
- nextcloud
volumes: # If you want to store the data on a different drive, see https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work
networks:
nextcloud:
name: nextcloud
external: true Example dynamic configuration for the Traefik reverse proxy
http:
routers:
nextcloud:
entrypoints:
- "https"
rule: "Host(`subdomain.domain.ru`)"
middlewares:
- https-redirect
- nextcloud-secure-headers
tls:
domains:
- main: "subdomain.domain.ru"
service: nextcloud
services:
nextcloud:
loadBalancer:
servers:
- url: "http://your_vm_ip:11000"
passHostHeader: true
middlewares:
crowdsec-bouncer: #if you use crowdsec
forwardauth:
address: http://bouncer-traefik:8080/api/v1/forwardAuth
trustForwardHeader: true
# https://github.com/goauthentik/authentik/issues/2366
middlewares-authentik: # if you use authentik
forwardAuth:
address: "http://authentik_server:9000/outpost.goauthentik.io/auth/traefik"
trustForwardHeader: true
authResponseHeaders:
- X-authentik-username
- X-authentik-groups
- X-authentik-email
- X-authentik-name
- X-authentik-uid
- X-authentik-jwt
- X-authentik-meta-jwks
- X-authentik-meta-outpost
- X-authentik-meta-provider
- X-authentik-meta-app
- X-authentik-meta-version
nextcloud-secure-headers:
headers:
hostsProxyHeaders:
- "X-Forwarded-Host"
referrerPolicy: "same-origin"
customResponseHeaders:
X-Robots-Tag: "noindex, nofollow" #changed from default "none" parameter
https-redirect:
redirectScheme:
scheme: https
permanent: true
nextcloud-chain:
chain:
middlewares:
# - ... (e.g. rate limiting middleware)
- https-redirect
- nextcloud-secure-headersKey Points About My File#
Nextcloud AIO
Container: nextcloud-aio-mastercontainer
The container_name and volumes named nextcloud_aio_mastercontainer must not be changed - this is required for the built-in backup to work.
Ports:
8087:8080 - means the web interface will be available at http://host:8087.
The other ports are commented out, which is normal when using a reverse proxy.
Environment variables:
NEXTCLOUD_DATADIR: /media/nextcloud and NEXTCLOUD_MOUNT: /media - correctly set so that Nextcloud and go-vod see the same directory.
APACHE_PORT and APACHE_IP_BINDING are configured for the reverse proxy.
NEXTCLOUD_ADDITIONAL_APKS and NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS - added imagemagick and imagick, which will be useful for image processing.
go-vod
Depends on Nextcloud AIO (depends_on).
Uses an NVIDIA GPU (runtime: nvidia and NVIDIA_VISIBLE_DEVICES=all).
volumes: /media/nextcloud:/mnt/ncdata:ro - read-only, so Go-VOD can process Nextcloud files without any risk of modifying them.
The NEXTCLOUD_HOST=https://next.domain.ru variable should point to your actual Nextcloud domain.
Network
Both containers are connected to the external nextcloud network, which lets them communicate with each other by container name.
Volumes
nextcloud_aio_mastercontainer - essential for the built-in backup.
The rest of Nextcloud’s data lives in NEXTCLOUD_DATADIR.
Recommendations / Checks#
GPU for go-vod:
Make sure the NVIDIA driver and nvidia-container-toolkit are installed on the host.
Check that the container can see the GPU.
Nextcloud directory permissions:
/media/nextcloud needs to be accessible to both AIO and go-vod.
For go-vod, using :ro (read-only) is recommended - it’s safe.
Reverse proxy:
Ports 80/443 are commented out, meaning you need to configure an external reverse proxy - Nginx/Caddy/Traefik.
APACHE_PORT = 11000 - make sure your proxy uses this port to forward requests.
Backup:
Don’t touch the nextcloud_aio_mastercontainer volume.
You can check your backups through the AIO interface.
Running and Configuring Nextcloud AIO#
Save the file as
docker-compose.yml.Run the command:
docker compose up -d- Open your browser and go to:
http://<server_IP>:8087(port 8087, not the default 8080 - that’s exactly how it’s set in the docker-compose.yml above)
- Follow the installation wizard:
Enter your domain (for example, cloud.prohomelab.com),
Configure HTTPS (via the built-in Let’s Encrypt or your proxy),
Wait for all containers to deploy automatically.
Conclusion#
Nextcloud AIO is the ideal option for anyone who wants to spin up a powerful cloud “in one click.” It combines the convenience of Docker, automatic updates, and the reliability of official support from the Nextcloud team. This approach is a great fit for a home server, an LXC container in Proxmox, or a VPS, where simplicity, security, and self-sufficiency matter most.





