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