How to configure collabora CODE with docker

How to configure Collabora CODE with docker

This example will require Docker and a 101: reverse proxy for the CODE service.

  • Install Docker on host
  • Create a DNS for subdomain like office.mydomain.tld
  • Create a proxy host for http forwarding port 9980 on reverse proxy pointing to docker host and get the domain name encrypted.

Create and run docker Stack:

name: 'code'

services:
  collabora:
    image: collabora/code:latest
    container_name: collabora
    environment:
      - aliasgroup1=https://cloud.mydomain.tld:443,https://cloud\\.mydomain\\.tld:443 # enable for aliasgroup1
      # - aliasgroup2=https://cloud.otherdomain.tld:443,https://cloud\\.otherdomain\\.tld:443 # enable for aliasgroup2
      # - aliasgroup3=https://cloud.somedomain.tld:443,https://cloud\\.somedomain\\.tld:443 # enable for aliasgroup3
      - username=admin
      - password=********         # Replace with a strong password
      - dictionaries=en_GB,en_US,de_DE
      - extra_params=
      --o:ssl.enable=false 
      --o:ssl.termination=true
      --o:logging.level=warning
    ports:
      - "9980:9980"
    restart: always

TIP

WOPI is not necessary when defining client domains in aliasgroups:

  • - aliasgroup iterating 1,2,3 for multiple client domains.
    • be aware of the syntax when defining client domains using \\ as separator before .

options extra parameters

  • -extra_params=
    • --o:ssl.enable=false disabling ssl in coolswd/collabora
    • --o:ssl.termination=true forwarding http in reverse proxy handling ssl termination

dictionaries

  • - dictionaries add dictionaries comma separated en_US,en_GB,de_DE etc.

Collabora docker options (multiple nextcloud clients)

Each aliasgroup represents the allowed client domain, which will prevent unregistered clients from accessing the CODE service. Thus using aliasgroups resolves the issue of allowed WOPI client IP’s.

- aliasgroup1=https://cloud.mydomain.tld:443,https://cloud\\.mydomain\\.tld:443
## - aliasgroup2=https://cloud.otherdomain.tld:443,https://cloud\\.otherdomain\\.tld:443
## - aliasgroup3=https://cloud.somedomain.tld:443,https://cloud\\.somedomain\\.tld:443

TIP

be aware of the syntax when defining WOPI clients using \\ as separator before .

Collabora docker options

there are several options available:

- extra_params=
 --o:ssl.enable=false         # disable collabora/coolswd ssl termination
 --o:ssl.termination=true     # enable reverse proxy ssl termination
 --o:logging.level=warning    # loglevel
 --o:user_interface.mode=compact   # web ui view

see official docs for details:

Dictionaries

`- dictionaries` add dictionaries comma separated `en_US,en_GB,de_DE` etc.

Nextcloud Office Statistics and admin interface

https://office.mydomain.xyz/browser/dist/admin/admin.html

Reverse proxy

official Collabora reverse proxy settings for Nginx and Apache

Example NPM reverse proxy manager config example"

Be aware that you are forwarding http and Websockets support (WSS) only!

grafik