Collabora + Nextcloud : Document loading failed

I have searched the forum for similar issues

on

This category is for general issues(=something is broken) regarding YunoHost, NOT apps.

on

This form is written in English but feel free to write in French if you’re more comfortable!

on

What type of hardware are you using

VPS bought online

What YunoHost version are you running

12.1.41.2

How are you able to access your server

SSH

Describe your issue

After a fresh install of the Collabora app, with its proper Nextcloud configuration, opening files led to a Document loading failed error with the message Unauthorized WOPI host. Please try again later and report to your administrator if the issue persists..

Share relevant logs or error messages

Oct 29 16:11:06 coolwsd[35045]: wsd-35045-35065 2026-10-29 16:11:06.805337 [ websrv_poll ] ERR #25: WOPI::CheckFileInfo returned 403 (Forbidden) Forbidden for URI [https://*****************/index.php/apps/richdocuments/wopi/files/30541_oc0cljwsm7sd?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxx&access_token_ttl=0]. Headers: Server: nginx / Date: Thu, 29 Oct 2026 16:11:06 GMT / Content-Type: application/json; charset=utf-8 / Content-Length: 2 / Connection: keep-alive / X-SSO-WAT: You’ve just been SSOed / Set-Cookie: oc0cljwsm7sd=b589999ada11f3d667260a649e0d9415; path=/cloud; secure; HttpOnly; SameSite=Lax / X-Request-Id: xft6YrBiTrfYey0UpSi6 / Cache-Control: no-cache, no-store, must-revalidate / Content-Security-Policy: upgrade-insecure-requests / Feature-Policy: autoplay ‘none’;camera ‘none’;fullscreen ‘none’;geolocation ‘none’;microphone ‘none’;payment ‘none’ / X-Robots-Tag: noindex, nofollow / X-Content-Type-Options: nosniff / X-XSS-Protection: 1; mode=block / X-Download-Options: noopen / X-Permitted-Cross-Domain-Policies: none / X-Frame-Options: SAMEORIGIN / Permissions-Policy: interest-cohort=() / Strict-Transport-Security: max-age=63072000; includeSubDomains; preload / Referrer-Policy: no-referrer Body: []|home/collabora/jenkins/workspace/package_code_26.04_rpm/rpmbuild/BUILD/coolwsd-26.04.5.2/wsd/wopi/CheckFileInfo.cpp:100

I could fix this by adding in /etc/coolwsd/coolwsd.xml, as first child of `<config><storage><wopi> ... </wopi></storage></config>` the following:

<alias_groups desc="default mode is 'first' it allows only the first host when groups are not defined. set mode to 'groups' and define group to allow multiple host and its aliases" mode="groups">
         <group>
            <host allow="true">https://mywebsite.net:443</host>
         </group>
</alias_groups>

As a bonus: Adding my IP to the “Allow list for WOPI requests” field in the Nextcloud admin settings didn’t work, instead I executed grep "richdocuments/wopi" /var/log/nginx/*access*.log | tail -5 to get the actual IP used with COOLWSD HTTP Agent when opening a document.

Thanks for the write-up, the grep on the nginx logs to find the real WOPI IP is a nice trick. Just keep in mind that a manual edit in /etc/coolwsd/coolwsd.xml may be overwritten when the Collabora app is upgraded, since YunoHost regenerates its config files. Worth keeping a note of the change, or checking after each upgrade.

Sorry,

Did you keep or remove the lines by default ?

        <wopi desc="Allow/deny wopi storage." allow="true">
            <host desc="Regex pattern of hostname to allow or deny." allow="true">__NEXTCLOUD_DOMAIN__</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">192\.168\.[0-9]{1,3}\.[0-9]{1,3}</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="false">192\.168\.1\.1</host>


            <max_file_size desc="Maximum document size in bytes to load. 0 for unlimited." type="uint">0</max_file_size>

            <locking desc="Locking settings">
                <refresh desc="How frequently we should re-acquire a lock with the storage server, in seconds (default 15 mins) or 0 for no refresh" type="int" default="900">900</refresh>
            </locking>
        </wopi>

I kept every other lines, based on the doc they should get ignored due to mode="groups".