I have searched this forum for a solution, but wasn’t been able to get it to work. I’m running NextCloud in a docker container. My host machine is running a few webservers with an nginx reverse proxy, on my.server/sonarr, my.server/transmission, etc.
I would like to have my nextcloud on my.server/nextcloud.
So far I’ve been following this document, but have been getting a 502 bad gateway error.
Hello Elmardus,
I’m having similar environment as you. I’m using nginx as proxy to redirect to apache virtual hosts and all this on raspberry pi 4 and noip.com for DNS
I also want to run NC in docker but I get the same error as you bad gateway 502.
I’m curious, did you setup docker network for NC ? Also as I understand I proxypass nginx to docker container with NC, and adding the port, because I’m using ports, as far as I remember for NC you need 4443, 443 and 80. Actually I’m using this https://ownyourbits.com/nextcloudpi/ and command docker run -d -p 4443:4443 -p <custom_port>:443 -p <custom_port>:80 -v ncdata:/data --name nextcloudpi ownyourbits/nextcloudpi $DOMAIN. Any ideas are very welcome, especially nginx proxy config And why we need 4443 port btw ?