Multiple issues after last update of CODE on a shared server!

Hi

I’m running a server with shared hosting on it. Multiple Nextcloud instances using a CODE server installed since quite a while.

After the last update I did of CODE (it was around end of December) I can’t open anymore any documents in Nextcloud with Collabora.

In nextcloud I get the standard error in such case to check proxy settings but nothing have been changed there and everything is good after a check.

Then checking logs of code, I found out I had to list in CODE configuration file list of all hosts that needs to access the CODE server. I did that and now I have that weirdo error:

[ forkit ] WRN The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/passwd] is out-of-date.

I was not able to find anything interesting about it on internet. CODE is installed using the deb packages.

What to do to recover a working CODE installation ?

Thanks

Vincèn

Hi

No one about it ?

Thanks

hi @vincen Sorry for the late reply. I am bit stuck in a setup task, Let me find ans for your query i will need some time

Thanks for the ping
Darshan

No problem @darshan thanks for your update :wink:

1 Like

Hi @vincen

Steps torecovery

1. Stop CODE completely

sudo systemctl stop coolwsd

Verify nothing is running:

ps aux | grep cool

2. Remove the broken systemplate (this is safe)

Do not delete /opt/cool entirely.

sudo rm -rf /opt/cool/systemplate

3. Recreate systemplate with correct permissions

Run:

sudo coolwsd-systemplate-setup

This command:

  • Recreates /opt/cool/systemplate
  • Copies correct files for the installed CODE version
  • Fixes ownership and permissions

Verify:

ls -ld /opt/cool/systemplate

Expected:

  • Owner: cool
  • Writable

4. Ensure ownership is correct

sudo chown -R cool:cool /opt/cool

This step is critical on shared servers.

5. Check coolwsd.xml hosts config

Since you already hit this change, confirm you now have something like:

<storage desc="Backend storage">
  <wopi allow="true">
    <host allow="true">cloud1.example.com</host>
    <host allow="true">cloud2.example.com</host>
  </wopi>
</storage>

No wildcards anymore in recent versions.

6. Start CODE again

sudo systemctl start coolwsd
sudo systemctl status coolwsd

Then test opening a document from Nextcloud.

If it still fails

Check logs immediately after startup:

journalctl -u coolwsd -n 200 --no-pager

If you still see systemplate-related errors, check whether /opt is mounted with ro or restrictive options:

mount | grep /opt

That is another common issue on shared hosts.

Recent CODE versions require the systemplate to be writable during startup so it can be refreshed.

Why this happens (important)

systemplate is a template filesystem used to spawn document processes.

After updates:

  • /opt/cool/systemplate contains old files
  • CODE tries to update them
  • But the directory is read-only
  • Forkit refuses to continue
  • Result: documents fail to open everywhere

This happens a lot on:

  • Shared hosting
  • Hardened filesystems
  • Systems with custom mount options
  • Older installations upgraded many times

Thanks
Darshan

Hi @darshan

Thanks a lot for the detailed process but I’m blocked at that step, it asks for a chroot directory not so sure what it means. I tried /opt/cool/systemplate but still same error :frowning:

Thanks

Vincèn

coolwsd-systemplate-setup is not asking for the systemplate directory itself.

It is asking for the chroot base directory, which is the parent directory where CODE builds its internal jailed filesystem.

On Debian / package installs, that directory is:

/opt/cool

Not /opt/cool/systemplate.

When you pass /opt/cool/systemplate, the script fails because it tries to create systemplate inside it again, which breaks the layout.

So steps will be like

  1. Make sure CODE is stopped

  2. Remove the broken systemplate (safe)

  3. Run the setup with the correct chroot directory

This will:

  • Recreate /opt/cool/systemplate
  • Populate it with the correct files
  • Fix permissions for the current CODE version

If it still fails

Immediately check logs after startup and share that so i can help more here

Thanks @darshan for all the details and so I rebuilt the /opt/cool/systemplate, insured all rights and owner were good on /opt/cool, /opt/cool/systemplate and subdirectories but still facing the same issue. During startup it fails to be able to write in /opt/cool/child-roots/2502179-53e04d56/FhhgZiMk3SWRSPrA/ but why does it try to write it in /opt/cool instead of /opt/cool/systemplate where the child-roots directory is ?

I did the command as below as root to recreate the /opt/cool/systemplate:

coolwsd-systemplate-setup /opt/cool /opt/collaboraoffice

I noticed also in logs that it tries to copy the /etc/passwd and some other system files in files in /opt/cool/child-roots. Why does it copy these files ?

I have also these errors:

Failed to mount [/opt/cool/child-roots/2503973-eb6963f8/tmp/systemplate-k5OdL5csvqfbEVAv/etc] → [/opt/cool/child-roots/2503973-eb6963f8/k5OdL5csvqfbEVAv/etc]: File is read-only| common/JailUtil.cpp:162

Failed to mount [/opt/cool/child-roots/2503973-eb6963f8/tmp/systemplate-k5OdL5csvqfbEVAv/etc] → [/opt/cool/child-roots/2503973-eb6963f8/k5OdL5csvqfbEVAv/etc], will link/copy contents.| kit/Kit.cpp:3497

Hi @darshan

Did you get a chance to have a look at my last post ? as I’m stuck there :frowning:

Thanks

Vincèn

Hi @darshan

No need to bother to answer anymore, no help here, commercial service of Collabora never answers and tickets opened in your private portal are straight closed without being able to answer :frowning:

Lost enough time with Collabora, going to investigate alternative solutions…

Best

Vincèn

Hi @vincen

I’m truly sorry for the experience you’ve had. I completely understand your frustration, and I apologize that you felt unheard or unsupported.

I’m not aware of the details with commercial support, but please feel free to email me directly. I’ve shared my email in DM and will personally look into your issue.

You can also join our Matrix channel for faster community support:
https://app.element.io/?updated=1.11.111#/room/#cool-dev:matrix.org

Again, my sincere apologies.

1 Like

Hi @darshan

Thanks a lot for your follow-up, I’ll contact you by email today or tomorrow :wink:

Best

@vincen

Yes, I saw your last message.

In your case, since this is a Debian package installation of CODE, doing a clean reinstall is absolutely a valid and often faster approach compared to debugging a possibly broken systemplate or jail state.

Suggested steps:

  1. Stop CODE

  2. Backup your config
    /etc/coolwsd/coolwsd.xml

  3. Remove packages
    apt remove --purge coolwsd code collaboraoffice*

  4. Remove remaining folders if they exist
    /opt/cool
    /etc/coolwsd
    /var/cache/coolwsd

  5. Reinstall CODE and reapply only the necessary settings manually.

This ensures a fresh systemplate and clean child-roots.

Let me know how it goes.

Kind regards,
Darshan

1 Like

Hi Darshan

Thanks for the detailed steps and I have done already the clean of the system to remove the existing CODE installation.

Now I’m going to reinstall the packages but it complains that collabora-online-brand package is not avalaible for installation. Is it normal ? It’s on a system running Debian 12 and that has the official collabora repo in apt.

Your wiki lists collabora-online-brand as package name but on your website it speaks about code-brand :confused: code-brand is ok too ? it’s just different name of same package no ?

Thanks, best,

@vincen are following this documentation for CODE ? Collabora Online Development Edition - Collabora Online and Collabora Office

There is also the tutorial is given https://www.youtube.com/watch?v=xngSk727aBk&embeds_referring_euri=https%3A%2F%2Fwww.collaboraonline.com%2F&embeds_referring_origin=https%3A%2F%2Fwww.collaboraonline.com

yeah it’s that one so it’s good to proceed with code-brand package instead of the one you indicated ?

yes the one in doc is good to go.

Still not working but no more errors when I start the service which is already a lot better. I’ll investigate more in details during the weekend but when I try to open a document in Nextcloud here is logs of coolwsd service:

root@myserver:~# systemctl status coolwsd
● coolwsd.service - Collabora Online WebSocket Daemon
Loaded: loaded (/lib/systemd/system/coolwsd.service; enabled; preset: enabled)
Active: active (running) since Fri 2026-02-13 13:46:22 CET; 52s ago
Main PID: 2108636 (coolwsd)
Tasks: 9 (limit: 76913)
Memory: 407.6M
CPU: 5.401s
CGroup: /system.slice/coolwsd.service
├─2108636 /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 --o:cache_files.path=/opt/cool/cache
├─2108667 /usr/bin/coolforkit-ns --systemplate=/opt/cool/systemplate --lotemplate=/opt/collaboraoffice --childroot=/opt/cool/child-roots/2108636-d7a24c4c/ --clientport=9980 --masterport=coolwsd-RsomQlKX “–rlimits=limit_virt_mem_mb:0;limit_stack_mem_kb:8000;limit_file_size_mb:0;limit_num_open_files:0” --version --ui=default --namespace
└─2108706 /usr/bin/coolforkit-ns --systemplate=/opt/cool/systemplate --lotemplate=/opt/collaboraoffice --childroot=/opt/cool/child-roots/2108636-d7a24c4c/ --clientport=9980 --masterport=coolwsd-RsomQlKX “–rlimits=limit_virt_mem_mb:0;limit_stack_mem_kb:8000;limit_file_size_mb:0;limit_num_open_files:0” --version --ui=default --namespace

Feb 13 13:46:32 myserver.mydomain.com coolwsd[2108667]: frk-2108667-2108667 2026-02-13 13:46:27.346713 +0100 [ forkit ] INF Forkit initialization complete: setting log-level to [warning] as configured.| kit/ForKit.cpp:1055
Feb 13 13:46:45 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108666 2026-02-13 13:46:27.364711 +0100 [ prisoner_poll ] TRC ppoll start, timeoutMicroS: 17982627 size 3| net/Socket.cpp:534
Feb 13 13:46:51 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108709 2026-02-13 13:46:51.965844 +0100 [ websrv_poll ] WRN Client - server version mismatch, disabling browser cache. Expected: 0de01f3f02; Actual URI path with version hash: /browser/ded56d8ff7/cool.html| wsd/FileServer.cpp:939
Feb 13 13:46:52 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108709 2026-02-13 13:46:52.232219 +0100 [ websrv_poll ] WRN FileServerRequestHandler: File not found: Invalid URI request (hash): [/browser/0de01f3f02/images/dark/lc_multipageview.svg].| wsd/FileServer.cpp:1205
Feb 13 13:46:52 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108709 2026-02-13 13:46:52.365928 +0100 [ websrv_poll ] ERR #29: WOPI::CheckFileInfo returned500 (Internal Server Error) Internal Server Error for URI [https://mynextcloudurl/index.php/apps/richdocuments/wopi/files/239804_oc5qaskzpu8t?access_token=D2bgY4mXYOXm3EY30BXqDVQ2rkCiwW1Y&access_token_ttl=0\]. Headers: >
Feb 13 13:46:52 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108709 2026-02-13 13:46:52.365971 +0100 [ websrv_poll ] ERR #29: Failed or timed-out CheckFileInfo [https://mynextcloudurl/index.php/apps/richdocuments/wopi/files/239804_oc5qaskzpu8t?access_token=D2bgY4mXYOXm3EY30BXqDVQ2rkCiwW1Y&access_token_ttl=0\]| wsd/wopi/CheckFileInfo.cpp:117
Feb 13 13:47:04 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108709 2026-02-13 13:47:04.680950 +0100 [ websrv_poll ] WRN Client - server version mismatch, disabling browser cache. Expected: 0de01f3f02; Actual URI path with version hash: /browser/ded56d8ff7/cool.html| wsd/FileServer.cpp:939
Feb 13 13:47:04 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108709 2026-02-13 13:47:04.828295 +0100 [ websrv_poll ] ERR #29: WOPI::CheckFileInfo returned500 (Internal Server Error) Internal Server Error for URI [https://mynextcloudurl/index.php/apps/richdocuments/wopi/files/239804_oc5qaskzpu8t?access_token=t5ZS1DbEqmKejQ14733HNtfH8WgTblfU&access_token_ttl=0\]. Headers: >
Feb 13 13:47:04 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108709 2026-02-13 13:47:04.828339 +0100 [ websrv_poll ] ERR #29: Failed or timed-out CheckFileInfo [https://mynextcloudurl/index.php/apps/richdocuments/wopi/files/239804_oc5qaskzpu8t?access_token=t5ZS1DbEqmKejQ14733HNtfH8WgTblfU&access_token_ttl=0\]| wsd/wopi/CheckFileInfo.cpp:117
Feb 13 13:47:04 myserver.mydomain.com coolwsd[2108636]: wsd-2108636-2108709 2026-02-13 13:47:04.948717 +0100 [ websrv_poll ] WRN FileServerRequestHandler: File not found: Invalid URI request (hash): [/browser/0de01f3f02/images/dark/lc_multipageview.svg].| wsd/FileServer.cpp:1205

@vincen if you want to try docker setup i can share mine which i use for testing CODE

Collabora Docker yml:

version: "3.8"

services:
  collabora:
     image: collabora/code:latest
     container_name: collabora-online
     ports:
       - "9980:9980"
     environment:
       - aliasgroup1=http://nextcloud.local:9081
       - aliasgroup2=http://nextcloud2
       - aliasgroup3=http://192.168.1.100:9081
       - extra_params=--o:ssl.enable=false --o:net.post_allow.hosts='.*'
     extra_hosts:
       - "nextcloud.local:192.168.1.100"

Nextcloud Docker yml

version: '3'

services:
  nextcloud_db:
    image: mariadb:10.5
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - ./nextcloud-db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=vAfrhiwaj7spoe1DBARv
      - MYSQL_PASSWORD=22CifgJLFFdeKKuprzT6
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  nextcloud:
    image: nextcloud:latest
    ports:
      - 9080:80
    links:
      - nextcloud_db
    volumes:
      - ./nextcloud:/var/www/html
    environment:
      - NEXTCLOUD_DATA_DIR=/var/www/html/data
      - MYSQL_PASSWORD=22CifgJLFFdeKKuprzT6
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=nextcloud_db
    restart: always
    
volumes:
  nextcloud-data: