Error 502 on Docker AIO setup

Hello, I’m newly Deploying a Nextcloud AIO v3.1.0 AIO container. I’ve used plain nextcloud and had great results, but I was recommended to use the AIO. all my stuff is running on the same docker host

My current config is the following:
Proxymanager: Nginx proxy manager
Host: Ubuntu 20.04

image: nextcloud/all-in-one:latest
restart: always
container_name: nextcloud-aio-mastercontainer
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
- 8080:8080
- NEXTCLOUD_DATADIR=/docker/nextcloud2

I have added the domain in NGNIX proxy manager as “http://localhost:11000/” as per the docs, I’m able to access the initial config page at “http://ipofhost:8080/” and it shows that all the containers are started.

when i try to access the URL I get an error 502 bad gateway openresty and I’m not finding any errors in the logs that would indicate an issue

any insight would be greatly appreciated.

Hi, can you share your nginx proxy manager docker-compose file?

Absolutely, here you are, i have multiple sub domains on this that work without issue.

container_name: nginx-proxy-manager
image: ‘jc21/nginx-proxy-manager:latest’
restart: always
- ‘80:80’
- ‘81:81’
- ‘443:443’
- /docker/nginxproxy/data:/data
- /docker/nginxproxy/letsencrypt:/etc/letsencrypt

Please add network_mode: "host" to your nginx proxy manager docker-compose which should make it work.

Right you are, i didnt add that as it would no longer allow me to use docker network.

thank you for solving this.

Hello - quick follow-up/clarification to this.

I am having what looks like the same issue, but in order to set network_mode: “host” in my docker-compose file, i would lose the possibility to change ports on other services in the same file? I have multiple web-based services all trying to fight for 8080, so I have to separate them. Any other ideas that might help me setting network_mode: “host” to get nextcloud and still be able to change ports? Forgive me if I have misunderstood - i am no sysadmin :slight_smile:

Thank you!

In that case you need to use -e APACHE_IP_BINDING= and in npm instead of localhost the local ip-address of the server that is running docker.

1 Like

Perfect! Thank you!