Collabora / Nextcloud office not working

I run the linuxserver/nextcloud Docker Container.
Collabora runs as a seperate Docker Container on the Same machine.

Collabora runs on a Subdomain e.g. collabora.mydomain.com
Nextcloud runs directly on mydomain.com

Both are accessible individually over https, i can also load the admin interface of Collabora, and when i enter the URL in Nextcloud Settings, it says everything is fine & Server is reachable.

But when i open a Document, im getting a Timeout…

I already thought about CORS or x-Frame-Options, but removing those from my Webserver Config did not help…

My Nginx Conf for Nextcloud and Collabora:

  server {
    listen 80;
    listen [::]:80;
    server_name mydomain.com;
    return 301 https://$server_name$request_uri;
  }


  server {
        listen 443 ssl;
        listen [::]:443 ssl;
        server_name mydomain.com;

        root /config/www;
        index index.html index.htm index.php;

        add_header X-Content-Type-Options "nosniff" always;

        include /config/nginx/ssl.conf;

        location / {
        proxy_pass https://local_server_ip:444/;
        proxy_max_temp_file_size 4096m;

        rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
        rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
        rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
        rewrite ^/.well-known/webfinger index.php/.well-known/webfinger;
        rewrite ^/.well-known/nodeinfo index.php/.well-known/nodeinfo;

        include /config/nginx/proxy.conf;
        }
  }

  server {
        listen 443 ssl;
        listen [::]:443 ssl;
        server_name collabora.mydomain.com;

    include /config/nginx/ssl.conf;

    location ^~ /browser {
        proxy_pass https://local_server_ip:9980;
        proxy_set_header Host $http_host;
    }

    # WOPI discovery URL
    location ^~ /hosting/discovery {
        proxy_pass https://local_server_ip:9980;
        proxy_set_header Host $http_host;
    }

    # Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass https://local_server_ip:9980;
        proxy_set_header Host $http_host;
    }

    # main websocket
    location ~ ^/cool/(.*)/ws$ {
        proxy_pass https://local_server_ip: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 https://local_server_ip:9980;
        proxy_set_header Host $http_host;
    }

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

please use the forum search there have been some comprehensive discussions shortly which address almost every issue:

1 Like

I read both of those.

I already ran Collabora on a Subdomain with proper Certificate in the past,
and this is still working now.
I checked it by calling
https://mysubdomain.com/hosting/discovery
https://mysubdomain.com/hosting/capabilities
Which is giving me back proper XMLs.

I also noticed the changed environment Variable for the Collabora container and changed it accordingly.

Also when i Enter the Collabora Adress in the NC Settings, it says its available.
But when loading a document it says: Nextcloud Office is not available. Please try again later.

So it might be sth else. But thanks for the suggestions :slight_smile:

NextCloud Office is not Collabora Office. NextCloud-Office is an app in Nextcloud.
In my Nextcloud I need to deactivate Nextcloud office to enable Collabora in the Nextcloud admin-settings.

Edit:
Text above was wrong: The opposite is correct:
You will need to disable Collabora to make Nextcloud-Office built in with richdocumentscode operational.
Sorry for the nonsense.

In nextcloud.log you will find the reason, why Netcloud office can not open the document. In many cases “richdocumentscode” is missing and needs to be installed in the Nextcloud docker-container.

1 Like

But Nextcloud Office is the Connector Plugin for Collabora isnt it?
If i disable it i dont have a Office or Collabora Option in the NC Settings.

I dont have richdocumentscode installed, because it doesnt work with the linuxserver/docker-nextcloud container.
Instead i have a separate Docker container with Collabora.

So maybe another Connector plugin comes with richdocumentscode…but technically it should be the same.

Sorry for the nonsense I posted above. - Did you checkt the content of nextcloud.log at the time, where you tried to open a document?

Did you configure the docker with collabora server with the correct address of the Nextcloud to permit its access?

Im passing the Environment Variable aliasgroup1 to the Collabora Container,
Content: https://mynextclouddomain.com:443
i also tried the “old” way with escaped dots: https://mynextclouddomain\\.com:443
and also tried the previosly used variable “domain”, Content: mynextclouddomain\\.com

About the Logs.
Browser Console:

Uncaught TypeError: e.data.startsWith is not a function
    onMessage https://collabora.mydomain.com/browser/d58a5e2/bundle.js:1
    handler https://collabora.mydomain.com/browser/d58a5e2/bundle.js:1
bundle.js:1:1890591
    onMessage https://collabora.mydomain.com/browser/d58a5e2/bundle.js:1
    handler https://collabora.mydomain.com/browser/d58a5e2/bundle.js:1


FAILED Office.vue:198
    loadingTimeout Office.vue:198

Nextcloud Log:
No Error…

Collabora Log:
Nothing…

I checked the Nexcloud Log in the Settings → Protocol though.
Maybe theres more in the Actual file, which i didnt find yet.
Ill change the LogLevel to Warning and try again. → still nothing…

Ok its getting weird,
i played around a bit again changing proxy_pass to http, which didnt work, the discovery resource wasnt available anymore. After changing it back to https (exactly like it was before!!!) now i can call collabora. WTF? :man_shrugging:

1 Like

You should test the behavior after a complete reboot, whether the system is running stable now or a manual correction still is needed.

1 Like

Seems to be fine after reboot… :slight_smile:

1 Like