Richdocuments Code/Collabora in /tmp

Nextcloud version: 23.0.0
Operating system and version: Debian 11.2 Linux 5.10.0-11-amd64 x86_64
Apache: Apache version 2.4.52-1~deb11u2
PHP version: 7.4.25
Collabora Online: 5.0.1
CODE built-in: 21.11.103

My Code server is up and running. But:

The Code server installs itself in the /tmp/systemd-private-XXXX-apache2.service-XXX folder which gets cleared every 24 hours. I have a backup script running that restarts Apache2 and thus clears the temp folder. Also, there is a richdocumentscode folder in the apps folder, but it does not seem to run off that.

I installed Collabora Online - Built-in CODE Server from the “Apps” Tab in Nextcloud. When I go to Settings → Nextcloud Office and reconfigure Code it works again until the tmp folder gets cleared again.

Do you have any ideas why Code install itself in /tmp and how I can keep it from doing that?

Or any ideas on how to make the apache2 temp folder persistent?

I have added a command to my backup script that initializes the code/richdocuments configuration after Apache2 (re)starts.

sudo -u “yourwebserveruser” php "/yournextclouddirectory/"occ richdocuments:activate-config

Replace the text in quotation marks with your username and path.

The command on its own works, but I do not know if it works in my script yet.

Edit: The command works in my script. Does not fix my initial issue of Code running in /tmp tho so I will keep this open.