applicationsdockernextcloudplesk

How to deploy Collabora Online Office with Docker in Plesk and connect to Nextcloud

Since integrating Collabora Online Office with Docker in the Plesk Administration Panel is a bit tricky, here are some steps and settings that work for me:

 

Requirements:

  • root-access via ssh
  • Docker extension installed and enabled in Plesk
  • Working Nextcloud installation with Collabora online app
  • Empty subdomain created in Plesk and secured with SSL

procedure:

Connect via ssh to host and deploy Docker container:

docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=subdomain\\.domain\\.com' -e 'username=UserName' -e 'password=Your-Password' --cap-add MKNOD collabora/code

Please insert here your subdomain, on which Nextcloud runs, afterwards with

docker ps

check whether container is active.

Further configuration is done via the Plesk administration panel.

Set the hosting settings in the configured subdomain as follows, disable PHP support and 301 redirect:

 

In the appropriate subdomain, insert the following code under „Apache & nginx settings“, in the „Additional nginx directives“ section:

# static files
location ^~ /loleaflet {
proxy_pass https://127.0.0.1:9980;
proxy_set_header Host $http_host;
}

# WOPI discovery URL
location ^~ /hosting/discovery {
proxy_pass https://127.0.0.1:9980;
proxy_set_header Host $http_host;
}

# main websocket
location ~ ^/lool/(.*)/ws$ {
proxy_pass https://127.0.0.1:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}

# download, presentation and image upload
location ~ ^/lool {
proxy_pass https://127.0.0.1:9980;
proxy_set_header Host $http_host;
}

# Admin Console websocket
location ^~ /lool/adminws {
proxy_pass https://127.0.0.1:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}

The result should look like this:

disable proxy-mode under nginx settings:

A docker proxy rule is not needed as it is already implemented via nginx.

Activate the Collabora Online app in Nextcloud and enter the subdomain created in Plesk.

Now you can edit any document directly in the browser:

 

 

Under the following URL you will find the Admin-Console of collabora:

https://office.your-domain.tld/loleaflet/dist/admin/admin.html

Where you can adjust a few things.

That’s it and have fun! 😉

 

18 Gedanken zu „How to deploy Collabora Online Office with Docker in Plesk and connect to Nextcloud

  1. Hi Markus great tutorial! I followed all the steps but I am still getting an error 502 Bad Gateway and when I look at the log files I see these

    502 GET /loleaflet/dist/admin/admin.html HTTP/2.0
    29676#0: *4446259 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream

    What do you think is the problem? Thanks so much I appreciate your help.

  2. Hi Markus,

    I’ve got the same problem that Tomasz sagt got. Do we have to disable the firewall ??

    Thank you for this great and simple guide to install Collabora via Plesk

    Fred

      1. Hi Markus,
        I didn’t receive any notification warning me that you sent a reply to my post. As I couldn’t succeed in install completely Collabora using Docker I gave up but I followed up your post dealing with an installation of Collabora without and it works !!! Thank you so much.
        Fred

  3. Hi Markus,

    I do everything according to the instructions, but when I try to edit the file I get the error:

    „Failed to load Collabora Online – please try again later“

    Collabora is installed and I can log in to the administration panel

          1. I’m sorry, I made a mistake, it’s not „proxy mode“ was a problem but Plesk firewall. Thanks again for the guide and help ?

  4. Hi Markus

    Thank you for your tutorial it seems one of the simplest to follow.

    However, we have an issue whereby the docker sub-domain is not resolving as a secure domain (https://domain.com:9980) and we are getting a CSFR error due to it.

    Would you have any recommendations as to how to get the docker sub-domain secure?

    Thanks Mark

    1. Hi Mark,

      Thanks for your reply.
      did you follow my tutorial or was the installation done in other ways?
      if different how exactly?
      Docker Subdomain listen on Port 9980? Which command did you use to start the Container?

      Regards
      Markus

    1. Hi Markus,
      I didn’t receive any notification warning me that you sent a reply to my post. As I couldn’t succeed in install completely Collabora using Docker I gave up but I followed up your post dealing with an installation of Collabora without and it works !!! Thank you so much.
      Fred

Schreibe einen Kommentar zu Markus Weingärtner Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht.