Failed loading of Nextcloud Documents - please try again later
And in the nextcloud logs, I get :
file_put_contents(/data/appdata_ocovvsbh7svp/preview/c/2/f/f/7/6/9/189003/817-1057-max.png): Failed to open stream: No such file or directory at /app/www/public/lib/private/Files/Storage/Local.php#302
Although the CODE admin panel works (code.my.tld//browser/dist/admin/admin.html), Nextcloud Office may still fail to integrate properly if:
Traefik is misrouting discovery or websocket paths
SSL termination is not properly communicated
The domain variable is not correctly set
Let’s double-check a few things:
domain env var
Your CODE container uses:
- domain=cloud\\.my\.tld
That’s the correct escaped version. You could also try without the escape (just to rule it out):
- domain=cloud.my.tld
Also: make sure you’re not using both VIRTUAL_HOST and traefik.* labels at the same time unless you’re using a helper like docker-gen — otherwise they can conflict.
CODE logs
Check the CODE container logs during a document open attempt:
docker logs -f <code_container_name>
You’re looking for anything like:
wsd-00000-... GET /hosting/discovery ... 404
Can CODE be reached from Nextcloud?
Enter the Nextcloud container and try:
curl -k https://code.my.tld/hosting/discovery
You should get a big XML back.
If that doesn’t work, check:
Traefik’s routing
DNS resolution (inside the container, make sure code.my.tld resolves)
The CODE container is really listening on port 9980 and receiving TLS-terminated traffic (which seems to be the case)
Tried with and without escaping, same result. We are agreeing that this variable should contain the Nextcloud host, right? Not the CODE one?
Removed the VIRTUAL_HOST env, same result
No 404. This is all I get when trying to open a document :
code-1 | wsd-00001-00018 2025-04-10 15:37:09.013131 +0200 [ asyncdns ] WRN Waking up dead poll thread [main], started: false, finished: false| net/Socket.hpp:826
code-1 | wsd-00001-00001 2025-04-10 15:37:09.013169 +0200 [ coolwsd ] WRN Waking up dead poll thread [main], started: false, finished: false| net/Socket.hpp:826
code-1 | frk-00020-00041 2025-04-10 15:37:10.023400 +0200 [ subforkit_001 ] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/passwd] is out-of-date. Will have to clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:587
code-1 | frk-00020-00041 2025-04-10 15:37:10.026691 +0200 [ subforkit_001 ] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/passwd] is out-of-date. Will have to clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:587
code-1 | frk-00020-00041 2025-04-10 15:37:10.029804 +0200 [ subforkit_001 ] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/passwd] is out-of-date. Will have to clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:587
code-1 | frk-00020-00041 2025-04-10 15:37:10.032669 +0200 [ subforkit_001 ] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/passwd] is out-of-date. Will have to clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:587
code-1 | frk-00020-00041 2025-04-10 15:37:10.035860 +0200 [ subforkit_001 ] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/passwd] is out-of-date. Will have to clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:587
Yep that works, I can get it from inside my nextcloud container.
Lucky I found this thread. I am in the same boat, trying to get Collabora to work with my Nextcloud for two days now.
My set-up is differnet, though:
Traefik is set-up in a DMZ vLAN and is correctly working to serve my NextCloud and other services
Nextcloud is not running in a container but in my backend vlan
Collabora/CODE is also ruinning in the DMZ Docker construction behind traefik
My Nextcloud and Collabora (CODE) can also see each other and talk to each other (mostly .. .see below). Also my CODE Admin Page is accessible.
When I try to create/open an office document in NextCloud I can see a lot of movement in the Collabora Docker Container (on debug) which finally stops with
CheckFileInfo request is in progress. Will resume when done| wsd/RequestVettingStation.cpp:319
It will then wait (while NexctCloud shows spinning icon) and go into a timeout (60 s) leaving me with (sensitive data reducted)
CheckTimeout: Timeout while requesting [GET nextcloud.<mydomain>/index.php/apps/richdocuments/wopi/files/<...>&access_token_ttl=0] after 64101ms| net/HttpRequest.hpp:1773
WOPI::CheckFileInfo failed for URI [https://nextcloud.<mydomain>/index.php/apps/richdocuments/wopi/files/<...>&access_token_ttl=0]: 0 (Unknown) . Headers: Body: []| wsd/wopi/CheckFileInfo.cpp:100
Invalid URI or access denied to [https://nextcloud.<mydomain>/index.php/apps/richdocuments/wopi/files/<...>&access_token_ttl=0]| wsd/wopi/CheckFileInfo.cpp:118
SslStreamSocket::shutdownConnection() #31| net/SslSocket.hpp:136
Closed socket Socket[#31, IPv4 @ :0]| net/Socket.hpp:171
I checked Firewall and opened everything for tests and I can actually curl the URI in question from within the collabora docker container. This curl is then waiting what seems indefinitely after having received the Inital Documetns meta data … I have to ctrl-.c to stop the curl.
All in all something is blocking or not “fully” allowing the call back from Collabora to NextCloud. Any ideas? Maybe on the Nextcloud side of thing, which shows nothing enlightening in the logs?