Collabora Online Installation Guide
Collabora Online Installation Guide
Installation Guide
Collabora Productivity
Version 2021-05-30
Collabora Productivity Ltd. The Platinum Building, St John's Innovation Park, Cambridge, CB4 0DS, UK
Registered in England and Wales with company number 08644931
Telephone +44 (0)1223 362967 [email protected] https://www.collaboraoffice.com
Collabora Online Installation Guide
Table of Contents
ChangeLog.................................................................................................................................................4
Installation from packages..........................................................................................................................6
What is $customer_hash in the Following Text................................................................................6
How to Obtain $customer_hash if You are a Partner.......................................................................6
The Installation Procedure.....................................................................................................................6
Distro-specific Installation Instructions...................................................................................................6
Debian 9...........................................................................................................................................6
Debian 10.........................................................................................................................................7
Ubuntu 16.04....................................................................................................................................7
Ubuntu 18.04....................................................................................................................................7
Ubuntu 20.04....................................................................................................................................8
RHEL 7 / CentOS 7 (at least 7.2).....................................................................................................8
RHEL 8 / CentOS 8..........................................................................................................................8
SLES 15 / openSUSE Leap 15.x......................................................................................................8
How to upgrade......................................................................................................................................9
Localization.............................................................................................................................................9
Spelling dictionaries and thesauri...........................................................................................................9
Docker image...........................................................................................................................................10
Dockerfile..............................................................................................................................................10
Build Docker image..............................................................................................................................10
Create a container from the image and run it.......................................................................................10
Other optional environment variables that you can pass to collabora/online.................................10
Collabora Online for Kubernetes..............................................................................................................12
Helm chart for deploying Collabora Online in Kubernetes cluster.......................................................12
How to test this specific setup........................................................................................................12
Useful commands to check what is happening..............................................................................13
Notes..............................................................................................................................................13
Fonts.........................................................................................................................................................14
Updating ‘systemplate’.............................................................................................................................14
Configuration............................................................................................................................................15
User interface settings..........................................................................................................................15
Network settings...................................................................................................................................15
SSL configuration.................................................................................................................................16
Security settings...................................................................................................................................17
Backend storage configurations...........................................................................................................17
Logging.................................................................................................................................................17
Performance.........................................................................................................................................17
Allowed dictionary languages...............................................................................................................18
Admin Console.....................................................................................................................................18
Other settings.......................................................................................................................................18
Proxy settings...........................................................................................................................................19
Reverse proxy with Apache 2 webserver.............................................................................................19
Configure Collabora Online............................................................................................................19
Required Apache2 modules...........................................................................................................19
Reverse proxy settings in Apache2 config (SSL)...........................................................................19
Reverse proxy settings in Apache2 config (SSL termination)........................................................21
Reverse proxy with Nginx webserver...................................................................................................21
Load balancing.....................................................................................................................................23
Load balancing example with HAProxy..........................................................................................23
Load balancing example with Nginx...............................................................................................24
2
robots.txt...............................................................................................................................................25
3
Collabora Online Installation Guide
ChangeLog
Date Change
2016-07-22 Security warning: WOPI host and WOPI client (loolwsd) should not run on the same domain.
2016-08-05 Removed ownCloud section (moved to a separate document), switch to Collabora Office 5.1.
2016-09-26 Typo fixes in repo URLs, Apache2 reverse proxy setting update, HAProxy config update.
2016-11-15 Typo fixes. In Cent OS 7 section note that Cent OS 7.2 is required. In Apache2 reverse proxy section:
ProxyPreserveHost On.
2017-06-01 Removed unsupported openSUSE versions. Clarification: Docker is an alternative to packages. Mentioned
loolconfig for setting up secure password for the Admin Console.
2017-08-22 Added support for Debian 9, RHEL 6 / CentOS 6, and SLES11 SP4
2017-09-12 Added a chapter about installing fonts. Added a note about fonts to Docker chapter. Mentioned the trigger
that updates systemplate upon updating of other packages. Added a section about Nginx reverse proxy.
2017-09-22 Added "Other optional environment variables that you can pass to collabora/code" section.
2018-01-31 Collabora Online 3.0 released. New sections: Localization, Spelling dictionaries and thesauri, Hiba: A
hivatkozás forrása nem található, Allowed dictionary languages. Admin console authentication supports
PAM. SSL cipher list. IPv6 support.
2018-04-25 Document seccomp and capabilities security settings. Added a note about the necessity of using the same
version on all load balanced nodes. Ubuntu 18.04 is supported.
2018-09-12 Apache2 reverse proxy config for the SSL termination case
4
ChangeLog
Date Change
2019-02-14 Collabora Online 4.0 released. In repo URLs /3/ was changed to /4.2/.
Documented extra_params environment variable for Docker.
2019-02-28 Collabora Online 4.0.1 released. SLE 11 SP4 support is discontinued. New package repository for SLE 15 /
openSUSE 15.x
2019-05-20 Made WOPISrc-based load balancing in HAproxy/Nginx script the default, as it is supported since 2.1.4.
2020-06-08 Corrected command to update the systemplate for Collabora Online 4.2
2020-07-21 Removed unnecessary step from installation instructions concerning SUSE systems
5
Collabora Online Installation Guide
Collabora Online
export customer_hash=Example-413539ece39485afc35b4a469adfde0a279d2fd2
Debian 9
Please type the following commands into the shell as root:
6
Installation from packages
Debian 10
Please type the following commands into the shell as root:
Ubuntu 16.04
Please type the following commands into the shell as root:
Ubuntu 18.04
Please type the following commands into the shell as root:
7
Collabora Online Installation Guide
Ubuntu 20.04
Please type the following commands into the shell as root:
wget https://collaboraoffice.com/repos/CollaboraOnline/6.4/customer-centos7-
$customer_hash/repodata/repomd.xml.key && rpm --import repomd.xml.key
yum-config-manager --add-repo
https://collaboraoffice.com/repos/CollaboraOnline/6.4/customer-centos7-
$customer_hash
RHEL 8 / CentOS 8
Please type the following commands into the shell as root:
wget https://collaboraoffice.com/repos/CollaboraOnline/6.4/customer-centos7-
$customer_hash/repodata/repomd.xml.key && rpm --import repomd.xml.key
yum-config-manager --add-repo
https://collaboraoffice.com/repos/CollaboraOnline/6.4/customer-centos8-
$customer_hash
8
Installation from packages
wget https://collaboraoffice.com/repos/CollaboraOnline/6.4/customer-opensuse15-
$customer_hash/repodata/repomd.xml.key && rpm --import repomd.xml.key
How to upgrade
If you are upgrading from Collabora Online 4.2x or earlier version, follow these steps:
3. Change the version number in the repository URL, e.g. from 4.2 to 6.4.
Localization
For localization of tunnelled dialogs, you need to install Collabora Office language resources. They are
not direct dependencies of loolwsd. For example for German dialogs on Debian/Ubuntu:
9
Collabora Online Installation Guide
Docker image
As an alternative to native packages, Collabora Productivity provide scripts and Dockerfiles to create a
Collabora Online Docker image. You either need native packages, or the Docker image, not both!
Docker images can be created on demand from the latest version of Collabora Online and the
underlying system components. Please find everything in Collabora Online source code repository (on
GitHub).
https://github.com/CollaboraOnline/online/tree/master/docker
Dockerfile
The provided Dockerfile is a working sample. Feel free to add more packages to it, for example more
fonts, if you need them.
Note: for the faster jail creation via bind mount (with Collabora Online 6.4 and higher), you need to use
docker run command with the --privileged flag.
Daemon mode:
10
Docker image
may not deliver a correct host for the websocket connection in case of
a proxy in front of it.
By default only limited set of spelling dictionaries and thesauri are
configured for Collabora Online, mainly for performance reasons. The
default set of languages is the following: de_DE en_GB en_US es_ES
fr_FR it nl pt_BR pt_PT ru. With the dictionaries environment variable
dictionaries
you can change this list. The dictionaries environment variable should
contain the space separated list of language codes (optionally followed
by country code). In order to save resources, it makes sense to load
only those dictionaries that are actually needed.
You can pass extra loolwsd command line parameter via this
environment variable. For example, if you want to start loolwsd without
SSL, when you test or develop, the syntax is: -e "extra_params=--
extra_params
o:ssl.enable=false" . To learn about all possible options, refer to the
self-documented /etc/loolwsd/loolwsd.xml configuration file in the
Docker image.
11
Collabora Online Installation Guide
B) Each container port is mapped to a NodePort port via the Service object. To find those ports
kubectl get svc –namespace=haproxy-controller
Example output:
|----------------|---------|--------------|------------|------------------------------------------|
|NAME |TYPE |CLUSTER-IP |EXTERNAL-IP |PORT(S) |
|----------------|---------|--------------|------------|------------------------------------------|
|haproxy-ingress |NodePort |10.108.214.98 |<none> |80:30536/TCP,443:31821/TCP,1024:30480/TCP |
|----------------|---------|--------------|------------|------------------------------------------|
C) Now in this case to make our hostname available we have to add following line into
/etc/hosts:
192.168.0.106 loolwsd.public.example.com
12
Collabora Online for Kubernetes
HTTP/1.1 200 OK
last-modified: Tue, 18 May 2021 10:46:29
user-agent: LOOLWSD WOPI Agent 6.4.8
content-length: 2
content-type: text/plain
Example output:
NAME READY STATUS RESTARTS AGE
collabora-online-5fb4869564-dnzmk 1/1 Running 0 28h
collabora-online-5fb4869564-fb4cf 1/1 Running 0 28h
collabora-online-5fb4869564-wbrv2 1/1 Running 0 28h
What is the outside host that multiple loolwsd servers actually answering?
Example output:
|-----------|------------------|--------------------------|------------------------|-------|
| NAMESPACE | NAME | HOSTS | ADDRESS | PORTS |
|-----------|------------------|--------------------------|------------------------|-------|
| collabora | collabora-online |loolwsd.public.example.com| | 80 |
|-----------|------------------|--------------------------|------------------------|-------|
Notes
• If you wish to dive into advanced settings of kubernetes deployment feel free to update
values.yaml file to achieve that
• Don’t forget that you have to create the namespace (default is collabora) you specified in
collabora-online/values.yaml file
13
Collabora Online Installation Guide
Fonts
Collabora Online uses Collabora Office as its backend, which comes with a large variety of free fonts,
see the list below:
• Caladea and Carlito, which are metric-compatible with Cambria and Calibri
• Déja Vu
• Emoji One
• Gentium
• Karla
• Liberation Sans and Liberation Serif, which are metric-compatible with Arial and Times New
Roman
• Linux Libertine G
When you install loolwsd package, the post-install script will look for additional fonts on your system,
and install them for Collabora Online (in the systemplate). If you install fonts to your system after
installing loolwsd, you need to update the systemplate manually (see below).
Updating ‘systemplate’
Each document is isolated in its own chroot jail running its own instance of a LibreOfficeKit process,
and runs as a non-privileged ‘lool’ user. These chroot jails contain only the bare minimum of files
(libraries, fonts, etc.) needed for running Collabora Office (LibreOfficeKit). The template of the jails is
called ‘systemplate’, it is located at /opt/lool/systemplate, and it is generated after installation of the
loolwsd package. The systemplate is also re-generated after installing updates of packages that are in
use in systemplate (on RPM based systems) or after a successful apt update (on DEB based systems).
However, it is possible that the user wants to build systemplate manually, for example when new fonts
are installed, or a security update of system libraries is deployed by other means. Perform the following
command as root user.
14
Updating ‘systemplate’
Configuration
The postinstall script of loolwsd package added a non-privileged user to the system: lool. Collabora
Online service will be run by lool user. Also the service was registered to systemd, enabled on system
start and started. Useful commands:
Collabora Online has to be configured before use. Most of the options have sensible defaults.
Collabora online has layered configuration, which means that settings are read from
/etc/loolwsd/loolwsd.xml but can be overridden by command line switches (for example in systemd’s
loolwsd.service file). By using --o:name=value the setting called 'name' can be replaced by 'value'. For
example: --o:per_document.max_concurrency=12 . This will override the max_concurrency to 12,
regardless of what the XML has set.
Default configuration entries and values are set before loading the configuration file from disk. This
ensures that an upgrade to the server with new configuration entries will not break the server when the
XML is not upgraded, rather, the server will fallback to the defaults when it fails to find the entry in the
XML.
Network settings
Collabora Online can use IPv4, IPv6 or both. By default it uses both. See the net.proto setting config
file.
From version 3.4 loolwsd server can bind to localhost only, which makes sense, when it is used behind
a reverse proxy. The corresponding setting is net.listen .
From version 3.4 it is possible to use a different service root than the toplevel. If the rules of your
organization do not permit running services in the root, you can use a subpath for it, like
https://example.org/IT/CollaboraOnline by setting /IT/CollaboraOnline as the net.service_root in the
configuration file.
15
Collabora Online Installation Guide
SSL configuration
Collabora Online uses WOPI protocol, which mandates SSL. However, it is possible to run Collabora
Online server without SSL, it is configurable. Basically there are 3 modes:
1. SSL
2. SSL termination
3. No SSL
When SSL is enabled, in /etc/loolwsd/loolwsd.xml the path to SSL key, SSL certificate and SSL CA
certificate has to be given in the ssl block. This also implies that it is recommended to run loolwsd from
a server which name is in DNS (e.g. hostname.example.com), and it has proper SSL certificate. Restart
loolwsd, check the status of the service, and if it is running, you can try if you can connect to it via SSL:
curl -v https://hostname.example.com:9980/hosting/discovery
For testing purposes it is OK to use self signed certificates. Since Collabora Online 2.1 we no longer
ship self signed certificate for localhost, for security reasons. You can create the necessary files
yourself. The following example creates a certificate for hostname.example.com by a newly created
dummy certificate authority. The resulting .pem files are copied to default configuration directory of
loolwsd.
mkdir -p /opt/ssl/
cd /opt/ssl/
mkdir -p certs/ca
openssl req -x509 -new -nodes -key certs/ca/root.key.pem -days 9131 -out
certs/ca/root.crt.pem -subj "/C=DE/ST=BW/L=Stuttgart/O=Dummy
Authority/CN=Dummy Authority"
mkdir -p certs/{servers,tmp}
mkdir -p "certs/servers/hostname.example.com"
mv certs/servers/hostname.example.com/privkey.pem /etc/loolwsd/key.pem
mv certs/servers/hostname.example.com/cert.pem /etc/loolwsd/cert.pem
mv certs/ca/root.crt.pem /etc/loolwsd/ca-chain.cert.pem
The SSL termination option in the config file enables integration of Collabora Online with SSL
termination proxies, which handle incoming SSL connections, decrypt the SSL and pass on the
unencrypted request to the server. In this setup only the proxy server has to have proper SSL settings,
16
Configuration
Collabora Online server is hidden behind it, and Collabora Online communicates unencrypted with the
proxy.
If you set both enable and termination settings to false in /etc/loolwsd/loolwsd.xml , then Collabora
Online can be used in a HTTP-only environment, without encryption between browser and server. It is
not recommended to use Collabora Online in this mode, but for testing only it is OK.
You can set the list of accepted SSL ciphers with the cipher_list setting. The default cipher list is: ALL:!
ADH:!LOW:!EXP:!MD5:@STRENGTH .
Security settings
In Collabora Online 3.2 and higher, security settings are configurable due to popular demand. It is
allowed running without seccomp and capabilities. There are some significant security trade-offs here
which are now at least configurable. It is recommended to use the defaults. See the security section in
/etc/loolwsd/loowsd.xml .
File system storage is disabled by default, and should not be used in production environment. It is
insecure by nature, because it serves any file that the lool user can read from the local file system,
including /etc/loolwsd/loolwsd.xml, /etc/passwd and so on. It can be used for testing only. To enable:
or
WOPI on the other hand is the recommended backend storage. WOPI is Web Application Open
Platform Interface, a protocol based on open standard for remote document access with authentication.
Collabora Online accepts connection requests only from trusted WOPI hosts. The administrator has to
list the host names and/or IP addresses of these trusted WOPI hosts in the storage.wopi block. Please
note that connection requests from the same machine are always accepted.
Logging
See the <logging> section in /etc/loolwsd/loolwsd.xml . Set the log level and verbosity to one of: none
(turns off logging), fatal, critical, error, warning, notice, information, debug, trace. The default log level is
warning. If <color> is set to true, then loolwsd will generate logging information containing console color
codes. It is possible to redirect logs to a file. The trace file defined in <trace> section provides extra
debug information.
Performance
There are two performance related settings.
One is num_prespawn_children. It is the number of child processes to keep started in advance and
waiting for new clients. More prespawn children consume more memory, but server answers more
quickly to requests under load. The default is 1.
The other is per_document.max_concurrency which limits the number of threads to use while
processing a document. The default here is 4.
17
Collabora Online Installation Guide
This list is controlled by the allowed_languages setting, you can add or remove language tags as
needed.
Admin Console
You can do live monitoring of all the user sessions running on Collabora Online instance. The Admin
Console URL is: https://hostname:port/loleaflet/dist/admin/admin.html
Port is 9980 by default. It will ask for username and password which is set in the admin_console block
of /etc/loolwsd/loolwsd.xml or by --o:admin_console.username=username and
--o:admin_console.password=password in loolwsd command line. You must set username and
password. Admin Console is disabled if either of these are not set.
Note: in loolwsd 2.1.2 and higher it is possible to set up a password that is stored as salted hash in the
config file, instead of plain text. This is the recommended way to set up password for the Admin
Console. Use the loolconfig utility.
Note: in loolwsd 3.0 and higher there is support for authentication with PAM, if it is set up for loolwsd in
the system. For example, with a simple /etc/pam.d/loolwsd config below, the user which runs loolwsd
('lool' in production environment) can login to admin console with normal linux password.
After entering the correct password you should be able to monitor the live documents opened, total
users, memory consumption, document URLs with number of users viewing that document etc. You can
also kill the documents directly from the panel which would result in closing the socket connection to the
respective document.
The admin-console front-end presents and fetches its data via a defined web socket protocol, which
can be used to collect information programatically to integrate with other monitoring and control
solutions. For the websocket protocol details of Admin Console, see the Admin Console section in the
protocol documentation:
https://cgit.freedesktop.org/libreoffice/online/tree/loleaflet/README and
https://cgit.freedesktop.org/libreoffice/online/tree/wsd/protocol.txt.
It is simple to subscribe to receive client notifications, query the open documents and change server
settings.
Other settings
See /etc/loolwsd/loolwsd.xml for other settings, everything is documented there.
18
Proxy settings
Proxy settings
Server part of Collabora Online (loolwsd daemon) is listening on port 9980 by default, and clients
should be able to communicate with it through port 9980. Sometimes it is not possible, for example a
corporate firewall can allow only ports of well known services, such as port 80 (HTTP) and port 443
(HTTPS). The loolwsd daemon is configurable. It can use other ports than 9980. Port can be set by the
command line option --port1 . However we cannot use for example port 443, when a web server is
running on the same server, which is already bound to port 443. Reverse proxy setup is also required,
when you would like to setup load balancing.
On CentOS / RHEL there is no a2enmod available. Enabling the modules has to be done by adjusting
a config file and add the LoadModule oneself. (See here.)
########################################
########################################
1 If you want to bind to a privileged port (below 1024), you need to add the following capability:
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/loolwsd
19
Collabora Online Installation Guide
AllowEncodedSlashes NoDecode
SSLProxyEngine On
ProxyPreserveHost On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
# Capabilities
# Main websocket
20
Proxy settings
########################################
########################################
AllowEncodedSlashes NoDecode
ProxyPreserveHost On
# Capabilities
# Main websocket
21
Collabora Online Installation Guide
server {
server_name collaboraonline.example.com;
ssl_certificate /path/to/certficate;
ssl_certificate_key /path/to/key;
# static files
location ^~ /loleaflet {
proxy_pass https://127.0.0.1:9980;
location ^~ /hosting/discovery {
proxy_pass https://127.0.0.1:9980;
# Capabilities
location ^~ /hosting/capabilities {
proxy_pass https://127.0.0.1:9980;
# main websocket
location ~ ^/lool/(.*)/ws$ {
proxy_pass https://127.0.0.1:9980;
proxy_read_timeout 36000s;
location ~ ^/lool {
proxy_pass https://127.0.0.1:9980;
22
Proxy settings
location ^~ /lool/adminws {
proxy_pass https://127.0.0.1:9980;
proxy_read_timeout 36000s;
Load balancing
In order for Collaborative Editing to function correctly, it is vital to ensure that all users editing the same
document end up being served by the same Collabora Office instance. Using the WOPI protocol, the
https URL includes a unique identifier (WOPISrc) for use with this document. Thus load balancing can
be done by using WOPISrc – ensuring that all URLs that contain the same WOPISrc are sent to the
same Collabora Office instance.
Note: All load balanced nodes must run the same version of Collabora Online. Currently it is not
possible to run different versions on different nodes, e.g. upgrade Collabora Online on one node, and
leave the old version on another node. The WOPI discovery.xml served by Collabora Online through the
load balancer contains version specific URLs.
The browser reaches the proxy with HTTPS protocol. The proxy terminates the HTTPS connection and
passes traffic to backends via HTTP. Therefore in Collabora Online’s config file, in
/etc/loolwsd/loolwsd.xml , or in the command line which starts loolwsd daemon, SSL should be
disabled, and SSL termination should be enabled.
frontend loolwsd
mode http
default_backend loolwsd
backend loolwsd
23
Collabora Online Installation Guide
mode http
hash-type consistent
upstream loolwsd {
hash $arg_WOPISrc;
server loolwsd1.private:9980;
server loolwsd2.private:9980;
server {
listen 80 default_server;
ssl_certificate /etc/letsencrypt/live/1b255632-ce4b-4581-9e80-
16f701c27034.pub.cloud.scaleway.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/1b255632-ce4b-4581-9e80-
16f701c27034.pub.cloud.scaleway.com/privkey.pem; # managed by Certbot
if ($scheme != "https") {
} # managed by Certbot
server_name loolwsd.public.example.com;
location / {
24
Proxy settings
proxy_pass http://loolwsd;
proxy_http_version 1.1;
client_max_body_size 0;
robots.txt
When you use Collabora Online behind a reverse proxy, add Disallow: /loleaflet/* to your robots.txt file.
25