Collabora Code Struggle

Hey everybody,

I spend days in the last half year to get my collabora code integration running again (it was working for some time already) but I have no idea anymore what I could change/try to make it work again. I read and tried everything available here in the forum and to find elsewhere but did not find a similar issue so far. My setup is docker based and I use ngnix as proxy. Has anybody an idea what I could consider changing / playing around with to get it work? Thanks a lot in advance!

In the NC admin setting I have the following settings and get a green status message.

Allow list for WOPI requests: 172.20.208.3
URL (and Port) of Collabora Online-server: https://office.domain.de

This is the error message I get then opening a file:

wsd-00001-00032 2025-04-11 17:36:39.970453 +0000 [ websrv_poll ] DBG  #30: Handling request: /browser/b7ba9a23ba/cool.html?WOPISrc=https%3A%2F%2Fcloud.domain.de%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F3277690_oco9egkqd5jp&lang=en&closebutton=1&revisionhistory=1, closeConnection true| wsd/ClientRequestDispatcher.cpp:700
wsd-00001-00032 2025-04-11 17:36:39.970533 +0000 [ websrv_poll ] ERR  #30: #30 Exception while processing incoming request: [POST /browser/b7ba9a23ba/cool.html?WOPISrc=https%3A%2F%2Fcl...]: Not found| wsd/ClientRequestDispatcher.cpp:959wopi%2Ffiles%2F3277690_oco9egkqd5jp&lang=en&closebutton=1&revisionhistory=1 HTTP/1.0

This is my docker-compose setting:

nextcloud-app:
    image: nextcloud:30-apache
    container_name: nextcloud-app
    restart: unless-stopped
    depends_on:
      - nextcloud-db
      - nextcloud-redis
    extra_hosts:
      - "office.domain.de=172.21.0.2"
    volumes:
      - ${PATH_DOCKERCOMPOSE}/app:/var/www/html
      - ${PATH_DOCKERCOMPOSE}/app-data:/var/www/html/data
      - ${PATH_DOCKERCOMPOSE}/php.ini:/usr/local/etc/php/conf.d/zzz-custom.ini
    networks:
      nextcloud_ngnix:
        aliases:
          - nextcloudapp
        ipv4_address: 172.21.0.3
      redis_nextcloud:
        ipv4_address: 172.20.0.4
      nextcloud:
        ipv4_address: 172.20.32.2
      nextcloud_postgres:
        ipv4_address: 172.20.96.3
      nextcloud_collabora:
        ipv4_address: 172.25.128.3
        
  collabora:
    image: collabora/code:latest
    container_name: nextcloud-collabora
    restart: unless-stopped
    networks:
      collabora_ngnix:
      nextcloud_collabora:
        ipv4_address: 172.25.128.2
    extra_hosts:
      - "cloud.domain.de:127.20.208.3"
    security_opt:
      - seccomp:unconfined
    cap_add:
      - MKNOD
      - SYS_CHROOT
      - FOWNER
    environment:
      - 'extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=debug --o:net.proto IPv4 --o:net.listen 127.0.0.1'
      - 'domain=domain.de'
      - 'dictionaries=en de'
      - 'server_name=office.domain.de'
      - 'username=${COLLABORA_USERNAME}'
      - 'password=${COLLABORA_PASSWORD}'
      - 'aliasgroup1=https://cloud.domain.de:443,https://cloud\\.domain\\.de:443'

And this is my ngnix setting:

server {
    listen 443 quic;
    listen [::]:443 quic;

    listen 443  ssl;
    listen [::]:443 ssl;
    server_name                     office.domain.de;

    ssl_certificate                 /etc/acme.sh/office.domain.de/fullchain.cer; 
    ssl_certificate_key             /etc/acme.sh/office.domain.de/office.domain.de.key;
    ssl_trusted_certificate	    /etc/acme.sh/office.domain.de/office.domain.de.cer;

    # Include global SSL settings
    include /etc/nginx/ssl.conf;

 # static files
 location ^~ /browser {
   proxy_pass http://nextcloud-collabora:9980;
   proxy_set_header Host $http_host;
 }


 # WOPI discovery URL
 location ^~ /hosting/discovery {
   proxy_pass http://nextcloud-collabora:9980;
   proxy_set_header Host $http_host;
 }


 # Capabilities
 location ^~ /hosting/capabilities {
   proxy_pass http://nextcloud-collabora:9980;
   proxy_set_header Host $http_host;
 }


 # main websocket
 location ~ ^/cool/(.*)/ws$ {
   proxy_pass http://nextcloud-collabora:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }


 # download, presentation and image upload
 location ~ ^/(c|l)ool {
   proxy_pass http://nextcloud-collabora:9980;
   proxy_set_header Host $http_host;
 }


 # Admin Console websocket
 location ^~ /cool/adminws {
   proxy_pass http://nextcloud-collabora:9980;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "Upgrade";
   proxy_set_header Host $http_host;
   proxy_read_timeout 36000s;
 }

    location / {
        proxy_pass http://nextcloud-collabora:9980;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $http_host;
        proxy_read_timeout 36000s;
    }

}

Hello @hanswerneralbrecht, welcome to the Nextcloud community! :handshake:

first of of all I recommend working through Collabora Integration guide and you will isolate and often solve 99% of integration issues.

from your config I’m wondering about all the ip addresses - I would recommend not doing so - all Docker Containers connected to a network can reach each other using DNS which is usually much easier. it looks you place postgres and redis in a separate network? this not related with the office error but adds complexity without a reason, I would recommend all services like redis, DB and notify_push run in the same “default” network.

maybe this one is not right:

for me one DNS record per aliasgroup works without quotes like - aliasgroup1=${NEXTCLOUD1} which is filled from .env file (but should wok directly as well.

depending on your setup your public IP might appear - I would recommend starting with “allow all” and monitor your logs. see topics tagged wopi_allowlist

Thanks a lot! Yes, I already went through your guide and did not find anything not functioning as expected. I guess I have to set up a parallel testing stack to see whats going on.

I just changed to the testing/demo collabora servers - no success as well.

Setting to “allow all” and the change to the alias group did not make it work sadly.

@hanswerneralbrecht you seem to have “coolswd” certified? so in the case your ‘environments’ should enable collabora SSL and disable reverse proxy termination…

  • extra_params=
    –o:ssl.enable=true # enable collabora/coolswd ssl termination
    –o:ssl.termination=false # disable reverse proxy ssl termination
1 Like

Mh, actually I guess no if you mean that I provide TLS certificates/keys to collabora itself. The TLS is handled by nginx and terminates there. Plain http behind the nginx proxy to collabora.

hello, there is indeed an issue when you use a reverse proxy / a load balancer, the error message you get in vague, if you somehow verify that your issue is the same it would be nice. If so, please add comment to the issue to raise priority. Cheers

1 Like

Thanks a lot for pointing to this setting. However, it did not resolve my issue.

This topic was automatically closed after 90 days. New replies are no longer allowed.