Collabora Online mit Nextcloud unter keyhelp

Du möchtest schnell und einfach deine eigene Online-Collaboration mit Nextcloud auf einem KeyHelp-System nutzen? Egal ob Google und Co – es geht doch nichts über Selbsthosting! 

Voraussetzung ist ein installiertes Docker.

Wieder erstelle ich ein Verzeichnis /opt/collabora und erstelle eine docker-compose.yml

services:
  collabora_app:
    image: collabora/code
    container_name: collabora_app
    cap_add:
      - MKNOD
    ports:
      - "9980:9980"
    environment:
      - domain=cloud\\.meinedomain\\.de 
      - dictionaries=de en
      - username=username 
      - password=geheimXd 
    restart: always

Im nächsten Schritt erstellen wir uns in Keyhelp (oder auch jedem anderen Programm deiner Wahl) eine Subdomain, zum Beispiel collaboara.deinedomain.de und geben hier die folgende Apache-Anweisung mit

 ########################################
 # Reverse proxy for Collabora Online   #
 ########################################

 AllowEncodedSlashes NoDecode
 SSLProxyEngine On
 ProxyPreserveHost On

 # cert is issued for collaboraonline.example.com and we proxy to localhost
 SSLProxyVerify None
 SSLProxyCheckPeerCN Off
 SSLProxyCheckPeerName Off

 # static html, js, images, etc. served from coolwsd
 # browser is the client part of Collabora Online
 ProxyPass           /browser https://127.0.0.1:9980/browser retry=0
 ProxyPassReverse    /browser https://127.0.0.1:9980/browser

 # WOPI discovery URL
 ProxyPass           /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
 ProxyPassReverse    /hosting/discovery https://127.0.0.1:9980/hosting/discovery

 # Capabilities
 ProxyPass           /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
 ProxyPassReverse    /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities

 # Main websocket
 ProxyPassMatch      "/cool/(.*)/ws$"      wss://127.0.0.1:9980/cool/$1/ws nocanon

 # Admin Console websocket
 ProxyPass           /cool/adminws wss://127.0.0.1:9980/cool/adminws

 # Download as, Fullscreen presentation and Image upload operations
 ProxyPass           /cool https://127.0.0.1:9980/cool
 ProxyPassReverse    /cool https://127.0.0.1:9980/cool
 # Compatibility with integrations that use the /lool/convert-to endpoint
 ProxyPass           /lool https://127.0.0.1:9980/cool
 ProxyPassReverse    /lool https://127.0.0.1:9980/cool

Auch hier bei der Erstellung der Subdomain wieder an das SSL-Zertifikat denken :-)

Um alle Anweisungen verarbeiten zu können musst Du evtl. noch beim Apache die folgenden Module aktivieren:

a2enmod proxy
a2enmod proxy_wstunnel
a2enmod proxy_http
a2enmod ssl
service apache2 restart  oder alternativ /etc/init.d/apache2 restart

Jetzt in Nextcloud einloggen => Dein Profil => Verwaltungseinstellungen => Verwaltung => Office und dort die URL https://collabora.deinedomain.de eintragen. Speichern und Nextcloud sollte es entsprechend quittieren :-) Fertig!