Collabora/code auf einem Linux Server installieren

Lesedauer 2 Minuten
5
(1)

In diesem Tutorial möchte ich euch erklären wie ich auf meinem Ubuntu Server Collabora aufgesetzt habe. Die Grundlage dafür ist das offizielle Tutorial von Nextcloud.
Also fangen wir an.
1. Installation vorbereiten
Hierzu muss Docker installiert werden.
Mit

sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial’
sudo apt-get update && sudo apt-get install docker-engine

Alle nötigen Abhängigkeiten​ installieren, dann geht es mit der eigentlichen Installation los.
Also root User gebt ihr folgende Zeile ein:

docker pull collabora/code
docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=cloud\.nextcloud\.com' --restart always --cap-add MKNOD collabora/code

Dies lädt das Image herunter und installiert dies im Container. An dieser Stelle muss die Domain der Nextcloud oder Owncloud Installation angegeben werden. Nicht die Domain für das Office.
Einfacher geht es mit Docker -compose.
 

Version: "2.2"
Services:
  collabora:
    image: collabora/code
    expose:
      - 9980
    cap_add:
      - MKNOD
    environment:
      - domain=cloud.domain.tld
      - VIRTUAL_HOST=office.domain.tld
      - VIRTUAL_NETWORK=proxy-ssl
      - VIRTUAL_PORT=9980
      - VIRTUAL_PROTO=https

 
Im Anschluss geben wir in der Firewall den benötigten Port frei.

sudo ufw allow 9980

  1. Nun benötigen wir eine zweite Domain

In diesem Beispiel wird die Domain office.domain.tld genannt.

Apache 2.4

In die vhosts.conf für Apache2.4 tragt ihr folgendes ein:
Ändert hier alle Werte die geändert werden müssen (Domain und die Zertifikat Pfade)

<VirtualHost *:443>
ServerName office.nextcloud.com
# SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
SSLEngine on
SSLCertificateFile /path/to/signed_certificate
SSLCertificateChainFile /path/to/intermediate_certificate
SSLCertificateKeyFile /path/to/private/key
SSLProtocol             all -SSLv2 -SSLv3
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
SSLHonorCipherOrder     on
# Encoded slashes need to be allowed
AllowEncodedSlashes NoDecode
# Container uses a unique non-signed certificate
SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
# keep the host
ProxyPreserveHost On
# static html, js, images, etc. served from loolwsd
# loleaflet is the client part of LibreOffice Online
ProxyPass           /loleaflet https://127.0.0.1:9980/loleaflet retry=0
ProxyPassReverse    /loleaflet https://127.0.0.1:9980/loleaflet
# 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
# Main websocket
ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon
# Admin Console websocket
ProxyPass   /lool/adminws wss://127.0.0.1:9980/lool/adminws
# Download as, Fullscreen presentation and Image upload operations
ProxyPass           /lool https://127.0.0.1:9980/lool
ProxyPassReverse    /lool https://127.0.0.1:9980/lool

Nginx unter Plesk

Für Nginx unter Plesk (wie in meinem Beispiel)
Ersetzt hier bitte domain.tld mit eurer Domain.

listen 443 ssl;
server_name office.domain.tld;
# 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;
}
# 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;
}

Nginx ohne Plesk

server {
 listen       443 ssl http2;
 server_name  office.domain.tld;
 add_header X-XSS-Protection "1; mode=block"; #Wenn es nicht geht, notfalls deaktivieren
    ssl_certificate /etc/letsencrypt/live/cloud.domain.tld/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/cloud.domain.tld/privkey.pem; # managed by Certbot
 # 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;
 }
 # download, presentation and image upload
 location ^~ /lool {
 proxy_pass https://localhost:9980;
 proxy_set_header Host $http_host;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection "upgrade";
 }
}

 
Dann sollte es eigentlich laufen und ihr könnt es testen indem ihr den Browser öffnet und folgendes eintippt: https://office.domain.tld/hosting/discovery
Erscheint ihr der PHP Code der Seite läuft Office.
Zum Abschluss noch in Nextcloud in den Collabora Office Einstellungen folgendes eintragen: https://office.domain.tld
Viel Spaß beim schreiben von Dokumenten….
 
Quelle: Nextcloud.com

Wie fandest du den Post?

Auf einen Stern klicken zum bewerten

durchschnittlich 5 / 5. bereits abgestimmt haben: 1

Keine Bewertungen bisher, sei der erste

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Schreibe einen Kommentar

Consent Management Platform von Real Cookie Banner