Changes:
– Additional nginx directives
– Add Instructions for more than one nextcloud-domain
– Renew Screenshots
– Add Links to Troubleshooting Guides
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 for one nextcloud-domain:
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
or for more than one nextcloud-domain:
docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=subdomain1\\.domain\\.com|subdomain2\\.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 set 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://localhost:9980; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting/discovery { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # Capabilities location ^~ /hosting/capabilities { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # main websocket location ~ ^/lool/(.*)/ws$ { proxy_pass https://localhost: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://localhost:9980; proxy_set_header Host $http_host; } # Admin Console websocket location ^~ /lool/adminws { proxy_pass https://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; }
looks like this:
disable proxy-mode under nginx settings:
A docker proxy rule is not needed as it is already implemented via nginx.
Check access to Collabora at the following Admin-URL:
https://office.your-domain.tld/loleaflet/dist/admin/admin.html
Activate the Collabora Online app in Nextcloud and enter the subdomain created in Plesk.
Now you can edit any document directly in the browser:
That’s it and have fun! 😉
If you get in trouble, please check this Guides:
Troubleshooting Nextcloud in Plesk mit Docker und OnlyOffice- oder Collabora-Image
Troubleshooting Nextcloud in Plesk mit Docker und OnlyOffice- oder Collabora-Image Teil 2
Plesk and Collabora without Docker:
How to deploy Collabora Online Office without Docker in Plesk and connect to Nextcloud on Ubuntu
17 Gedanken zu „How to deploy Collabora Online Office with Docker in Plesk and connect to Nextcloud“
Moin Danke für die Anleitung. Habe ziemlich gekämpft. Mit dem Hinweis hier hat es geklappt:
Collabora with reverseproxy not working after upgrade to Nextcloud 23
https://github.com/nextcloud/richdocuments/issues/1904
Bodo
hello Markus
when i have activited the TotalVirus pluging and scanned all domains, i noticed that it gives my bad domain for office.example.com
so i go to the report and noticed that Fortinet consider the domain as Phishing.
i don’t understand why.
Hi Alaa,
You should ask fortinet.
Markus
Hi!
First I wanted to thank you for providing this tutorial… but before I start doing anything I’d like to clarify a couple of things:
– How do I install Docker? Do I use the provided extension via the Plesk panel?
– Once I have docker installed, do I follow your instructions to install the collabora/code container via shell or can I install it from the provided extension in the Plesk panel?
Thank you in advance!
Hi. You are welcome.
Install docker with Extension and Run Container via Shell. That is right.
Markus
Great! Thank you for the prompt reply!
Hi. Anleitung ist schon bissl älter. Müsste mal schauen, ob es mit dem aktuellen Image tatsächlich Bad Gateway gibt.
Danke Dir
Markus
Hello Markus
after the migration I try to enter any document, I find this in the log of nextcloud:
Error richdocuments GuzzleHttp\Exception\ServerException: Server error: `GET https://office.example.com/hosting/discovery` resulted in a `502 Bad Gateway` response:
502 Bad Gateway
502 Bad Gateway
(truncated…)
Hi, is this the same preinstalled server as before?
sorry for bothering, now its working 🙂
Everything fine 🙂 You’re welcome!
Hi Markus
i have changed the domain of office.example.com under (Hosting Settings) from Website to No Website, because VirusTotal consider my domain (Phishing)
then I put back everything as it was because I noticed that Collabora doesn’t work anymore.
the problem is the still doesn’t work, in NextCloud it gives me (Failed to load Collabora Online Development Edition – please try again later) and the admin page of collabora gives me (502 Bad Gateway)
Hi, please check the error logs of both vhosts in plesk.
Markus
Hallo Markus,
vielen Dank für Deine super Anleitungen. Bei mir hat es „fast“ geklappt.
-> Subdomain nextcloud.domain.de angelegt und mit LetsEncrypt Zertifikat gesichert
-> Subdomain collabora.domain.de angelegt und mit LetsEncrypt Zertifkat gesichert
-> Docker mit Collabora installiert – mit docker ps geprüft -> läuft
-> Aufruf https://collabora.domain.de/loleaflet/dist/admin/admin.html und Login ok
-> Collabora Online in der Nextcloud aktiviert – Eintrag https://collabora.doamin.de
Beim Zugriff über Browser kann ich keine Dokumente editieren -> sehe nur Ladebutton „Waiting for page to render…“
Beim Zugriff über die Nextcloud-App auf Tablet oder Smartphone kann ich Dokumente editieren und sehe
diese auch auf https://collabora.domain.de/loleaflet/dist/admin/admin.html
Ist der Zugriff über Browser etwas anderes als über die App?
Wenn der Zugriff funktioniert (d.h. Dokumente können editiert werden) müssten die Grundeinstellungen ja stimmen oder?
Hast Du noch eine Idee?
Bei mir läuft:
CentOS Linux 7.6.1810 (Core)
Typ VIRTUOZZO
Produkt Plesk Onyx
Version 17.8.11 Update #49
Viele Grüße Jürgen
Hallo Jürgen,
Danke für Dein Feedback.
Hast Du verschiedene Browser getestet? Eventuell hast Du ein Plugin im Browser, das den Zugriff blockiert? Gibt es Einträge im Log, wenn Du über den Browser zugreifst?
Gruß Markus
Hallo Markus,
wenn ich ein neues Dokument erstelle dann bekomme ich im Frontend die Meldung
„Unautorisierter WOPI-Host. Bitte versuchen Sie es später noch einmal und melden Sie sich bei Ihrem Administrator, falls das Problem weiterhin besteht.“
Die Datei wurde aber trotzdem angelegt.
Wennn ich diese dann aufrufe, lädt er in einer Endlosschleife „Waiting for page to render…“
Im Chrome bekomme ich schon auf der Startseite (F12 Konsole) für jedes dort dargestellte Office-Icon die Fehlermeldung
„preview:1 Failed to load resource: the server responded with a status of 404 (Not Found)“ – Icons werden aber dargestellt.
Habe alle Browser getestet, es funktioniert bei keinem, immer „Waiting for page ….“-Meldung
Wie gesagt Zugriff über Nextcloud App funktioniert.
Viele Grüße Jürgen
Das ist in der Tat seltsam. Kannst Du mir alle Details per Mail schicken? Wie wurde der Container gestartet. Logs vom nextcloud und Office vhost etc.
Markus