How to Integrate Collabora Online with Nextcloud

This tutorial assumes you’re running Ubuntu 20.04 and Nextcloud 23 (or greater). It also assumes you know how to create A name records and can create and enable virtual host files.

Install from official repository

echo 'deb ./' | sudo tee /etc/apt/sources.list.d/collabora.list
sudo apt-key adv --keyserver --recv-keys 0C54D189F4BA284D
sudo apt install -y apt-transport-https ca-certificates
sudo apt update -y
sudo apt install -y coolwsd code-brand

Configure coolwsd

systemctl status coolwsd

Now verify coolwsd is running

sudo journalctl -eu coolwsd

It’s probably not running. We have more to do.

sudo coolconfig set ssl.enable false
sudo coolconfig set ssl.termination true
sudo coolconfig set nextcloud.example.tld
sudo coolconfig set-admin-password
sudo systemctl restart coolwsd
systemctl status coolwsd

Setup a reverse proxy

The server is now accessable from but using this probably won’t work. Collabora Online requires your Nextcloud instance and Collabora Online server using the same protocol. You’re likely using https for Nextcloud. A reverse proxy is the easiest solution.

I’m going to assume you know how to setup an A name record and know how to create and enable a virtual hosts file. Your file should look like this:

<VirtualHost *:80>
        ServerName code.example.tld
        AllowEncodedSlashes NoDecode
        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$"      ws://$1/ws nocanon

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

# 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

Now use Let’s Encrypt to generate a certificate so https can be used.

sudo certbot --apache

Install Collabora Online on Nextcloud and configure it in settings.

  • Select Use your own server

  • Enter your server name (Example: https://code.example.tld)

  • Uncheck Disable certificate verification (insecure)