How-To install Collabora in Docker with Nextcloud 23

  • Have a subdomain with correct A and AAA registrations :
  • Have a working Nextcloud instance :
  • Install Docker Collabora community edition : Docker Hub
  • Launch it with this command line : docker run -t -d -p -e “domain=cloud\.com” -e “server_name=office\.cloud\.com” --restart always --cap-add MKNOD collabora/code
  • Don’t forget the server_name parameter !
  • Activate mods on Apache2 : ssl proxy_http proxy_wstunnel proxy
  • Acquire a Let’sEncrypt certificate for this subdomain.
  • Create and activate the Vhost :
<VirtualHost *:80>
Redirect permanent /

<VirtualHost *:443>

DocumentRoot /var/www/certbot

SSLEngine on
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder On
SSLCertificateFile	/etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/

# 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 coolwsd
 # browser is the client part of Collabora Online
 ProxyPass           /browser retry=0
 ProxyPassReverse    /browser

 # WOPI discovery URL
 ProxyPass           /hosting/discovery retry=0
 ProxyPassReverse    /hosting/discovery

 # Capabilities
 ProxyPass           /hosting/capabilities retry=0
 ProxyPassReverse    /hosting/capabilities

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

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

 # Download as, Fullscreen presentation and Image upload operations
 ProxyPass           /cool
 ProxyPassReverse    /cool

 # Compatibility with integrations that use the /lool/convert-to endpoint
 ProxyPass           /lool
 ProxyPassReverse    /lool
  • Adapt it to your config
  • In nextcloud, setup your server :
  • Enjoy the last version of Collabora and Nextcloud !
  • I did this tutorial because nothing is up to date in official documentations…