Nextcloud aio and nginx (in docker on ubuntu on OIC)

Hi,

From what you described, the main issue is the URL structure.

According to the official Nextcloud AIO (All-in-One) documentation on GitHub, running AIO in a subdirectory like:

https://www.your-domain.com/nextcloud

is not supported and will not be added. The documentation explicitly states:

“Can I run AIO in a subdirectory on my domain?”
No. Please use a dedicated (sub-)domain for Nextcloud.

AIO expects Nextcloud to be available on the root of a domain or subdomain. Putting it behind /nextcloud typically causes issues with redirects, login flow, generated URLs, WebDAV endpoints and client apps.

The correct and supported approach is to use a dedicated subdomain, for example:

https://nextcloud.your-domain.com

and then forward that subdomain via reverse proxy to the AIO backend container.

Since you’re just getting started, I would strongly recommend using Nginx Proxy Manager (NPM) instead of writing raw nginx configs. It gives you a simple web UI to:

  • create a proxy host

  • request and manage SSL certificates (Let’s Encrypt)

  • map subdomains to internal Docker services

It also makes your setup future-proof. Once NPM is in place, you can easily run additional services alongside Nextcloud AIO, for example:

  • vaultwarden.your-domain.com

  • uptime.your-domain.com

  • monitoring.your-domain.com

  • etc.

Each service just gets its own subdomain and proxy entry. Much cleaner and more scalable than trying to put everything under paths.

If you want a concrete step-by-step example (including NPM configuration, ports and SSL), you can follow this guide:

https://help.nextcloud.com/t/proxmox-nginx-nextcloud-aio-watchtower-deployment-guide/233643?u=vawaver

The relevant section shows exactly how AIO should be placed behind NPM in a supported way.