Hi,
I run Nginx Proxy Manager (NPM) as a separate service outside of Nextcloud AIO.
Why separate?
- Isolation & updates: AIO’s internal proxy is there to serve AIO; keeping NPM separate avoids breaking your proxy when AIO updates/recreates containers.
- No port fights: A standalone NPM owns ports 80/443/81 for all your apps, not just Nextcloud.
- Cleaner ops & recovery: independent volumes/DB, simple backups/migration, and it can front multiple services/hosts.
How I run external NPM
# 1) Create a dedicated directory for NPM
mkdir -p ~/nginx-new
cd ~/nginx-new
# 2) Create docker-compose.yml
nano docker-compose.yml
docker-compose.yml
# version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
environment:
PUID: 1000 #use yours
PGID: 1000 #use yours
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npmuser"
DB_MYSQL_PASSWORD: "StrongPass123!"
DB_MYSQL_NAME: "nginxnew"
volumes:
- ./data/app:/data
- ./letsencrypt:/etc/letsencrypt
db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'RootPass123!'
MYSQL_DATABASE: 'nginxnew'
MYSQL_USER: 'npmuser'
MYSQL_PASSWORD: 'StrongPass123!'
volumes:
- ./data/mysql:/var/lib/mysql
# 3) Start it
docker compose up -d
# 4) Open the UI
# http://<your-server-ip>:81
In NPM, add a Proxy Host for your Nextcloud domain that points to the AIO Apache (commonly port 11000 on the AIO host).
For Talk, forward UDP 3478 directly to your AIO server (TURN/STUN is UDP; NPM doesn’t proxy UDP).
For large file uploads with NPM + AIO, here’s a working example (Advanced tab settings included):
https://help.nextcloud.com/t/testing-large-file-synchronization-with-nextcloud-aio-and-nginx-proxy/223392
That’s it: AIO focuses on Nextcloud, external NPM handles everything else cleanly.
Note: This post was written with the help of an AI assistant as a writing aid only. The opinions, solutions, and technical recommendations are fully based on my personal experience.
More about how and why I use AI to write forum posts:
Is there limitations to installing Nextcloud via CT template on Proxmox - #4 by vawaver