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..
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.
<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>