I posted earlier this week and asked about running a Collabora Server on a separate server from where I have my nextcloud server setup. I think Iām running into a networking problem, but just in case I wanted to ask here. I tried setting it up like the instructions on the nextcloud collabora website but with letsencrypt certbot certs. They are applied and working great. Iām confused on the way I would setup the docker ports so that nextcloud can communicate with the collabora server. Iāve tried it with the
code and Iāve also tried it with this since itās not really going to be looking on the local host but would be looking for communication from the network.
docker run -t -d -p 9980:9980 -e ādomain=cloud\.nextcloud\.comā --restart always --cap-add MKNOD collabora/code
Which of these would be the right setup for nextcloud and collabora to talk on port 9980 from across the network? OR does it need to be 10.xx.xx.x:9980:9980 with the collabora servers local ip there?
With this in mind, do I need to make any changes to the ips in the example virtual host config file? I know that I need to take out the SSL configuration section since Iām using letsencrypt, but do all of the local host loop back ips need to be my collabora servers ip?
Thank you in advance. I appreciate any help that can be offered.
What this does is binds the listening port to a specific address. If you bind the loopback address, only the local machine can hit the port. If you specify only the port:port mapping, then it will listen on all addresses. That should be fine for what youāre describing.
I havenāt run them on separate boxes, but I can tell you from my own experience that the name resolution is very important. Thereās a command you can add in Docker to add a hosts file entry to the container. You might give that a try.
You will also want to make sure they present each other with valid certificates. What I do on mine is I have a separate Apache instance installed on the host that reverse proxies both Nextcloud and Collabora with named virtual hosts, and it also runs certbot for both of them.
The reverse proxy isnāt just for users; Nextcloud and Collabora both talk to each other through it as well, rather than directly between the containers, and I used the Docker alias command to add hosts file DNS overrides for both of them to point them to the reverse proxy to contact each other.
Thank you for this information. Your explanation about the ports was very helpful. If I specify the port:port style when running the docker container. Do you think that I also need to change the virtual host config to be the serverās ip also instead of the loopback address?
Like for an example?
loleaflet is the client part of LibreOffice Online
If the proxy is on a different server than Collabora then yes, donāt use loopback addresses. They will connect to the local machine instead of the other one. Youāll need to use the FQDN or LAN IP.
If your proxy is on the same server as the Collabora docker, you can optionally use loopback between the proxy and container, and I believe thatās what they do in the official example, and thatās how I did mine. But, I have a single server setup where the same VM runs all of the Docker containers and also has the reverse proxy installed on it.