I'm currently running a Nextcloud instance in docker, using the "multiple containers" method, but I recently discovered that the reccomended method to run it is using this "All In One" image I previously didn't know about, and so I wanted to try to migrate to that setup (also in order to have easily also the office and whiteboard features that atm I don't have on my instance + have easier Backup-restore process)
The problem is that on my server I'm using traefik as a reverse proxy to expose services to the internet, and it is working on a specific docker network (called traefik_net
) where also every container that should be exposed is connected, and from the official documentation of Nextcloud AIO I really don't understand how am I supposed to configure it to work in a setup like mine (mainly because the mastercontainer creates all the containers it needs on a network called nextcloud_aio
and I didn't find a way to change that and where to set the proper traefik lables)
Anyone that is running AIO behind a traefik reverse proxy maybe can help me to understand?
thank you! so, wanting to follow your tip and exposing the 11000 port from the apache container to the host (in order to have a setup that is valid even if I move the service to another machine), how should I do that? because the apache container is also created by AIO’s mastercontainer and so I don’t have a place where to specify its port mapping (while usually I would do it adding 11000:11000 to the ports section of the docker compose)…
If I remember correctly setting APACHE_PORT env variable in the mastercontainer section in your compose file should be enough to expose apache port on the node IP, mastercontainer should handle the process. These are the defaults from their compose example.
As you've noticed, forwarding things that way seems counterintuitive, because mastercontainer handles the managed containers and accepts limited config options as variables. Check the example compose file for common config options, like the upload limits. This is a major tradeoff of the AIO, by design, it is a standardised deployment, easy to troubleshoot and hadles a lot of things automatically, but it's inflexible. Once you get it running though it rarely causes problems.
ok I checked and you are right, the apache container actually exposes the 11000 port on the host. so i tried following the instructions for “traefik in a docker container on the same machine” and… it still didn’t work (now I was getting a Bad Gateway error)
at this point I think I’ll just stick with my old setup with docker compose. I was interested in AIO because I thought it could have been an easier to maintain way to host NC (also considering it’s official, while the docker compose method is not) but apparently it’s not meant to be inserted in an already existing setup like mine so I’ll stick with what I currently have.
it would be nice though if the NC devs also publish a “recommended docker-compose.yaml file” (in a similar way of what Immich does) so that more advanced users still can have an easy way to set everything up without having to look for the correct containers and settings required all over the internet