How to install Collabora Online Community Edition (CODE) on a GandiCloud VPS

This page will show you how to install Collabora Online Community Edition on a GandiCloud VPS server.

What is CODE?

Collabora Online is a powerful online office suite, based on LibreOffice, which allows you to edit and manipulate popular document formats while also working in collaborative mode.

Collabora functionality is integrated as a plugin into several web tools including NextCloud, OwnCloud, and Moodle. These plugins act as a ‘client’ and must be connected to a server which has CODE installed. CODE stands for Collabora Online Community Edition and is the version of the software for this kind of use case.


There is a CODE BuiltIn plugin, but it is not recommended for production by publishers, and cannot be installed on a Gandi’s Web Hosting instance.

This tutorial will show you how to install CODE on a Gandi VPS. You can then connect this server to a NextCloud plugin, or any other service requiring a CODE server.


You will need to have a GandiCloud VPS. A VR-1 server will be sufficient, and you can always increase the size of the server later if needed.

In this tutorial, we will install CODE behind an Nginx reverse proxy which will enable CODE to connect via https. It is also possible to use Apache or to install it stand-alone (without a proxy server).

In this tutorial we will be installing CODE on a Debian system, though Debian is not required.

Initial Setup

To start, you will SSH into the server and update system packages and make sure cURL is installed.

apt update && sudo apt upgrade -y && sudo apt install curl -y

Install Nginx

Nginx will play the role of reverse proxy: it will receive incoming requests and relay them to the CODE server. The server will also manage the TLS connection.

The server will need a name defined at the system level and at the DNS level. In the following example we will use the name “”, which you should replace with your own name.

Replace “” in the existing line in /etc/hostname.

echo > /etc/hostname

Then, run the following command:


SSL certificate:

Here, you have three options: use a self-signed certificate, a Gandi certificate or a Let’s Encrypt certificate.

In this tutorial we will use a standard 3-month Let’s Encrypt certificate.

First, you will install `Certbot<>`_ using the following command:

apt install certbot

Then you will launch the generation of a certificate using the Nginx server. Again, don’t forget to replace “” with your domain name.

certbot certonly -d``

For the challenge choose option 2, “Place files in webroot directory (webroot)” and specify the default nginx root folder “/var/www/html”.

Configure vhost

It is assumed that the backend will be reachable on the default CODE port 9980.

Create the following file: /etc/nginx/sites-available/

Then in the file add the following:

server {
listen       443 ssl;

ssl_certificate /etc/letsencrypt/live/;
ssl_certificate_key /etc/letsencrypt/live/;

# static files
location ^~ /browser {
  proxy_set_header Host $http_host;

# WOPI discovery URL
location ^~ /hosting/discovery {
  proxy_set_header Host $http_host;

# Capabilities
location ^~ /hosting/capabilities {
  proxy_set_header Host $http_host;

# main websocket
location ~ ^/cool/(.*)/ws$ {
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "Upgrade";
  proxy_set_header Host $http_host;
  proxy_read_timeout 36000s;

# download, presentation and image upload
location ~ ^/(c|l)ool {
  proxy_set_header Host $http_host;

# Admin Console websocket
location ^~ /cool/adminws {
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "Upgrade";
  proxy_set_header Host $http_host;
  proxy_read_timeout 36000s;

Activate the ‘vhost’:

cd /etc/nginx/sites-enabled
ln -s /etc/nginx/sites-available/ /etc/nginx/

Then, you can test the validity of the syntax:

nginx -t

And restart the service:

systemctl restart nginx

Installing CODE Community Edition

In the following example we will use the repo for Debian 11. You can find repos for other Linux distros, as well as additional instructions, in `Corella's CODE setup guide<>`_.

Added repository:

To add the repository, first open the file /etc/apt/`sources.list.d/collaboraonline.sources.

vi /etc/apt/sources.list.d/collaboraonline.sources

Then add the following content to the file:

Types: deb
Suites: ./
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg

Installing packages

Next, install the packages coolwsd and code-brand.

apt update && apt install coolwsd code-brand

CODE Setup

Next, you will need enable logging.

Create the file /var/log/coolwsd.log and assign it the properties root:cool as well as the rights 770.

touch /var/log/coolwsd.log
chown root:cool /var/log/coolwsd.log
chmod 770 /var/log/coolwsd.log

Now you will disable SSL support.

In our example, the TLS connection is handled by Ngin. Therefore we must disable it in CODE because otherwise the server will not start as it will not be able to find the certificate files.

coolconfig set ssl.enable false

You will also want to specify that the reverse proxy manages SSL.

coolconfig set ssl.termination true

Next, enter the URL of your NextCloud installation. We have used “”, which you should replace with your own URL. Your NextCloud server must be reachable by https.

coolconfig set

You will then make sure your CODE server is not directly accessible.

coolconfig set net.proto ipv4
coolconfig set net.listen loopback

Now, you will define an admin account.

coolconfig set-admin-password

Last, you will then restart the service.

systemctl restart coolwsd

You can now connect to this interface with the following URL, being sure to replace “” with the name you used for your code server in earlier steps.


Configure your NextCloud:

Now that your CODE server is set up you can configure your NextCloud to use it.

To start, from the “administrator” account, go to the “applications” menu.

In the list of appplication categories choose “office automation”.

Install the “Nextcloud office” application.

Then, via the menu “administration settings” go to “edit preferences” and find “Nextcloud Office” in the administration section (not the personal section). Also check disable SSL certificate verification if you are using a self-signed certificate on your server.

Save the configuration. If the connection is working the a green check will appear showing that the server is validated.

You can then go and create a new document in your user folder. You should now see several new types of documents available including text document, spreadsheet, presentation, and diagram.