Another guy having trouble with Nextcloud Office

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu Server 21.10
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.48
PHP version (eg, 7.4): 8.0.8

The issue you are facing:

I am self hosting Nextcloud on a Proxmox server and have run into a weird issue. I wanted to experiment with Nextcloud Office for a local volunteer organization so I created an Ubuntu 21.10 LXC unprivileged container, put it behind my Caddy reverse proxy, and started testing. I ran into my fair share of hiccups but eventually got it to the point where everything is working smoothly, all checks pass in the “Administration/Overview”, and I get an A+ on the Security Scan. It is publicly reachable at cloud.test.net (Not the actual URL) and I can create, share, and work with Office documents just like I was hoping to.
Since this is using my testing domain name I spun up another LXC from the same Ubuntu 21.10 base image using cloud.production.com (Again, not the actual URL) and configured it exactly the same way as the test instance, other than passwords and usernames. However, I cannot get Office working on this. As soon as I click “Download and Enable” on Collabora Online the interface locks up. I did a lot of Googling and found some folks recommending an older version of Collabora and CODE, so I tried v4 of Collabora and V6 of CODE. This did not help. The only way to recover that I have found is to roll the container back to a previous snapshot.
I have gone over both systems and cannot find any difference between their configuration. They are running identical versions of Nextcloud, Apache, and PHP, and I have diff’d the configuration files to confirm there is no difference other than the server names.
I am hesitant to abuse the working instance too much. At one point it randomly stopped working correctly as well, but rather than locking up it simply made me download the file instead of allowing me to edit it live. Fortunately I have automated snapshots and was able to roll back to the last and it worked again.

Is this the first time you’ve seen this error? (Y/N): Yes and No. I can reproduce it at will by rolling back to a pre-install attempt snapshot.

Steps to replicate it:

  1. Install Nextcloud 23.
  2. Install CODE
  3. Install Collabora Office

The output of your Nextcloud log in Admin > Logging: This is from before attempting to install Collabora Online. Once I try I am no longer able to access this log to see what, if anything, might have been added.

[] Error: {"wrapper":{"token":"aa4f9a23-b153-4812-b5a4-72c21672a087","instance":"cloud.production.net","interface":0,"event":{"class":"OCA\\Circles\\FederatedItems\\SingleMemberAdd","severity":3,"params":[],"data":[],"result":[],"origin":"cloud.production.net","sender":"cloud.production.net","itemId":"","outcome":{"id":"XvPKl5JYt3tZKvNtviWVaqT3ixalHo6","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","userId":"AdminUser","userType":1,"instance":"cloud.production.net","local":true,"level":1,"status":"Member","displayName":"AdminUser","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"invitedBy":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"displayName":"Circles","instance":"cloud.production.net","basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}},"basedOn":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","name":"user:AdminUser:JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","displayName":"AdminUser","sanitizedName":"","source":1,"population":0,"config":1,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","creation":1643233589,"initiator":null,"owner":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","circleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","singleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","userId":"AdminUser","userType":1,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"AdminUser","displayUpdate":1643233589,"notes":[],"contactId":"","contactMeta":"","joined":1643233589,"basedOn":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","name":"user:AdminUser:JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","displayName":"AdminUser","sanitizedName":"","source":1,"population":0,"config":1,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","creation":1643233589,"initiator":null}}},"circle":{"id":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","name":"group:admin","displayName":"admin","sanitizedName":"","source":2,"population":0,"config":1540,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","creation":0,"initiator":{"id":"GIIAyqbDy1J9OLxU2BTK99yjG4dxXtJ","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"Circles","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}},"owner":{"id":"GIIAyqbDy1J9OLxU2BTK99yjG4dxXtJ","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"Circles","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}}}},"members":[{"id":"XvPKl5JYt3tZKvNtviWVaqT3ixalHo6","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","userId":"AdminUser","userType":1,"instance":"cloud.production.net","local":true,"level":1,"status":"Member","displayName":"AdminUser","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"invitedBy":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"displayName":"Circles","instance":"cloud.production.net","basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}},"basedOn":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","name":"user:AdminUser:JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","displayName":"AdminUser","sanitizedName":"","source":1,"population":0,"config":1,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","creation":1643233589,"initiator":null,"owner":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","circleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","singleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","userId":"AdminUser","userType":1,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"AdminUser","displayUpdate":1643233589,"notes":[],"contactId":"","contactMeta":"","joined":1643233589,"basedOn":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","name":"user:AdminUser:JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","displayName":"AdminUser","sanitizedName":"","source":1,"population":0,"config":1,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","creation":1643233589,"initiator":null}}},"circle":{"id":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","name":"group:admin","displayName":"admin","sanitizedName":"","source":2,"population":0,"config":1540,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","creation":0,"initiator":{"id":"GIIAyqbDy1J9OLxU2BTK99yjG4dxXtJ","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"Circles","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}},"owner":{"id":"GIIAyqbDy1J9OLxU2BTK99yjG4dxXtJ","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"Circles","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}}}}],"circle":{"id":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","name":"group:admin","displayName":"admin","sanitizedName":"","source":2,"population":0,"config":1540,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","creation":0,"initiator":{"id":"GIIAyqbDy1J9OLxU2BTK99yjG4dxXtJ","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"Circles","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}},"owner":{"id":"GIIAyqbDy1J9OLxU2BTK99yjG4dxXtJ","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"Circles","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}}},"member":{"id":"XvPKl5JYt3tZKvNtviWVaqT3ixalHo6","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","userId":"AdminUser","userType":1,"instance":"cloud.production.net","local":true,"level":1,"status":"Member","displayName":"AdminUser","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"invitedBy":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"displayName":"Circles","instance":"cloud.production.net","basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}},"basedOn":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","name":"user:AdminUser:JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","displayName":"AdminUser","sanitizedName":"","source":1,"population":0,"config":1,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","creation":1643233589,"initiator":null,"owner":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","circleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","singleId":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","userId":"AdminUser","userType":1,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"AdminUser","displayUpdate":1643233589,"notes":[],"contactId":"","contactMeta":"","joined":1643233589,"basedOn":{"id":"JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","name":"user:AdminUser:JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","displayName":"AdminUser","sanitizedName":"","source":1,"population":0,"config":1,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/JE9Lp8ACSflNL9njeTcfmdE5WeDu29Z","creation":1643233589,"initiator":null}}},"circle":{"id":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","name":"group:admin","displayName":"admin","sanitizedName":"","source":2,"population":0,"config":1540,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","creation":0,"initiator":{"id":"GIIAyqbDy1J9OLxU2BTK99yjG4dxXtJ","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"Circles","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}},"owner":{"id":"GIIAyqbDy1J9OLxU2BTK99yjG4dxXtJ","circleId":"7BTTfmQOqpYq43YBOL4StkM6kyqAiZl","singleId":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","userId":"circles","userType":10000,"instance":"cloud.production.net","local":true,"level":9,"status":"Member","displayName":"Circles","displayUpdate":0,"notes":[],"contactId":"","contactMeta":"","joined":0,"basedOn":{"id":"AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","name":"app:circles:AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","displayName":"Circles","sanitizedName":"","source":10001,"population":0,"config":8193,"description":"","settings":[],"url":"\/index.php\/apps\/contacts\/direct\/circle\/AFcpHbnGmy1a37NMj8oc2hu7DonLUEu","creation":1643233589,"initiator":null}}}}},"result":[],"severity":3,"status":0}}

at 2022-01-27T02:00:07+00:00

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

<?php
$CONFIG = array (
  'instanceid' => 'oc9qya36vhba',
  'passwordsalt' => 'sAzirOUfyCxI+jx6pS2jD8YSPn5kDO',
  'secret' => 'secretstuff',
  'trusted_domains' => 
  array (
    0 => 'cloud.production.net',
  ),
  'datadirectory' => '/usr/local/ncdata',
  'dbtype' => 'mysql',
  'version' => '23.0.0.10',
  'overwrite.cli.url' => 'http://cloud.production.net',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'secretstuff',
  'installed' => true,
  'htaccess.RewriteBase' => '/',
  'overwriteprotocol' => 'https',
  'force_language' => 'en',
  'force_locale' => 'en_US',
  'default_phone_region' => 'US',
  'auth.bruteforce.protection.enabled' => true,
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => array (
    'host' => '127.0.0.1',
    'port' => 6379,
  ),
  'mail_from_address' => 'device',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'something.net',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '587',
  'mail_smtphost' => 'smtp.something.com',
  'mail_smtpname' => 'device@something.net',
  'mail_smtppassword' => 'secretstuff',
);

The output of your Apache/nginx/system log in /var/log/____: There are several log files in this folder. I’m not sure which are relevant.

PASTE HERE

ff there’s no difference in the setup of those containers it’s very likely that the problem is elsewhere… like a different local IP or such. So I suppose to check your apache/nginx/caddy setup, etc

That’s what I assumed originally, and spent the last two weeks trying to identify. With the exception of the actual FQDN the Caddy config on my separate reverse proxy is identical for both instances, as is the apache2 config on both instances.

Since the production instance behaves correctly, allowing multiple users on various devices to connect both from the local network and the outside world, until I attempt to activate Collabora Online with the internal CODE server the issue seems to be specific to Collabora.

Are there any specific log files I can check that would provide any hints as to what is going wrong in CODE or Collabora specifically?

When I google this issue I find quite a few other people seem to have this or similar problems. In most cases there is no resolution or workaround documented and when there is a workaround documented it is to either manually install an older version of Collabora, (I already tried) or to abandon the CODE server in the app store and instead setup a separate Collabora server instance that the Nextcloud server can talk to. I don’t want to go that route for a number of reasons and anyway that isn’t a solution to the problem of the CODE server and Collabora Online app both available in the Store not functioning as designed with this setup. I am happy to assist in troubleshooting this issue which seems to be common but have run out of ideas on my own which is why I turned to this forum for assistance.

If there are any other logs or configuration files I can provide or compare to pinpoint this issue I am ready to provide them. Fortunately Proxmox makes it relatively easy to attempt this specific task over and over if I want to try something different, but I don’t have any idea what else to tweak.

I did some further troubleshooting with this and was able to gather a bit more info that might be useful.

I started over again with a fresh install of Ubuntu and Nextcloud. As before I first configured it to pass all checks and the Security scan.

I snapshotted it in that state and then started experimenting further. I can install either CODE or Collabora Online from the App store and can still browse around and edit, move, sync files and folders.

As soon as I download and enable the other, game over.

If I SSH in and manually delete the richdocuments folder from the nextcloud/apps folder and reboot, I can get back in to the webpage. Attempting to reinstall causes the problem again.

I next found that if I install Collabora Online first, then I get the “Office” tab in the Admin Settings. I can select “Use a Demo Server” and select a server and it seems to work. I did not experiment extensively with this but was able to create and edit documents.

If I install CODE while Office is set to use the Demo Server it installs without causing any issues in the web page.

If I then go to the Office tab and select “Use the built-in CODE” the web page locks up. If I try to refresh the page or connect from another device it starts to connect but never finishes.

I did this several times and twice the Settings page updated once, several minutes after installing CODE, and I saw the “Could not establish connection to the Collabora Online server” message.

Throughout all of this there are no messages showing up in the Settings/Admin/Logging tab, the apache service is running normally according to a status check via SSH, and there are no messages logged in either the apache logs or syslog.

What else can I check to identify why on one instance Collabora Online connects to the CODE app and on others it will not?

Could you check your /tmp directory if anything changes when you install Code? I do not know why, but for me, Code installs itself there. And I have read that if your /tmp is too small or Apache is not allowed to create files there by systemd that might cause issues.

Nothing is added to /tmp or /var/tmp when I install or enable CODE.

I dug a bit deeper and found something else which may or may not be relevant. When I install CODE from the app store, if I navigate to nextcloud/apps/richdocumentscode/collabora the AppImage inside that folder is not executable. The same file on my working test instance IS executable. I tried marking it executable on the production instance but this did not help at all.

I rolled back to a snapshot where Collabora Online is running successfully using a Demo Server and CODE is not yet installed, and then I pulled and unpacked the latest version of CODE directly from github, set ownership correctly, and moved the result to the apps folder. I noticed that the AppImage in this folder is also executable, but it still locked up the webpage when I attempted to point Collabora to it in the settings.

I also ran top and found that there are six processes running on the test instance that works, but not on the production instance that doesn’t:

coolwsd
Collabora_Onlin
kitbroker_002
kit_spare_005
forkit
AppRun

I monitored top on the production instance while attempting to change Collabora from the working demo server to the CODE server, and did not see any new processes pop up, even briefly.

Clearly Collabora and CODE cannot make a usable connection, but there is not a hint of any attempt, let alone a failure, anywhere in the system logs so I am at a loss how to further diagnose this. I’ll keep poking it though.

I was able to circle back to this problem and I have not resolved anything but I did find some interesting details that I believe are pointing me in the right direction but also taking me further from my area of basic knowledge.

As mentioned in my original post, I followed these instructions directly from the nextcloud documentation pages to install Nextcloud 23 on a Proxmox LXC container running Ubuntu server.

I made the necessary tweaks to the config files to pass all checks under “Setup and Security Warnings” in Settings/Administration/Overview.

I am running this behind a Caddy reverse proxy that is pulling LetsEncrypt certificates for https and forwarding to port 80 on the Nextcloud instance.

When I install CODE and Collabora Online the web interface becomes unusable. Occasionally a page will refresh after several minutes but for the most part it just stays stuck on whatever it was on when I attempt this.

The new information I found is that if I edit a few items to allow direct access to the server via it’s IP, and remove the " ‘overwriteprotocol’ => ‘https’, " line in the nextcloud config.php then if I browse directly to the IP rather than using the domain name and going through the reverse proxy, I can enable Collabora and open and edit documents as expected.

However, I can no longer access the web pages via the URL through the reverse proxy.

The apparent total lack of any logging related to the CODE server is making troubleshooting this quite frustrating, but the set of symptoms seems to imply to me that the CODE server is expecting HTTPS if the end user is connecting via HTTPs to the reverse proxy, but simultaneously requiring that it match what the Nextcloud instance itself is running with, which is HTTP in this case, causing the entire thing to fail.

Can someone with more knowledge of the guts of the software confirm or deny this theory?

I suspect this has to do with the fact that I am using a reverse proxy because if I connect directly to the IP of the Nextcloud instance I can select ‘Use the built in CODE - Collabora Online Development Edition’ option, it says ‘Collabora Online is reachable’, and I can go into a folder and create and edit documents in the browser and Collabora appears to work fine.

Unfortunately, when I return to normal usage via the URL through the reverse proxy it no longer works, and selecting ‘Use the built in CODE - Collabora Online Development Edition’ option on NC 23.0.0 locks up the site completely until I SSH in, delete the richdocumentscode folder, and restart apache, or on NC 23.0.2 it simply results in a ‘Could not establish connection to the Collabora Online server’ message.

However, if I browse to https://my.domain.net/apps/richdocumentscode/proxy.php?status I get a ‘{“status”:“OK”}’

This implies that CODE is running, but Nextcloud has stopped communicating with it. There do not appear to be any relevant logs that I can use to trace what is happening and why.

If I select ‘Use your own server’ and manually change the URL from https to http I get a ‘Collabora Online server is reachable.’ and a green checkmark. Unfortunately this is either untrue or meaningless because if i attempt to actually open a file it sits on the loading page forever and never actually opens any files. If I return to the Office Settings tab it no longer has a green checkmark but instead has a red X again with this message: ‘Collabora Online should use the same protocol as the server installation.’

I don’t know how or where to manually mess with the Collabora protocol to test further, and this really shouldn’t be necessary. I would think that running behind a reverse proxy should be a fairly common use case.

Is there any way to get support for this issue or even an acknowledgment that it exists? A google search turns up numerous other folks running into the same issue with not a single helpful response. I would be happy to pay a reasonable amount but there does not appear to be any support available for individual users unless they are willing to dump thousands of dollars for a 100 user enterprise license, which is just the tiniest bit outside my budget.

Considering that Nextcloud Office is available in the official App store, is there any official documentation on how to setup Nextcloud behind a Reverse Proxy so that Office will work?

No ideas from anyone at Nextcloud why following the official documentation results in a broken system consistently?

If there is really nothing that can be done about this until something on the back end is fixed I would appreciate hearing that so I stop wasting time on it, and if there is reason to believe that this ought to work apart from the fact that it is marketed as a feature, what further steps can I take to identify the issue on my system?

Following up on this to report that the issue has not been fixed in the newly released CODE 21.11.204 or Office 5.0.3.

I was able to pick up another clue here which is hopefully helpful if anyone is actually working on fixing this.

One silver lining to this mess is that it pushed me to learn ansible and occ so that I could be 100% consistent with my testing, because that was quite difficult to achieve with manual installation.

Focusing on the https clue I was able to setup nextcloud to use a self-signed certificate and use https to communicate with my Caddy reverse proxy, which uses LetsEncrypt to handle TLS from there.

I repeated all of this testing with Ubuntu 20.04 and php7.4 as well as 20.10 with php8.0, with both NC 23.0.2 and the latest 23.0.3rc1 version and there was no change, so whatever is happening here has not been resolved in the upcoming update.

I can now get to a fully operational Nextcloud instance running on Ubuntu 20.04 Server that passes all security tests before I ever connect with a browser, with CODE and Office installed and enabled.

I open the URL in a browser and am presented with a login page where I can login. If I click the ‘new’ button I see the options for document, spreadsheet, and presentation, so the Nextcloud instance has done something with Office. If I try to create one of these documents i get an “Unable to create file from template” message. Looking at the running process with top, CODE clearly is NOT running at this time.

If I go to Settings/Nextcloud Office the “Use the built-in CODE - Collabora Online Development Edition” is selected already and I have a green checkmark at the top and a message saying “Collabora Online server is reachable.” Yay! however, when I check top, CODE is still clearly not running.

If I click on “Use the built-in CODE - Collabora Online Development Edition”, although it is already selected, the status immediately changes to a Red X with this message: “Could not establish connection to the Collabora Online server”

If I select “Use your own server” and hit “save” I get the same error as above and the selected option switches itself back to the “Built in CODE” option.

If I select “Use your own server” and clear the “Disable certificate verification (insecure)” checkbox, it switches itself back to the “Built in CODE” option but now I have a green checkmark and “Collabora Online server is reachable.” again. I can also see in top that CODE is now running!

If I check the apache2 error log I now see a bunch of info apparently related to CODE starting up, including this interesting tidbit:

Security: coolforkit incorrect user-name, other than 'cool'

It looks like CODE is already having trouble.

If I attempt to create and open an Office file, it tries to open for a while and then I get the “Document loading failed. Failed to load Nextcloud Office. Please try again later.” message.

According to top CODE is still running, and according to the Office Settings tab the server is still reachable, but when I check the apache2 error log again I see a series of these messages:

Security: coolmount incorrect user-name, other than 'cool'
Aborting.
Security: coolmount incorrect user-name, other than 'cool'
Aborting.
Security: coolmount incorrect user-name, other than 'cool'
Aborting.

Doing some googling it seems that others have reported this error, and in some of those reports Office has still apparently worked for them, so this might not be directly relevant to Office not functioning at all but clearly something is mis-configured.

I remain open to suggestions for other things to try, and am happy to use my hardware to assist in troubleshooting this issue in any way I can.

Editing to add:

I found these errors on the Settings/Logging tab

{"reqId":"Ux3prALwFocXh2SxaLLB","level":3,"time":"2022-03-12T05:27:33+00:00","remoteAddr":"10.212.20.30","user":"admin","app":"PHP","method":"GET","url":"/index.php/apps/richdocuments/index?fileId=135&requesttoken=dKFpuyjNnfS2zMDyXjaEyAIh%2Buq8KnChaAnFZ538SYY%3D%3AHfIiiU%2B%2B98XsjaWgNmawoW1RiNL2QSCXIiKSK%2B3IOcs%3D&path=%2FNew%20spreadsheet.ods","message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php#123","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.45 Safari/537.36","version":"23.0.2.1","exception":{"Exception":"Error","Message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php#123","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":123,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":80,"function":"isProxyStarting","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":56,"function":"fetchFromRemote","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php","line":41,"function":"get","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/TokenManager.php","line":202,"function":"getUrlSrc","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php","line":207,"function":"getToken","class":"OCA\\Richdocuments\\TokenManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Richdocuments\\Controller\\DocumentController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"Ux3prALwFocXh2SxaLLB","level":3,"time":"2022-03-12T05:27:33+00:00","remoteAddr":"10.212.20.30","user":"admin","app":"PHP","method":"GET","url":"/index.php/apps/richdocuments/index?fileId=135&requesttoken=dKFpuyjNnfS2zMDyXjaEyAIh%2Buq8KnChaAnFZ538SYY%3D%3AHfIiiU%2B%2B98XsjaWgNmawoW1RiNL2QSCXIiKSK%2B3IOcs%3D&path=%2FNew%20spreadsheet.ods","message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php#124","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.45 Safari/537.36","version":"23.0.2.1","exception":{"Exception":"Error","Message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php#124","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":124,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":80,"function":"isProxyStarting","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":56,"function":"fetchFromRemote","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php","line":41,"function":"get","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/TokenManager.php","line":202,"function":"getUrlSrc","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php","line":207,"function":"getToken","class":"OCA\\Richdocuments\\TokenManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Richdocuments\\Controller\\DocumentController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"Ux3prALwFocXh2SxaLLB","level":3,"time":"2022-03-12T05:27:33+00:00","remoteAddr":"10.212.20.30","user":"admin","app":"PHP","method":"GET","url":"/index.php/apps/richdocuments/index?fileId=135&requesttoken=dKFpuyjNnfS2zMDyXjaEyAIh%2Buq8KnChaAnFZ538SYY%3D%3AHfIiiU%2B%2B98XsjaWgNmawoW1RiNL2QSCXIiKSK%2B3IOcs%3D&path=%2FNew%20spreadsheet.ods","message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php#125","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.45 Safari/537.36","version":"23.0.2.1","exception":{"Exception":"Error","Message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php#125","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":125,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":80,"function":"isProxyStarting","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php","line":56,"function":"fetchFromRemote","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php","line":41,"function":"get","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/TokenManager.php","line":202,"function":"getUrlSrc","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php","line":207,"function":"getToken","class":"OCA\\Richdocuments\\TokenManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Richdocuments\\Controller\\DocumentController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

This got me going in the right direction. I uninstalled the built-in CODE server and now I can use Collabora again on my own Collabora server. Finally! Thanks! :partying_face:

I have the same issue and think this GitHub issue aims to solve this problem: https://github.com/nextcloud/richdocuments/issues/1282