Unauthorized WOPI host

hello,

I use this settings for my reverse Proxy https://icewind.nl/entry/collabora-online
with these settings I got this warning/error.

Unauthorized WOPI host

sudo systemctl restart docker

From the official installation page: https://nextcloud.com/collaboraonline/

Issue: I get connection errors when trying to open documents
Be sure to check the error log from docker (docker logs id-of-your-instance). If the logs note something like:
No acceptable WOPI hosts found matching the target host [YOUR NEXTCLOUD DOMAIN] in config.
Unauthorized WOPI host. Please try again later and report to your administrator if the issue persists.
you might have started the docker container with the wrong URL. Be sure to triplecheck that you start it with the URL of your Nextcloud server, not the server where Collabora Online runs on.

Yes indeed. I still reply to this topic, since it doesn’t give any example. Here you go:

docker run -t -d -p 127.0.0.1:9980:9980 -e "domain=cloud\\.yourdomain\\.org" -e "username=admin" -e "password=securepassword" --restart always --cap-add MKNOD collabora/code

Note: you need to double backlash the dots in your domain name as shown above.
Note #2: use the Nextcloud domain name, NOT the domain name where you run your Collabora online service on.

I want to add a solution in case you do not use the docker image, to save you some time that I already spent in figuring this out.
On the WOPI client (the external machine, where I installed loolwsd), I had to adjust the file /etc/loolwsd/loolwsd.xml to include a host entry for the domain or IP adress of your cloud installation, e.g.

<host desc="Allow cloud domain or IP" allow="true">cloud.example.com</host>

After this, restart loolwsd: # systemctl restart loolwsd

Now, it is working for me.

I’m not using the docker image as well. Where exactly in the file should I add this line ?

Thanks

EDIT : I solved my problem thanks to @randmin

I added both my nextcloud address and collabora server address in :

<storage desc="Backend storage">
        <filesystem allow="false" />
        <wopi desc="Allow/deny wopi storage. Mutually exclusive with webdav." allow="true">
            <host desc="Regex pattern of hostname to allow or deny." allow="true">localhost</host>
            <host desc="Regex pattern of hostname to allow or deny." allow="true">example.com</host>