Collobora Online and CODE built-in enabled, but office docs download instead of opening

NextCloud 23.0.0
MariaDB 10.6.5
Apache 2.4.48
Collobora Online 5.0.1
Collobora Online-Built-In Code Server 21.11.6

When I double-click a document after upgrading to the newest version, instead of collobora online (using built in code server) opening the document, the document downloads through the browser. Both Collobora ONline and the Collobora Online Built-in code server are enabled. Is there another setting I am missing?

Additionally, this is running on gentoo linux.

Have you tried to click on Settings - Nextcloud Office again on the Code Server, even if it’s already green? This helps me because from time to time I have the same error, just after a reboot etc. I don’t need to install anything, just the klick on code server seem to start something in the background again.

This is the correct answer although it seems like a bug?

Any time I reboot or restart Apache (I think), the internal CODE server radio button is selected but there clearly is nothing running. Clicking again on the already select radio button results in “Setting up a new server” to be displayed for a short period then everything works again.

Any idea if this could be done via code so I could write a job or something?