Adding hosts to the nextcloud-all-in-one nginx proxy manager

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.7.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • "Ubuntu 24.04.3 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • ?
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • `# docker exec -it nextcloud-aio-caddy caddy version
      v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=

docker exec -it nextcloud-aio-npmplus nginx -v

nginx version: NPMplus/1.28.0 (nginx)`

  • PHP version (e.g, 8.3):
    • PHP 8.3.23 (cli)
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • nextcloud aio docker
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • cloudflare for dns

Apps

The output of occ app:list (if possible).
Enabled: - activity: 4.0.0 - admin_audit: 1.21.0 - assistant: 2.5.0 - bruteforcesettings: 4.0.0 - calendar: 5.3.8 - circles: 31.0.0 - cloud_federation_api: 1.14.0 - comments: 1.21.0 - contacts: 7.2.4 - contactsinteraction: 1.12.0 - dashboard: 7.11.0 - dav: 1.33.0 - deck: 1.15.2 - federatedfilesharing: 1.21.0 - federation: 1.21.0 - files: 2.3.1 - files_antivirus: 6.0.3 - files_downloadlimit: 4.0.0 - files_fulltextsearch: 31.0.0 - files_pdfviewer: 4.0.0 - files_reminders: 1.4.0 - files_sharing: 1.23.1 - files_trashbin: 1.21.0 - files_versions: 1.24.0 - firstrunwizard: 4.0.0 - fulltextsearch: 31.0.0 - fulltextsearch_elasticsearch: 31.0.0 - integration_openai: 3.7.1 - logreader: 4.0.0 - lookup_server_connector: 1.19.0 - nextcloud-aio: 0.8.0 - nextcloud_announcements: 3.0.0 - notes: 4.12.2 - notifications: 4.0.0 - notify_push: 1.1.1 - oauth2: 1.19.1 - occweb: 0.2.3 - password_policy: 3.0.0 - photos: 4.0.0 - privacy: 3.0.0 - profile: 1.0.0 - provisioning_api: 1.21.0 - recommendations: 4.0.0 - related_resources: 2.0.0 - richdocuments: 8.7.3 - serverinfo: 3.0.0 - settings: 1.14.0 - sharebymail: 1.21.0 - spreed: 21.1.3 - support: 3.0.0 - survey_client: 3.0.0 - systemtags: 1.21.1 - tasks: 0.16.1 - text: 5.0.0 - theming: 2.6.1 - twofactor_backupcodes: 1.20.0 - twofactor_totp: 13.0.0-dev.0 - updatenotification: 1.21.0 - user_status: 1.11.0 - viewer: 4.0.0 - weather_status: 1.11.0 - webhook_listeners: 1.2.0 - whiteboard: 1.1.2 - workflowengine: 2.13.0

Tips for increasing the likelihood of a response

Hello, I want to be able to access the nginx proxy manager interface so I can expose other services on my server that I would like to install. However, can’t access it thru ip:81 and I think the aoi has only the database? I need some help / guidance how I can add the nginx-proxy-manager web ui or how to go from here. I’m very new to docker and it’s kinda confusing.

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:
:right_arrow: Is there limitations to installing Nextcloud via CT template on Proxmox - #4 by vawaver

1 Like

I forgot to include the default Nginx Proxy Manager login.

  • Email: admin@example.com
  • Password: changeme

You’ll be forced to change these on first login.

@vawaver

Thank you, I have made this container. But some ports are in use making it crash over and over.
Can I simply remove these 2 containers? docker rm id ?

bccb270fdb59   ghcr.io/szaimen/aio-caddy:v2                           "/start.sh"              4 days ago   Up 6 hours             0.0.0.0:443->443/tcp, 0.0.0.0:443->443/udp, [::]:443->443/tcp, [::]:443->443/udp                                                          nextcloud-aio-caddy
fd16d97f6ed0   ghcr.io/nextcloud-releases/all-in-one:latest           "/start.sh"              4 days ago   Up 6 hours (healthy)   0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp, 0.0.0.0:8443->8443/tcp, [::]:8443->8443/tcp, 9000/tcp   nextcloud-aio-mastercontainer

Right now you’re struggling with Caddy, but you should either commit to that route and learn how to configure it properly, or drop it and set up Nginx Proxy Manager instead.

I’ve already sent you the full NPM configuration – you can just apply it and everything should work without unnecessary headaches.

Most importantly, don’t mix two different reverse proxies at the same time – they’ll only get in each other’s way. Pick one solution and stick with it.

Thank you but it was more that that. Because I wasn’t sure what caddy did. And also nextcloud was using ports that nginx proxy manager needs. So with some help of chatgpt I managed to remove those ports from nextcloud. And remove the caddy container. Now I set-up nginx proxy manager like so: “http://nextcloud-aio-apache:11000
This seems to work.
I didn’t add in the following:

For Talk , forward UDP 3478 directly to your AIO server (TURN/STUN is UDP; NPM doesn’t proxy UDP).

Because I’m not so sure how to do that. I host a vps online. But I tested talk and I can message and call people, so I think it’s fine?

Other thing I noticed is when I go to my server ip :80 I get the congratulations page. And for :443 I get cert error. Using the cloud.domain.com works tho.

On the firewall I have now port 8080 blocked, port 81, 80, 443 allowed.

Can you please confirm if since talk seems to be working I can skip the UDP stuff you said and if these firewall rules are fine. Thank you so much for the help.

If you had mentioned from the start that you’re running this on a VPS, we could have gone for a simpler route and you might not even need NPM.
But since you’ve already got it working with NPM, just keep it as it is – no need to overcomplicate things.

About UDP 3478 – if Talk works fine and you’re not experiencing call/video dropouts, you can leave it as is. If you ever want more stable connections, open it in your VPS firewall (if you have one) and forward it to AIO.
If you don’t have a firewall enabled on the VPS, then UDP 3478 is likely already open and you don’t need to touch it at all.

Oh okay, I assumed it didn’t matter if it ran on a vps or a local machine with docker.

I’ve done these 2 commands now to be sure and I think everything should be working fine then. Thank you.

sudo ufw allow 3478/udp
sudo ufw reload

1 Like