Nextcloud Office: Document loading failed


After having installed CODE on Ubuntu Server 22.04 and trying following many tutorials, I’m now stuck at “Document loading failed” error when trying to edit a .odt file using Nextcloud Office.

I found a loads of tutorials concerning the deployment using Docker. I’m not using Docker for that one. Some other tutorials are using Nginx, I’m using Apache2 for that deployment.

The Nextcloud Office Setting section is showing a green check and “Collabora Online server is reachable”.

Additionally, when visiting http://office.domain.tld:9980/ which is my CODE server URL it display “OK” in my web browser.

What I could be wrong with my setup? I saw a lot more of similar cases. Lots of them has no resolution and lot more, as I say above, are using Docket, Nginx, etc. which not reflecting my current setup.

Warms regards,


There may be several reasons for this. You need to provide more information about your current installation and Nextcloud log.

Are you using self-signed certificate or Ca cert.

Did you setup a separate VirtualHost in Apache, containing the reverse proxy configuration for Collabora, like described here: Installation guide - Collabora Online in Nextcloud …or here: Proxy settings — SDK documentation ?

@guillaumesoucy , did you ever solve this? I am having a similar problem being being discussed in another thread.

Ubuntu:22.04 machine running nextcloud and collabora and that single machine is behind an nginx reverse proxy.


I’m just back from vacations. Will return to this issue shortly.



Let me find a link to a github issue where a temporary solution is delivered. The issue is fixed by creating the coolwsd as a service, that starts with the webserver and php-fpm. It is because the coolwsd is not running that you experience issues.


coolwsd is running:

systemctl status coolwsd
● coolwsd.service - Collabora Online WebSocket Daemon
     Loaded: loaded (/lib/systemd/system/coolwsd.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-02-15 01:45:57 EST; 10min ago
   Main PID: 2616 (coolwsd)
      Tasks: 3 (limit: 2237)
     Memory: 47.3M
        CPU: 2.133s
     CGroup: /system.slice/coolwsd.service
             └─2616 /usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd

To make things more simple I wish to give a try the Built-in CODE server but at the moment richdocuments is enabled, the web server get very slow, while the server load is at something like 0.04 .

If I could make it work with the build-in CODE server I would be better than nothing.

Also, richdocumentcode is installed on the server.



Everything went the right direction for me, with the built-in CODE server after I set it up as a service.
Yes it is loading a bit when I opens a document for editing, but besides that, my Nextcloud instance is not slower than usual.

I was talking about richdocuments who when enable make the instance very slow at a point it’s unusable.

What I should do? If I disable richdocuments, yes the instance will now run at normal speeds but it is not solving anything.

richdocumentscode is already installed but as I say, I can even try to edit a .odt document as the instance get very slow when richdocuments is enabled and it is even impossible to get through files or to perform anything else because of that.

richdocuments is nextcloud office, which is basically “just” integrating CODE in one shape or another, hence is dependant on the coorporation willingness of CODE.

But what should I do? I’m stuck.

Read the documentation of tuning NC office. Especially accessing the WOPI API. Head over to their github as well.
Unfortunately my own “expertise” in regards to this part of NC has reached it limits. :frowning:


Thank-you for your time

1 Like

I had the same problem today and I solved it.

My cause for this problem is that my browser can’t access to the CODE server. That is my CODE server is private and LAN only that not available from the internet.

To solve this problem, have the CODE server public accessible domain and IP address and formal SSL certificate.