How to use nextcloud container with existing nginx container?

Hi, I’m new to docker and was wondering how can I use nextcloud container if I already have nginx container? Can the nextcloud container use the nginx in my already existing nginx container? same with the database? or the only thing I can do is change the port on my nextcloud and on my nginx make a proxy pass to the new port? Thanks

Our nextcloud image already has nginx and is designed to be used with that. But you can reverse proxy that via another nginx instance like we do here:

@aptalca Correct me if I’m wrong – nextcloud requires a webserver such as nginx (or is really nginx in this situation just a reverse proxy??).

Am I correct in my thinking you could stack nginx (#1)->nginx (#2)->nextcloud where nginx #1 is the reverse proxy and nginx #2 is the webserver?

Correct. The nginx built in is used as a web server as nextcloud is just a php app.

You can then use our swag image (nginx based) as a reverse proxy in front of it