Hi,
I am planning to migrate my nc/nginx installation to docker.
I have traefik installed and would like to run my current installation in parallel to or behind traefik (for a safe migration to a dockerized nextcloud).
Is that possible at all (assuming only 1 server exists, using same ports on different subdomains)?
everything Docker… but in general it would work with bate metal and mixed install as well. networking is little harder and likely I would not use traefik on bare metal but everything is doable.
I’ve run NextCloud in a few different deployment models but settled on “AIO” running the NC environment on Docker/Ubuntu Linux.
Natively the AIO installation configures a Caddy reverse proxy on the Apache container (to proxy NC Office traffic to Collabora). That is largely transparent to the finished installation but should be considered when running a “proxied” configuration.
NC works well behind a proxy, I’ve used a few reverse proxies but settled on Caddy. The Caddy proxy handles the NC-bound traffic at 443 and forwards it on a port of my choice to the front of the back end.
You can deploy a reverse proxy as a container on the same linux host, on the nextcloud-aio network directly, as a bastion host (two networks - caddy and nextcloud-aio), host-based on separate from the Linux/Docker host.
You can deploy without a proxy then change the install later, containers are good for this. It will change the container ports published to the host, but that’s not a bad thing as really all that is needed is 443 on the apache container and perhaps a talk port or separate application server ports that you may decide to proxy or not.
As long as NAT, hairpin and DNS are set up properly the installation works well and the use of the reverse proxy in front of NC is transparent to the users.
Please see the info below, perhaps it can help get your installation up and running should you decide to change.