Collabora Server for Secure View

Hello,

Basically I am trying to install Collabora on my Nextcloud Hub (25.0.4)
I went to the apps section and installed “Collabora Online - Built-in CODE Server” which then tells me I should install Nextcloud Office.
When I Download and install it causes the server to crash and throw Gateway Timeouts.
Nextcloud Logs:

Error richdocuments GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 45001 milliseconds with 0 out of 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://sensitive.com/apps/richdocumentscode/proxy.php?req=/hosting/capabilities

What am I missing I tried already a few things like changing the timeouts in:

nano /var/www/html/nextcloud/lib/private/Http/Client/Client.php
nano /var/www/html/nextcloud/lib/private/Installer.php
nano /var/www/html/nextcloud/apps/files_sharing/lib/External/Storage.php

I am using Red Hat Enterprise Linux 8.7 on a postgres 14 the base installation works fine even ldap and other apps.

I followed this setup and added https to it https://docs.nextcloud.com/server/22/admin_manual/installation/example_centos.html

https://example.com/apps/richdocumentscode/proxy.php?req=/hosting/capabilities →

{
"convert-to":{"available":true,"endpoint":"/cool/convertto"},
"hasMobileSupport":true,
"hasProxyPrefix":true,
"hasTemplateSaveAs":false,
"hasTemplateSource":true,
"productName":"Collabora Online Development Edition",
"productVersion":"22.05.8.2",
"productVersionHash":"sensitive",
"serverId":"sensitive"
}

hello @denis_ferreira welcome to the forum :handshake:

likely the problem is not a timeout but some other (networking) issue which prevents the system from accessing the CODE instance… depending on your instillation this could be DNS issue, reverse proxy or webserver config.

Further reading:

Nextcloud Collabora integration

Please use the search regarding built-in CODE server, lot of issues has been discussed already.

We could not exactly identify why the redhat server was not able to download the packages.
We experienced similar issues while trying to manually install the coolwsd package on the server.

Since then we managed to install collabora.

Issues since then are:

I cannot open documents and secure view is not working
Admin pannel is not accessible under https://example.com/browser/dist/admin/admin.html and in the browser one can see WebSocket connection to ‘wss://example.com/cool/adminws/’ failed:

CODE proxy:

<VirtualHost *:80>
ServerName example.com
Redirect permanent / https://example.com/

<VirtualHost *:443>
ServerName example.com
SSLEngine on

    SSLCertificateFile cer
    SSLCertificateKeyFile key
    SSLCertificateChainFile crt

– Reverse proxy for Collabora Online
AllowEncodedSlashes NoDecode
ProxyPreserveHost On

– static html, js, images, etc. served from coolwsd
–browser is the client part of Collabora Online

ProxyPass / http://localhost:9980/
ProxyPassReverse / http://localhost:9980/

ProxyPass /browser http://127.0.0.1:9980/browser retry=0
ProxyPassReverse /browser http://127.0.0.1:9980/browser

– WOPI discovery URL
ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery

– Capabilities
ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities

– Main websocket
ProxyPassMatch “/cool/(.*)/ws$” ws://127.0.0.1:9980/cool/$1/ws nocanon

– Admin Console websocket
ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws

– Download as, Fullscreen presentation and Image upload operations
ProxyPass /cool http://127.0.0.1:9980/cool
ProxyPassReverse /cool http://127.0.0.1:9980/cool
– Compatibility with integrations that use the /lool/convert-to endpoint
ProxyPass /lool http://127.0.0.1:9980/cool
ProxyPassReverse /lool http://127.0.0.1:9980/cool

Nextcloud proxy:

<VirtualHost *:80>
ServerName example2.com
Redirect permanent / https://example2.com/

<VirtualHost *:443>
ServerName example2.com

– SSL configuration
SSLEngine on
SSLCertificateFile cer
SSLCertificateKeyFile key
SSLCertificateChainFile crt

– Nextcloud configuration
DocumentRoot “/var/www/html/nextcloud”
<Directory “/var/www/html/nextcloud”>
AllowOverride All
Options FollowSymLinks MultiViews
Require all granted

– PHP-FPM configuration
<FilesMatch .php$>
SetHandler “proxy:unix:/run/php-fpm/www.sock|fcgi://localhost”

Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
Nextcloud config:

?php
$CONFIG = array (
‘directory’ => ‘/var/www/html/nextcloud/data’,
// ‘overwrite.cli.url’ => ‘’,
‘trusted_domains’ =>
array (
0 => ‘’,
),
‘allow_local_remote_servers’ => true,
‘datadirectory’ => ‘/var/www/html/nextcloud/data’,
‘dbtype’ => ‘’,
‘dbname’ => ‘’,
‘dbhost’ => ‘’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘’,
‘dbpassword’ => ‘’,
// ‘proxy’ => ‘’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
),
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘filelocking.enabled’ => true,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘instanceid’ => ‘’,
‘passwordsalt’ => ‘’,
‘secret’ => ‘’,
‘version’ => ‘25.0.4.1’,
‘installed’ => true,
‘ldapProviderFactory’ => ‘OCA\User_LDAP\LDAPProviderFactory’,
);

In coolwsd.xml I added:

  • storage.wopi example2.com
  • Did not change default storage.ssl config
  • Added in net.post_allow example.com
  • ssl.enable = false and ssl.termination = true

When removing these line from collabora.conf (proxy)
ProxyPass / http://localhost:9980/
ProxyPassReverse / http://localhost:9980/

I regain acces to the admin pannel under: https://example.com/browser/dist/admin/admin.html

Once I add those I lose access to that panel

please follow the guide I provided.

I don’t know what are tring to achieve the configs are related to Collabora please ask in the right forum