Collabora Office im LXC (kein Docker!)

Da ich im Internet über viele unvollständige Docker Anleitungen gestolpert bin, hier meine kurze Notiz für die Collabora Office Installation in einem LXC Container (ohne Docker Gedöns). Die Einbindung in Nextcloud war damit in wenigen Minuten erledigt.
Kein Blank Screen nach öffnen eines Dokuments in der Cloud bzw. Fehlermeldungen usw..

Versionen zum Zeitpunkt der Installation

  • Nextcloud 21.1.1
  • LOOLWSD 6.4.10

LXC-Container vorbereiten

Auf den fertig konfigurierten LXC Container gehe ich hier nicht näher ein (bei mir erledigt das Ansible),
Hostname, Zeitserver, DNS-Auflösung sollten natürlich vorab fertig konfiguriert sein.
Bei mir ist das OS: Debian 10(Buster)

LXC Ressourcen

  • 1 CPU, 512MB RAM und Swap, 3GB Disk, unprivileged=yes, features=none

Hostnames

  • Hostname Nextcloud Host: cloud.domain.org
  • Hostname Collabora Host: office.domain.org

Nach der fertigen Installation des Containers wird in der Nextcloud unter “URL (und Port) des Collabora Online-Servers” folgendes eingetragen: https://office.domain.org/

Die Admin-URL von Collabora lautet: https://office.domain.org/loleaflet/dist/admin/admin.html

Sonstiges

  • Zertifikate verwende ich eigene (der internen CA)

Setup Notiz in der BASH

  • Ersetze cloud.domain.org mit deinem FQDN!
#Collabora Office für Nextcloud

#Repository 
cd /usr/share/keyrings
wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg

nano /etc/apt/sources.list.d/collaboraonline.sources
#-------------------------------------------------------------------------
Types: deb
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian10
Suites: ./
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg
#-------------------------------------------------------------------------
apt-update

#Installieren
apt install loolwsd code-brand

#Konfiguration
loolconfig set ssl.enable false
loolconfig set ssl.termination true
loolconfig set storage.wopi.host cloud.domain.org
loolconfig set-admin-password

systemctl restart loolwsd

#Status kontrollieren
systemctl status loolwsd
journalctl -eu loolwsd

#Reverse Proxy mit Apache2 einrichten
apt install apache2 -y
#Module aktivieren
a2enmod proxy proxy_wstunnel proxy_http ssl
systemctl restart apache2
#Default Site deaktivieren
a2dissite 000-default.conf
#SSL-Reverse Proxy einrichten
cd /etc/apache2/sites-available/

nano office-ssl.conf
#-------------------------------------------------------------------------
<VirtualHost *:443>
ServerName office.domain.org:443
Options -Indexes

# SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
SSLEngine on
SSLCertificateFile /etc/ssl/private/wildcard.domain.org.crt
SSLCertificateChainFile /etc/ssl/private/wildcard.domain.org.pem
SSLCertificateKeyFile /etc/ssl/private/wildcard.domain.org.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 Collabora Online
ProxyPass /loleaflet http://127.0.0.1:9980/loleaflet retry=0
ProxyPassReverse /loleaflet http://127.0.0.1:9980/loleaflet

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

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

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

# Admin Console websocket
ProxyPass /lool/adminws ws://127.0.0.1:9980/lool/adminws

# Download as, Fullscreen presentation and Image upload operations
ProxyPass /lool http://127.0.0.1:9980/lool
ProxyPassReverse /lool http://127.0.0.1:9980/lool
</VirtualHost>
#-------------------------------------------------------------------------

a2ensite office-ssl.conf
systemctl reload apache2

Schreibe einen Kommentar