Install Collabora Online on Nextcloud 15 with ISPConfig 3 on Ubuntu 18.04

image_print

Prerequisites: Docker | ISPConfig

Install Collabora Container

docker pull collabora/code
docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=nextcloud\\.domain\\.xx\' -e 'dictionaries=de en' -e 'username=admin' -e 'password=Secret.Password' --restart always --cap-add MKNOD collabora/code
netstat -putan | grep 9980
tcp    0    0   127.0.0.1:9980    0.0.0.0:*    LISTEN    31973/docker-proxy

If there are more then one Nextcloud instances, run Docker with parameter

-e 'domain=nextcloud\\.domain\\.xx\|nextcloud\\.domain2\\.xx\'

Username and password credentials are for Collabora Online Admin:

-e 'username=admin' -e 'password=Secret.Password'

Install Apache Reverse Proxy

a2enmod proxy proxy_wstunnel proxy_http ssl && service apache2 restart

Configure Reverse Proxy

As ISPConfig-Admin, go to Websites | Collabora-Domain | Options | Apache Directives and paste the following code snippet

# Encoded slashes need to be allowed
AllowEncodedSlashes NoDecode

# Container uses a unique non-signed certificate
SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off

# https://wiki.ubuntuusers.de/Apache/mod_proxy_html/
ProxyRequests 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

Done!

WOPI discovery URL

  • https://collabora.domain.xx/hosting/discovery

WOPI Discovery URL

Collabora Online Development Edition – Admin

  • https://collabora.domain.xx/loleaflet/dist/admin/admin.html

Collabora Online Admin

Credentials are of the docker run command as specified above

... -e 'username=admin' -e 'password=Secret.Password' ...

Install the app

of the Nextcloud app store

Configure the app

As nextcloud admin, go to Settings | Collabora Online and fill in the URL of the Collabora Online-server (without port 9980)

  • https://collabora.domain.xx

Finished!

Collabora Online is now working.