Get Collabora running?

Hello,

I try to get Collabora running, together with Traefik and Docker. My docker-compose.yaml looks like

version: '3'

services:
  db:
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - [...]

  app:
    image: nextcloud
    depends_on:
      - db
    volumes:
      - nextcloud:/var/www/html
    restart: always
    environment:
       - TRUSTED_PROXIES=172.18.0.2
      - OVERWRITEPROTOCOL=https
      
    labels:
      - [...]
    networks:
      - traefik_proxy
      - default

  collabora:
    image: collabora/code
    ports:
      - 9980:9980
    cap_add:
      - MKNOD
    environment:
      - extra_params=--o:ssl.enable=false
      - username=[...]
      - password=[...]
      - domain=nc.domain.tld


volumes:
  nextcloud:
  db:

networks:
  traefik_proxy:
    external:
      name: traefik_proxy

I try using the included CODE development server, as well as the docker container. The result is always the same: I open a .docx file in the web interface (like Welcome to Nextcloud.docx), the main part of the screen goes white and nothing else happens. Also, the logs (container output) gives nothing useful.

The same happens, when I set up nextcloud to use my own Collabora sever with the URL http://nc.domain.tld:9980 with disabled certificate checking.

In any case, the settings say that the server is reachable.

It’s a fresh installation of Nextcloud 19.

What can be the problem here? Where else to look?

Thanks!

1 Like

Have you had any luck getting this to work? I’m running into similar issues.

@Horus107 @meonkeys Maybe that can help you (if you use php-fpm, & nginx):

have a look at the nginx.conf

and how to setup collabora:

if you have problems reading the ansible/jinja stuff you just run the playbook on a test server and inspect the resulting setup.

e.g.: grafik the domain dots needs to be quoted -> domain=nc\.domain\.tld (or double quoted, dont remember.)

Thanks. I got mine working, yay! After a bunch of trial and error I learned I needed to customize the file /etc/loolwsd/loolwsd.xml directly, following Unauthorized WOPI Host with Nextcloud 16 on custom port . I’m running Nextcloud from the official Docker image behind a Traefik reverse proxy.

This is the error I was seeing:

wsd-00007-00042 2020-08-11 18:28:49.866509 [ docbroker_001 ] ERR  No acceptable WOPI hosts found matching the target host [cloud.example.com] in config.| wsd/Storage.cpp:282
1 Like

Thanks for your tip :slight_smile:

For those who are looking for a simpler way with Docker and Traefik as a reverse proxy :
You can use the domain environment variable and set it to your nextcloud domain.

Docker-compose :

  collabora:
    image: collabora/code
    container_name: nextcloud_collabora
    ports:
      - "9980:9980"
    depends_on:
      - nextcloud
    cap_add:
     - MKNOD
    environment:
      - username=admin #This is used to access collabora admin panel : https://www.subdomain.domain.tld/loleaflet/dist/admin/admin.html
      - password=MyCollaboraAdminPassword
      # Domain the service should be accessed from:
      - domain=domain\\.tld
      - dictionaries=en fr
      # SSL terminates at the proxy (https://www.collaboraoffice.com/code/nginx-reverse-proxy/)
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
    labels:
      - traefik.enable=true
      - traefik.http.routers.collabora.entrypoints=https
      - traefik.http.routers.collabora.rule=Host(`collabora.domain.tld`)
      - traefik.http.routers.collabora.tls.certresolver=letsencrypt
    networks:
      - traefik_net
      - cloud_net
1 Like

Hello Quantino18,

Thanks for this docker-compose file !

I have two questions:

  • what do you indicate to nextcloud when filling in the collabora server name (and maybe port) ?
  • with this config, do you have access to the /loleaflet/dist/admin/admin.html URL ? since this is supposed to go through 443 and not 9980 ?