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! 😉

 

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

  1. 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

Schreibe einen Kommentar

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