10 Collabora Integration
Birgit Becker edited this page 2021-12-07 11:33:03 +01:00

Collabora Integration

EGroupware allows to edit office files online via Collabora Online Office directly within EGroupware Filemanager app.

Installation

In a default package installation just add the egroupware-collabora-key package to your system. It installs Collabora Online Office in it's supported version via a Docker container.

After the package installation you have to log into EGroupware and go to Administration >> Application >> Collabora >> Site configuration and save the configuration page once, in order for it to write the correct Collabora configuration to /var/lib/egroupware/default/loolwsd/loolwsd.xml. Collabora container should restart automatically which can take 1-2 minutes!

It shows an Unsupported, the support-key is missing watermark, unless you buy a support-key from Collabora through EGroupware GmbH: https://www.egroupware.org/collabora-office/#order

You can also use Collaboras CODE container for development and testing purpose, by using collabora/code:latest as image name in your /etc/egroupware-collabora-key/docker-compose.yml. There are some restrictions in the number of concurrent users with CODE!

Troubleshooting

Administration >> Application >> Collabora >> Site configuration shows "Unable to load https://your.domain"

Try loading the address https://your.domain/hosting/discovery (replacing your.domain with your actual domain name). If it loads in your browser and shows a xml file, you have a problem with EGroupware server loading the file via it's (external) address from the Collabora container. This is most like a problem of your firewall not allowing your server to access itself via it's external address aka NAT reflection.

There are two ways to solve this:

1.) in Docker by telling it to use the internal IP address when accessing the external URL

There is a commented external_host setting in both EGroupware /etc/egroupware-docker/docker-compose.yml and Collabora /etc/egroupware-collabora-key/docker-compose.yml docker-compose file:

    #extra_hosts:
    #- "my.host.name:ip-address"

modify both to:

    extra_hosts:
    - "<your-domain>:172.17.0.1"

This writes your domain-name with the default IP of the docker0 bridge (172.17.0.1) in the /etc/hosts file of both container. Please verify that you actually use the Default IP (Docker Desktop for MacOS does not!). You can also use whatever internal IP your server uses.

Then restart both Docker container by running

cd /etc/egroupware-docker
docker-compose up -d
cd /etc/egroupware-collabora-key
docker-compose up -d

2.) with the correct configuration on your firewall allowing your server to access itself via it's external address

Out of scope of this article.

3.) Actions to convert editable files to PDF or PNG need some extra Settings - same is valid for the checkbox to merge file as PDF

This function from Collabora SDK API uses a different data access than usual when opening and saving documents from filemanager. Therefore, further configuration settings are usually necessary. However, it always depends on the environment and can be different. Please take care for a backup, before you change configurations! In case you need support, get in touch with us info@egroupware.org

Find out the EGroupware Docker Network:

docker network inspect egroupware-docker_default | grep Subnet
=>
“Subnet”: “172.19.0.0/16”,

In /var/lib/egroupware/loolwsd/loolwsd.xml

add under
<net desc="Network settings">

two lines:

<host desc="The IPv6 loopback (localhost) address.">172\.19\.[0-9]{1,3}\.[0-9]{1,3}</host>
<host desc="The IPv6 loopback (localhost) address.">::ffff:172\.19\.[0-9]{1,3}\.[0-9]{1,3}</host>

Add in /etc/egroupware-docker/docker-egroupware.override.yml

under

   environment:
configure

extra_hosts:
- "sub.domain.tld:172.17.0.1"

Collabora Docker container needs to be restarted.