Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install Collabora Online on Ubuntu 20 for Nextcloud

Rumi, February 24, 2023

First, log in to your Ubuntu 20.04 server through SSH as the root user or any other user with sudo privileges:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the system user with sudo privileges.

You can check whether you have the proper Debian version installed on your server with the following command:

$ lsb_release -a

You should get this output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

$ sudo apt update -y
$ sudo apt upgrade -y

Install Collabora

In this article, we will show you how to install Collabora from the Ubuntu repository. This article assumes that you already have a working Nextcloud instance.

First, let’s install dependencies.

$ sudo apt install apt-transport-https ca-certificates

Next, we will add the Collabora Online official repository, let’s start this by importing the signing key.

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

Then, let’s create a package source file /etc/apt/sources.list.d/collaboraonline.sources

$ sudo nano /etc/apt/sources.list.d/collaboraonline.sources

Add the following contents to the file

Types: deb
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-ubuntu2004
Suites: ./
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg

Save the file then exit. Now, we need to download the package information from the newly added source above.

$ sudo apt update

Finally, we can install Collabora Online Development Edition by running the command below.

$ sudo apt install coolwsd code-brand

That’s it. Collabora Online Development Edition has been successfully installed on your Ubuntu 20.04 server.

Configure Collabora

By default, the Collabora Online Socket Daemon enables a TLS connection. So, upon installation, when checking the daemon status, it will return an error or it fails to start because the service is unable to locate the certificate file.

$ sudo systemctl status coolwsd

To get this fixed, we can disable TLS in coolwsd and enable the TLS termination at the reverse proxy.

$ sudo coolconfig set ssl.enable false
$ sudo coolconfig set ssl.termination true

Now, to allow connection from your Nextcloud service, we need to run this command.

$ sudo coolconfig set storage.wopi.host nextcloud.yourdomain.com

Please make sure you replace nextcloud.yourdomain.com with your actual domain/subdomain that hosts your Nextcloud.

The changes made by running the commands above will be written to /etc/coolwsd/coolwsd.xml.

To create an administrator user and its password, you can run this command

$ sudo coolconfig set-admin-password

The output will be like this:

Enter admin username [admin]:
Enter admin password:
Confirm admin password:
Saving configuration to : /etc/coolwsd/coolwsd.xml …
Saved

Every time you make changes to the /etc/coolwsd/coolwsd.xml file, you need to restart the Collabora daemon.

$ sudo systemctl restart coolwsd
$ sudo systemctl status coolwsd

As seen in the picture, the Collabora daemon is now running.

Configure Reverse Proxy using Apache

In this article, we will use Apache as the reverse proxy to Collabora. The connection between Nexcloud and Collabora should be established through a TLS enabled connection. To achieve this we will create an Apache virtual host and install an SSL certificate for it.

$ apt install apache2
$ sudo nano /etc/apache2/sites-available/collabora.yourdomain.com.conf

Then, insert the following into the file.

<VirtualHost *:80>
ServerName collabora.yourdomain.com
AllowEncodedSlashes NoDecode
ProxyPreserveHost On

# static html, js, images, etc. served from coolwsd
# browser is the client part of Collabora Online
ProxyPass /browser http://127.0.0.1:9980/browser retry=0
ProxyPassReverse /browser http://127.0.0.1:9980/browser

# 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 "/cool/(.*)/ws$" ws://127.0.0.1:9980/cool/$1/ws nocanon

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

# Download as, Fullscreen presentation and Image upload operations
ProxyPass /cool http://127.0.0.1:9980/cool
ProxyPassReverse /cool http://127.0.0.1:9980/cool

# Compatibility with integrations that use the /lool/convert-to endpoint
ProxyPass /lool http://127.0.0.1:9980/cool
ProxyPassReverse /lool http://127.0.0.1:9980/cool
</VirtualHost>

Replace collabora.yourdomain.com with your own domain or subdomain. Save the file and exit, then enable the virtual host.

$ sudo a2ensite collabora.yourdomain.com

Before running the command, make sure you replace collabora.yourdomain.com with the actual domain/subdomain you use to host Collabora.

Next, let’s enable some Apache modules to be able to proxy the traffic using Apache.

$ sudo a2enmod proxy proxy_http proxy_wstunnel

After making the changes above, we need to restart Apache

$ sudo systemctl restart apache2

Reboot the server.

Install SSL Certificate

We are going to install an SSL certificate for Collabora using the free SSL certificate from Lets Encrypt.

$ sudo apt install python3-certbot-apache

Once installed, you can run the command and follow the instruction to install an SSL certificate.

$ sudo certbot

Integrate Collabora with NextCloud

In your Nextcloud dashboard, click on your username on the top right, then click Settings

Under Administration on the left menu, click Nextcloud Office then tick ‘Use your own server’. In the blank field, type your Collabora Online URL then click the SAVE button.

In the advanced settings part, you can also use Office Open XML as the default format, this will make the files created in your Nextcloud compatible with Microsoft Office software.

That’s it. You can test the integration by creating a new file, for example, we can create a spreadsheet.

The new spreadsheet file will be opened, and we can start working on it.

Congratulations! You have successfully integrated Collabora Online with Nextcloud on Ubuntu 20.04.

Src: https://www.rosehosting.com/blog/how-to-integrate-collabora-online-with-nextcloud-on-ubuntu-20-04/

Administrations Collected Articles CollaboraNextcloudUbuntuUbuntu 20

Post navigation

Previous post
Next post

Comments (4)

  1. Peter says:
    May 18, 2023 at 3:21 am

    Should the following be reversed at the end of the process?

    $ sudo coolconfig set ssl.enable false
    $ sudo coolconfig set ssl.termination true

    Reply
    1. Rumi says:
      May 18, 2023 at 10:06 am

      What you mentioned could be applicable for the latest version, on my post edition that didn’t require.

      Reply
  2. Russel D Rainey says:
    November 5, 2023 at 12:06 am

    when i got to sudo systemctl restart apache2, i got job for apache2. service failed because the control process exited with error code. now nothing works cant get back into nextcloud what do i do

    Reply
  3. Pingback: Installation of Collabora on Debain 12 | Bots!

Leave a Reply to Peter Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes