Nextcloud web interface does not edit office documents but downloads them instead

Nextcloud version: 29.0.1
Operating system and version: Debian 12
Apache or nginx version: Nginx 1.22.1-9
PHP version: 2:8.2+93

The issue you are facing:
Documents always download rather than edit in Nextcloud office. I am using the built in CODE server.

Collabora Online server is reachable. Collabora Online Development Edition 24.04.2.1 80a6f97

I’ve seen several topics on this, but they were with older Nextcloud versions.

The output of your Nextcloud log in Admin > Logging:

Info	no app in context	
Notification was not parsed by any notifier [app: cospend, subject: add_user_share]

"Jun 8, 2024, 4:51:29 PM"	

Debug	no app in context	
Exception
dirty table reads: SELECT `name` FROM `*PREFIX*authtoken` WHERE (`uid` = :dcValue1) AND (`last_activity` >= :dcValue2)

"Jun 8, 2024, 4:51:25 PM"	

Debug	dav	
No status relevant events found, skipping calendar status change

"Jun 8, 2024, 4:51:24 PM"	

Debug	dav	
No status relevant events found, skipping calendar status change

"Jun 8, 2024, 4:51:02 PM"	

Debug	PHP	
Creation of dynamic property OCA\Richdocuments\Preview\OOXML::$capabilitites is deprecated at /var/www/nextcloud/apps/richdocuments/lib/Preview/Office.php#37

"Jun 8, 2024, 4:50:56 PM"	

Debug	no app in context	
RuntimeException
ignorable exception
The loading of lazy AppConfig values have been requested

"Jun 8, 2024, 4:50:54 PM"	

Debug	dav	
No status relevant events found, skipping calendar status change

"Jun 8, 2024, 4:50:53 PM"	

Debug	no app in context	
Exception
dirty table reads: SELECT * FROM `*PREFIX*user_status` WHERE `user_id` = :dcValue1

"Jun 8, 2024, 4:50:53 PM"	

Debug	dav	
No status relevant events found, skipping calendar status change

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'redacted',
  'passwordsalt' => 'redacted',
  'secret' => 'redacted',
  'trusted_domains' => 
  array (
    0 => 'redacted.net',
    1 => '192.168.1.202',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '29.0.1.1',
  'overwrite.cli.url' => 'https://redacted.net/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ben',
  'dbpassword' => 'redacted',
  'installed' => true,
  'maintenance' => false,
  'chunkSize' => '5120MB',
  'theme' => '',
  'loglevel' => 0,
  'default_phone_region' => 'us',
  'enable_previews' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => '',
  ),
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Movie',
    1 => 'OC\\Preview\\PNG',
    2 => 'OC\\Preview\\JPEG',
    3 => 'OC\\Preview\\GIF',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\MP4',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
    10 => 'OC\\Preview\\PDF',
  ),
);