Collabora on owncloud is not loading

Hello
I have set up Collabora on linux running on Docker. Here is docker composer file

services:

  collabora:
    image: collabora/code
    container_name: collabora
    hostname: collabora
    restart: unless-stopped
    environment:
      TZ: "Europe/Berlin"
      aliasgroup1: https://cloud.mysite.com:443
      DONT_GEN_SSL_CERT: 1
      dictionaries: en 
      domain: cloud\\.mysite\\.com
    ports:
      - 9980:9980
    extra_hosts:
      cloud.mysite.com: 192.168.1.99
    cap_add:
      - MKNOD
    volumes:
      - /etc/letsencrypt/live/cloud.mysite.com/fullchain.pem:/etc/coolwsd/ca-chain.cert.pem
      - /etc/letsencrypt/live/cloud.mysite.com/privkey.pem:/etc/coolwsd/key.pem
      - /etc/letsencrypt/live/cloud.mysite.com/fullchain.pem:/etc/coolwsd/cert.pem

Docker container is running ok and https request on port 9980 are being responded with ok
But when trying to open a document it starts loading infinitely and nothing happens
Here are logs from docker container

ERR  Failed to get the realpath of [/opt/cool/child-roots/1-17b76481/tmp/sharedpresets/template] (ENOENT: No such file or directory)| common/FileUtil-unix.cpp:63
kit-00024-00024 2025-06-20 07:56:02.892160 +0300 [ kit_spare_002 ] ERR  linkOrCopy: nftw() failed for '/opt/cool/child-roots/1-17b76481/tmp/sharedpresets/template'| kit/Kit.cpp:612
kit-00025-00025 2025-06-20 07:56:02.893959 +0300 [ kit_spare_003 ] ERR  Failed to get the realpath of [/opt/cool/child-roots/1-17b76481/tmp/sharedpresets/template] (ENOENT: No such file or directory)| common/FileUtil-unix.cpp:63
kit-00025-00025 2025-06-20 07:56:02.894060 +0300 [ kit_spare_003 ] ERR  linkOrCopy: nftw() failed for '/opt/cool/child-roots/1-17b76481/tmp/sharedpresets/template'| kit/Kit.cpp:612
kit-00026-00026 2025-06-20 07:56:02.922273 +0300 [ kit_spare_004 ] ERR  Failed to get the realpath of [/opt/cool/child-roots/1-17b76481/tmp/sharedpresets/template] (ENOENT: No such file or directory)| common/FileUtil-unix.cpp:63
kit-00026-00026 2025-06-20 07:56:02.922371 +0300 [ kit_spare_004 ] ERR  linkOrCopy: nftw() failed for '/opt/cool/child-roots/1-17b76481/tmp/sharedpresets/template'| kit/Kit.cpp:612

What should I do?

Thanks for sharing the details. Based on the log messages and your setup, you’re encountering this issue:

ERR linkOrCopy: nftw() failed for '/opt/cool/child-roots/.../tmp/sharedpresets/template'

This indicates that Collabora is trying to link or copy from a missing path, specifically:

/opt/cool/child-roots/.../tmp/sharedpresets/template

This is usually related to missing template files or misconfigured paths inside the container, which can prevent documents from opening. Here’s how to proceed step-by-step:


1. Check for Volume Issues or Missing Files

Make sure the Collabora image isn’t missing internal files due to:

  • A corrupted image
  • Incomplete startup
  • Improper permissions
  • Mount conflicts

Run a shell inside the container and inspect the directory:

docker exec -it collabora bash
ls -la /opt/cool/loolwsd
ls -la /opt/cool/child-roots

Also check:

find /opt/cool -type d -name sharedpresets

If sharedpresets/template is missing inside the container, it’s likely an image problem. You can fix that by pulling a fresh image:

docker pull collabora/code
docker stop collabora
docker rm collabora
docker-compose up -d

2. Ensure Required Packages and Template Files Exist

The sharedpresets/template directory should be populated at build-time. If it’s missing, it can point to:

  • Incorrect permissions in /opt/cool
  • Uninitialized child-roots, which can happen if the container was interrupted

You can recreate the child-root manually:

cd /opt/cool
./coolforkit --losubpath=1 --systemplate=/opt/cool/systemplate --copy --chroot

This simulates what coolwsd normally does at runtime.


3. Check File Permissions

Ensure the files under /opt/cool and /opt/cool/child-roots/ are owned by the correct user (cool or whatever UID is expected in the container).

If not, you can reset permissions:

chown -R cool:cool /opt/cool

4. Try a Minimal Configuration

Simplify your Docker Compose temporarily to test:

collabora:
  image: collabora/code:latest
  container_name: collabora
  restart: unless-stopped
  environment:
    - domain=cloud\\.mysite\\.com
    - aliasgroup1=https://cloud.mysite.com:443
    - DONT_GEN_SSL_CERT=1
  ports:
    - 9980:9980

Then:

docker-compose down
docker-compose pull
docker-compose up -d

5. Verify Reverse Proxy (if using OwnCloud via HTTPS)

If the container responds to https://cloud.mysite.com:9980/hosting/discovery correctly, but documents fail to open, the issue might also lie in:

  • CSP errors (check browser DevTools Console)
  • Incorrect aliasgroup1 or domain
  • Mixed content (HTTPS ↔ HTTP)
  • Firewall blocking outbound document requests

Make sure https://cloud.mysite.com/loleaflet/... loads successfully in your browser.

If the problem persists, please share:

  • Output of ls -la /opt/cool/child-roots inside the container
  • Version of collabora/code image (docker inspect)
  • A screenshot or log of the browser console when opening a document

Thank you for answering
I’ve done everything step by step

  1. Run a shell inside the container and inspect the directory:
docker exec -it collabora bash
ls -la /opt/cool/loolwsd
ls -la /opt/cool/child-roots

Result is that for /opt/cool/loolwsd

Directory not found

For ls -la /opt/cool/child-roots there are some files
2. Ensure Required Packages and Template Files Exist

sharedpresets/template

Is present
3. Check File Permissions
File is owned by cool user
4. Try a Minimal Configuration
Have simplified docker-conteiner accrding to your instructions and started it. Result of docker logs

TRC  Pre-read 14 file(s) from directory: /usr/share/coolwsd/browser/dist: cool-help.html wasm.html branding.css admin-bundle.js bundle.css branding-mobile.css bundle.js branding-tablet.css device-mobile.css cool.html global.js device-desktop.css device-tablet.css branding.js | wsd/FileServer.cpp:1352
Failed to initialize COOLWSD: File not found: /etc/coolwsd/ca-chain.cert.pem
wsd-00001-00001 2025-06-23 05:18:40.579724 +0000 [ coolwsd ] DBG  Created wakeup FDs for SocketPoll [websrv_poll], rfd: 4, wfd: 5| net/Socket.cpp:873
wsd-00001-00001 2025-06-23 05:18:40.579757 +0000 [ coolwsd ] DBG  New SocketPoll[this 0x986d6c0, thread[name websrv_poll, id[owner 0x7f5d2e2ce880, caller 0x7f5d2e2ce880]]]| net/Socket.cpp:338
wsd-00001-00001 2025-06-23 05:18:40.579933 +0000 [ coolwsd ] TRC  Initialize StorageConnectionManager| wsd/COOLWSD.cpp:2183
wsd-00001-00001 2025-06-23 05:18:40.581514 +0000 [ coolwsd ] FTL  Failed to initialize COOLWSD: File not found: /etc/coolwsd/ca-chain.cert.pem| wsd/COOLWSD.hpp:263
File not found: /etc/coolwsd/ca-chain.cert.pem
wsd-00001-00010 2025-06-23 05:18:40.580131 +0000 [ asyncdns ] INF  Thread 10 (7f5d2deee6c0) of process 1 formerly unnamed is now called [asyncdns]| common/Util.cpp:297
<shutdown>-00001 2025-06-23 05:18:40.582495 +0000 [ coolwsd ] SIG   Fatal signal received: SIGABRT code: 18446744073709551610 for address: 0x3e900000001

Here seem to be no errors
But server seems not to recognise collabora at all because it was started without ssl ceritficat but my owncloud is started with ssl and it does not recognize it at all. By url cloud.mysite.com:9980 it is not loading it all

  1. Verify Reverse Proxy (if using OwnCloud via HTTPS)
    Server is responsing to https://cloud.mysite.com:9980/hosting/discovery but document faild to open
https://cloud.mysite.com/loleaflet/...

is not opening at all nor

https://cloud.mysite.com/loleaflet

Here are my output of ls -la /opt/cool/child-roots

drwxr-xr-x 3 cool cool 4096 Jun 20 01:39 .
drwxr-xr-x 7  988  988 4096 Jun 20 01:39 ..
drwxr-xr-x 3 cool cool 4096 Jun 20 01:39 1-d6668934

Version of collabora/code

"com.docker.compose.version": "1.29.2",
 "version": "25.04.3.1"

Browser console showing nothing when trying to open document

Oh sorry here are some browser logs by trying to load document

Another error in borwser log