I am just wondering if it would be possible to set up Collabora Online on the same server, along with the Nextcloud instance set up with snap. Do I need another server to run that?
Hello,
I havenât dug deep enough recently to have it by-the-numbers, but hopefully I can nudge you in the right direction. Itâs perfectly possible to have both services running on the same server, so long as youâre aware of the hang-ups.
Even though theyâre on the same server, youâll want Nextcloud and Collabora to have separate DNS names, to prevent cross-site-scripting attacks. The simplest way would be to add a CNAME record (e.g., âcollabora.example.comâ) which points to your existing A record (ânextcloud.example.comâ).
Since both Nextcloud and Collabora need to be reachable on ports 80 and 443, youâll want a reverse proxy set up in front of them. For me, thatâs an Apache web server (with a LetsEncrypt wildcard cert) that is reachable on those ports, and then forwards requests to Nextcloud or Collabora, as appropriate. Nextcloud and Collabora are listening on non-standard ports so they donât conflict with that Apache instance or each-other.
Basically, youâd be running 3 Apache instances on the same server: 1 as part of the Nextcloud snap, 1 as part of Collaboraâs Docker image (iirc), and 1 as the host, passing requests through to them.
I stuck on the same situation as You describe. I have nextcloud and collabora on the same IP, same server, same FQDN, itâs working, but only with opened 9980 port on firewall. I trying to figure it out using your suggestion, could you please describe it more ?
3 apache instance you mean really 3 apaches or one apache with 3 virtualhosts ?
I can imagine to run nextcloud on letâs say port 444 and collabora on 446 (I am using https only, so I guess one port for each server will be ok) and reverse proxy on port 443. But I not sure howto configure all of them. Is really necessary for collabora port 443 ? I thought 9980 is enough
Since youâre running Nextcloud and Collabora inside separate containers, each has an Apache instance. If youâre ok with opening multiple ports, and Collabora is configured to use the port youâve opened for it, then you donât need a 3rd Apache.
If you want all traffic from outside to go to port 443, then yes, youâll need the 3rd Apache (or another web service) to listen there and forward connections to Nextcloud and Collabora as you describe.
For how to configure them, the link above is a very basic starter for Apache.
Alternatively, there are some new examples for using nginx instead of Apache: the snapâs wiki, and config files here on the forum.
Well, I am not using a docker or containers, I placed NC and Collabora on the same physical server. Thatâs why I am strugling with Apaches. Now I have a separate FQDN for each of them and trying to setup Apaches.
If thatâs the case, you can absolutely take the recommended configurations and combine them to make 1 Apache instance with 2 virtualhosts.
Just to be clear, though, Iâd count snaps as âcontainersâ for this purpose, since an Apache instance inside a snap has a configuration of its own, separate from instances on the host or in other snaps.
I tried to used a port 443, but it is not working and I think it is not important. When I ommit these rows, my nexcloud.xy.com is working, collabora.xy.com working too, but when I try to rearch collabora without port :9980, I get error Could not establish connection to the Collabora Online server., with port 9980 its working nice. I thing something is wrong with reverse proxy.
Well, itâs working now without a port 9980 opened. But I have to check Disable certificate verification, which is weird, cos I have multidomain cert from Letâs Encrypt for both of FQDN nextcloud.xy.com and collabora.xy.com.