Collabora Error opening files

I need to ask now:

Are you actually using both the IP address and the domain, or only the domain?

If you’re only using the domain try the following (or even if you use both, just try it anways, as a test):

Add this line to your config.php file:

'overwritehost' => 'cloud.yourdomain.tld',

…and then restart php-fpm or just reboot your server.

If it still doesn’t work, try also to reset your browser or reload the configuration page with SHIFT/CTRL + F5, and then try agian to switch back and forth between “built-in” and “own server”

EDIT: Okay, my bad—just realized you’re using the Snap.

sudo nextcloud.occ config:system:set overwritehost --value="cloud.yourdomainm.tld"

(Shouldn’t the Snap just work out of the box though? :winking_face_with_tongue:)

definitely remove public IP from trusted_domains array also double check {{*}} that seems strange!

Sorry i have posted the old config.
there is the actual config.php

I have added the ‘overwritehost’ => ‘cloud.mydomain.it’ and rebooted but now the cloud is unreachable. i had to delete it to reach again the cloud

  <?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'instanceid' => '+++++',
  'passwordsalt' => '+++++',
  'secret' => '+++++',
  'trusted_domains' =>
  array (
    0 => '{{ * }}',
    1 => 'cloud.mydomain.it',
    2 => '192.168.+++.+++',
    3 => 'localhost',
    4 => 'nextcloud.local',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '31.0.7.1',
  'overwrite.cli.url' => 'https://cloud.mydomain.it',
  'overwritehost' => 'cloud.mydomain.it'
  'overwriteprotocol' => 'https',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '++++++',
  'installed' => true,
  'default_phone_region' => 'IT',

it worked without any touches until the release 29. After the update i had all this issues :pensive_face:

It would still be interesting to see if it works if you add the overwritehost parameter.

tried it and reboot, not reachable anymore, had to revert back

Which part was not reachable? Was it Office or Nextcloud? I guess it was Office…

Also, you still haven’t answered my question: do you access your Nextcloud instance via both the IP address and the domain name at times, or only via the domain name?

In the screenshot you posted, you’re using the domain name. If that was also the case this time, then the problem must be elsewhere. I was hoping that setting the overwritehost parameter would make the Nextcloud Office app use the domain name instead of the IP address, and that Office would then work. Unfortunately, that didn’t work out.

Are you running a reverse proxy in front of the Snap instance to handle the domain name and SSL certificate? Or are you using the Snap’s built-in SSL and accessing it directly?

If you’re using a reverse proxy, that could definitely affect behavior, and in that case, it might help if you share your reverse proxy config here.

If you’re not using a reverse proxy and letting Snap handle everything directly, then I honestly don’t know why it’s not working. But just to rule that out: Make sure your trusted_domains array in the config.php only contains entries you’re actually using to access your Nextcloud, which ideally would be only one. :wink:

which it does!

Hello @everyone
with a lot (so much) of patience and some troubleshooting (even with the help of chatgpt :rofl:) finally i can open again the documents with cloud.mydomain.com

  • i have installed a new instance and installed collabora built in to see the settings that works

  • certificate was not present on cloud.mydomain.it (even if the browser detected as valid) so i have installed a new one and now my cloud have a A+ rating

  • entering with cloud.mydomain.it and going to the setting of nextcloud office i set: use built-in code server and (important) in the allow list wopi there was 0.0.0.0/0. i deleted it and leave blank. if i set again 0.0.0.0/0 doesn’t work again

  • i have login with 192.168.+++.+++ and in the nextcloud office setting i modified thesetting in use you own server, modified the link from

https://192.168.***.***/extra-apps/richdocumentscode/proxy.php?req=
to
https://cloud.mydomain.it/extra-apps/richdocumentscode/proxy.php?req=

  • In the config.php i have removed the internal IP 192.168..** so now i have only
array (
    0 => '{{ * }}',
    1 => 'cloud.mydomain.it',
    2 => 'localhost',
    3 => 'nextcloud.local',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '31.0.7.1',
  'overwrite.cli.url' => 'https://cloud.mydomain.it',
  'overwriteprotocol' => 'https',
  • as i removed 192.168..** from config.php nobody can enter anymore to change the setting

Now the cloud is so much faster in every operation, from open documents to download files and have only the advice: You have not configured the allow-list for WOPI requests. Without this setting users may download restricted files via WOPI requests to the Nextcloud server.

thank you everyone for your time and your patience, i appreciate :heart:
today is a good day

thank you again