Collabora Online Installation Guide
Collabora Online Installation Guide
Collabora Online Installation Guide
Installation Guide
Collabora Productivity
Version 2020-07-06
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 sales@collaboraoffice.com https://www.collaboraoffice.com
Collabora Online Installation Guide
Table of Contents
ChangeLog.............................................................................................................................................................................................................................. 3
Installation from packages...................................................................................................................................................................................... 5
What is $customer_hash in the Following Text..................................................................................................................... 5
How to Obtain $customer_hash if You are a Partner......................................................................................................... 5
The Installation Procedure.................................................................................................................................................................................. 5
Distro-specific Installation Instructions................................................................................................................................................ 5
Debian 8..................................................................................................................................................................................................................... 5
Debian 9..................................................................................................................................................................................................................... 6
Debian 10................................................................................................................................................................................................................... 6
Ubuntu 16.04.......................................................................................................................................................................................................... 6
Ubuntu 18.04........................................................................................................................................................................................................... 7
Ubuntu 20.04.......................................................................................................................................................................................................... 7
RHEL 7 / CentOS 7 (at least 7.2)............................................................................................................................................................... 7
RHEL 8 / CentOS 8............................................................................................................................................................................................. 8
SLES 12 / openSUSE Leap 42.3................................................................................................................................................................ 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
Fonts........................................................................................................................................................................................................................................... 11
Updating ‘systemplate’............................................................................................................................................................................................... 11
Configuration..................................................................................................................................................................................................................... 12
Network settings....................................................................................................................................................................................................... 12
SSL configuration..................................................................................................................................................................................................... 13
Security settings....................................................................................................................................................................................................... 14
Backend storage configurations................................................................................................................................................................. 14
Logging.............................................................................................................................................................................................................................. 14
Performance.................................................................................................................................................................................................................. 15
Allowed dictionary languages........................................................................................................................................................................ 15
Admin Console............................................................................................................................................................................................................ 15
Other settings.............................................................................................................................................................................................................. 16
Proxy settings.................................................................................................................................................................................................................... 16
Reverse proxy with Apache 2 webserver............................................................................................................................................... 16
Configure Collabora Online...................................................................................................................................................................... 16
Required Apache2 modules.................................................................................................................................................................... 16
Reverse proxy settings in Apache2 config (SSL).................................................................................................................... 17
Reverse proxy settings in Apache2 config (SSL termination)...................................................................................18
Reverse proxy with Nginx webserver........................................................................................................................................................ 19
Load balancing.......................................................................................................................................................................................................... 20
Load balancing example with HAProxy........................................................................................................................................ 20
Load balancing example with Nginx............................................................................................................................................... 21
robots.txt........................................................................................................................................................................................................................ 22
2
ChangeLog
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-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, Error:
Reference source not found, 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.
3
Collabora Online Installation Guide
Date Change
2018-09-12 Apache2 reverse proxy config for the SSL termination case
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
4
Installation from packages
Collabora Online
export customer_hash=Example-413539ece39485afc35b4a469adfde0a279d2fd2
Debian 8
Please type the following commands into the shell as root:
5
Collabora Online Installation Guide
Debian 9
Please type the following commands into the shell as root:
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:
6
Installation from packages
Ubuntu 18.04
Please type the following commands into the shell as root:
Ubuntu 20.04
Please type the following commands into the shell as root:
wget https://collaboraoffice.com/repos/CollaboraOnline/4.2/customer-centos7-
$customer_hash/repodata/repomd.xml.key && rpm --import repomd.xml.key
yum-config-manager --add-repo
https://collaboraoffice.com/repos/CollaboraOnline/4.2/customer-centos7-
$customer_hash
7
Collabora Online Installation Guide
RHEL 8 / CentOS 8
Please type the following commands into the shell as root:
wget https://collaboraoffice.com/repos/CollaboraOnline/4.2/customer-centos7-
$customer_hash/repodata/repomd.xml.key && rpm --import repomd.xml.key
yum-config-manager --add-repo
https://collaboraoffice.com/repos/CollaboraOnline/4.2/customer-centos8-
$customer_hash
wget https://collaboraoffice.com/repos/CollaboraOnline/4.2/customer-opensuse-
$customer_hash/repodata/repomd.xml.key && rpm --import repomd.xml.key
zypper ar 'http://download.opensuse.org/repositories/devel:/libraries:/c_c++/
openSUSE_Leap_42.3/devel:libraries:c_c++.repo'
wget https://collaboraoffice.com/repos/CollaboraOnline/4.2/customer-opensuse15-
$customer_hash/repodata/repomd.xml.key && rpm --import repomd.xml.key
zypper ar 'http://download.opensuse.org/repositories/devel:/libraries:/c_c++/
openSUSE_Leap_15.0/devel:libraries:c_c++.repo'
8
Installation from packages
How to upgrade
If you are upgrading from Collabora Online 4.0.x or earlier version, follow these steps:
3. Change the version number in the repository URL, e.g. from 4.0 to 4.2.
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. The repository is on GitHub.
https://github.com/CollaboraOnline/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.
Daemon mode:
10
Docker image
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.
11
Collabora Online Installation Guide
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 3 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
12
Configuration
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
13
Collabora Online Installation Guide
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, 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.
14
Configuration
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.
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:
15
Collabora Online Installation Guide
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.
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.
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
16
Proxy settings
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.)
########################################
########################################
AllowEncodedSlashes NoDecode
SSLProxyEngine On
ProxyPreserveHost On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
# Capabilities
# Main websocket
17
Collabora Online Installation Guide
########################################
########################################
AllowEncodedSlashes NoDecode
ProxyPreserveHost On
# Capabilities
# Main websocket
18
Proxy settings
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;
19
Collabora Online Installation Guide
proxy_read_timeout 36000s;
location ~ ^/lool {
proxy_pass https://127.0.0.1:9980;
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.
20
Proxy settings
frontend loolwsd
mode http
default_backend loolwsd
backend loolwsd
mode http
balance hdr(X-HAProxy-loolwsd)
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
21
Collabora Online Installation Guide
if ($scheme != "https") {
} # managed by Certbot
server_name loolwsd.public.example.com;
location / {
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.
22