# Collabora Server for Secure View

**URL:** <https://help.nextcloud.com/t/collabora-server-for-secure-view/156559>\
**Category:** 📄 Office\
**Tags:** collabora-online\
**Created:** [February 24, 2023, 10:00am UTC](https://help.nextcloud.com/t/collabora-server-for-secure-view/156559 "2023-02-24T10:00:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![denis\_ferreira](https://help.nextcloud.com/letter_avatar/denis_ferreira/32/6_449c533f586939b6e5f246632a46421f.png) [@denis\_ferreira](https://help.nextcloud.com/u/denis_ferreira)\
**Post date:** [February 24, 2023, 10:00am UTC](https://help.nextcloud.com/t/collabora-server-for-secure-view/156559/1 "2023-02-24T10:00:42Z")

</div>

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:

```auto
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://docs.nextcloud.com/server/22/admin_manual/installation/example_centos.html)

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

```auto
{
"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"
}

```

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [February 25, 2023, 5:50pm UTC](https://help.nextcloud.com/t/collabora-server-for-secure-view/156559/2 "2023-02-25T17:50:53Z")

</div>

hello @denis_ferreira welcome to the forum 🤝

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](https://help.nextcloud.com/t/nextcloud-collabora-integration/151879)

> <https://github.com/nextcloud/richdocuments/issues/1817>
>
> \### Steps to reproduce
> 1. Installing and Activating via Store or via OCC (app:i…nstall richdocuments)
> 
> \### Expected behaviour
> After the installation and activation of the richdocuments application from the store, I expect to access the settings in order to perform the configuration. 
> 
> \### Actual behaviour
> The installation and activation of the richdocuments application from the store works, however, the Nextcloud instance then times out. Accessing the instance isn't possible anymore until the application is disabled via OCC. 
> 
> \### Server configuration
> \*\*Operating system\*\*:
> Description: Ubuntu 20.04.3 LTS
> Release: 20.04
> Codename: focal
> 
> \*\*Web server:\*\*
> Apache
> 
> \*\*Database:\*\*
> MariaDB
> 
> \*\*PHP version:\*\*
> 7.4
> 
> \*\*Nextcloud version:\*\* (see Nextcloud admin page)
> 22.2.0 (also affected 21.\* Versions)
> 
> \*\*Updated from an older Nextcloud/ownCloud or fresh install:\*\*
> Updated from older Nextcloud
> 
> \*\*Where did you install Nextcloud from:\*\*
> Nextcloud
> 
> \*\*Signing status:\*\*
> No errors have been found.
> 
> \*\*List of activated apps:\*\*
> Enabled:
> - accessibility: 1.8.0
> - activity: 2.15.0
> - bruteforcesettings: 2.2.0
> - calendar: 2.3.4
> - circles: 22.1.1
> - cloud\_federation\_api: 1.5.0
> - comments: 1.12.0
> - contacts: 4.0.3
> - contactsinteraction: 1.3.0
> - dashboard: 7.2.0
> - dav: 1.19.0
> - facerecognition: 0.8.3
> - federatedfilesharing: 1.12.0
> - federation: 1.12.0
> - files: 1.17.0
> - files\_pdfviewer: 2.3.0
> - files\_rightclick: 1.1.0
> - files\_sharing: 1.14.0
> - files\_trashbin: 1.12.0
> - files\_versions: 1.15.0
> - files\_videoplayer: 1.11.0
> - firstrunwizard: 2.11.0
> - logreader: 2.7.0
> - lookup\_server\_connector: 1.10.0
> - mail: 1.10.5
> - nextcloud\_announcements: 1.11.0
> - notifications: 2.10.1
> - oauth2: 1.10.0
> - password\_policy: 1.12.0
> - photos: 1.4.0
> - privacy: 1.6.0
> - provisioning\_api: 1.12.0
> - recommendations: 1.1.0
> - richdocuments: 4.2.3
> - serverinfo: 1.12.0
> - settings: 1.4.0
> - sharebymail: 1.12.0
> - spreed: 12.1.2
> - support: 1.5.0
> - survey\_client: 1.10.0
> - systemtags: 1.12.0
> - text: 3.3.0
> - theming: 1.13.0
> - twofactor\_backupcodes: 1.11.0
> - updatenotification: 1.12.0
> - user\_status: 1.2.0
> - viewer: 1.6.0
> - weather\_status: 1.2.0
> - workflowengine: 2.4.0
> Disabled:
> - admin\_audit
> - encryption
> - files\_external
> - user\_ldap
> 
> \*\*The content of config/config.php:\*\*
> $CONFIG = array (
> 'instanceid' =\> '',
> 'passwordsalt' =\> '',
> 'secret' =\> '',
> 'trusted\_domains' =\> 
> array (
> 0 =\> '1.1.1.1',
> 1 =\> 'domain1',
> 2 =\> 'domain2',
> ),
> 'datadirectory' =\> '/mnt/drive/nextcloud',
> 'dbtype' =\> 'mysql',
> 'version' =\> '22.2.0.2',
> 'dbname' =\> 'database',
> 'dbhost' =\> '0.0.0.0',
> 'dbport' =\> '',
> 'dbtableprefix' =\> 'oc\_',
> 'mysql.utf8mb4' =\> true,
> 'dbuser' =\> 'dbuser',
> 'dbpassword' =\> 'dbpassword',
> 'installed' =\> true,
> 'maintenance' =\> false,
> 'data-fingerprint' =\> '',
> 'trusted\_proxies' =\> 
> array (
> 0 =\> '0.0.0.0',
> ),
> 'default\_phone\_region' =\> 'DE',
> 'loglevel' =\> 3,
> 'mail\_smtpmode' =\> 'smtp',
> 'mail\_smtpsecure' =\> 'tls',
> 'mail\_sendmailmode' =\> 'smtp',
> 'mail\_from\_address' =\> 'cloud',
> 'mail\_domain' =\> 'domain.com,
> 'mail\_smtphost' =\> '123.server.com',
> 'mail\_smtpport' =\> '587',
> 
> 
> \*\*Are you using external storage, if yes which one:\*\* local/smb/sftp/...
> No
> 
> \*\*Are you using encryption:\*\* yes/no
> No
> 
> \*\*Are you using an external user-backend, if yes which one:\*\* LDAP/ActiveDirectory/Webdav/...
> No
> 
> \### Client configuration 1
> \*\*Browser:\*\*
> Opera
> Firefox
> Safari
> 
> \*\*Operating system:\*\*
> macOS 11.6
> 
> \### Client configuration 2
> \*\*Browser:\*\*
> Opera
> Firefox
> Edge
> Chrome
> 
> \*\*Operating system:\*\*
> Windows 10 1909 (ENT)
> 
> \### Logs
> \#### Web server error log
> \[Tue Oct 19 10:06:25.189751 2021\] \[mpm\_prefork:notice\] \[pid 153986\] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
> \[Tue Oct 19 10:06:25.189780 2021\] \[core:notice\] \[pid 153986\] AH00094: Command line: '/usr/sbin/apache2'
> 
> 
> \#### Nextcloud log (data/nextcloud.log)
> Cleared all entries, changed debug to 1. Restarted apache2 service = empty logs
> 
> Removing/renaming file nextcloud/apps/richdocuments/lib/AppInfo/Applications.php makes instance responsive, therefore seems to be related.
> 
> \#### Browser log
> N(index):1370 crbug/1173575, non-JS module files deprecated.
> (anonymous) @ (index):1370

> <https://github.com/nextcloud/richdocuments/issues/1282>
>
> Over the last couple of weeks Snap and Docker versions of Nextcloud have updated… to version 2.0.2 (snap on Friday). After the upgrade the connection to Nextcloud, particularly via the web-interface, slows to a crawl and/or times out. It appears to be caused by richdocuments/collabora.
> 
> What is strange about this is that you cannot see easily identify the problem: basic analytics show no major increase in load on the CPU, Ram or I/O, the logs don't immediately show anything out of the ordinary. If you open top/htop on the server, however, and observe for a while you can see big, temporary spikes where available CPU's are maxed out by richdocuments/the Appimage related to Collabora and the Code server. When you go to the admin settings under collabora you can see an error that says that it cannot establish a connection to the in-built CODE server. 
> 
> The performance problem can be fixed by disabling both the collabora and code server apps: either in the web interface if you can get there through the performance issues, or in the server terminal (sudo snap run nextcloud.occ app:disable richdocuments ; sudo snap run nextcloud.occ app:disable richdocumentscore). After doing that normal service is resumed entirely across the Nextcloud server.
> 
> This indicates that the failure to establish a connection to the inbuilt CODE server is the underlying problem and that there is something that happens when upgrading from Nextcloud v. 2.0.1 to 2.0.2 that causes it to break. Strangely, however, this is an issue that only appears to be present in Nextcloud Snap (where slowdown occurs) and Docker (where timeouts occur) and doesn't appear to have been reported by users of the regular Nextcloud: see threads on Nextcloud Community Forum (https://help.nextcloud.com/t/nextcloud-20-0-2snap2-interface-incredibly-slow/100304), Nextcloud Snap Github (https://github.com/nextcloud/nextcloud-snap/issues/1569), and Nextcloud Reddit (https://www.reddit.com/r/NextCloud/comments/k7b1of/extremely\_slow\_interface\_nextcloud\_snap/).

Please use the [search](https://help.nextcloud.com/search) regarding built-in CODE server, lot of issues has been discussed already.

---

<div class="post-metadata">

**Author:** ![denis\_ferreira](https://help.nextcloud.com/letter_avatar/denis_ferreira/32/6_449c533f586939b6e5f246632a46421f.png) [@denis\_ferreira](https://help.nextcloud.com/u/denis_ferreira)\
**Post date:** [March 30, 2023, 9:13am UTC](https://help.nextcloud.com/t/collabora-server-for-secure-view/156559/3 "2023-03-30T09:13:41Z")

</div>

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](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](http://example.com)  
> Redirect permanent / [https://example.com/](https://example.com/)
> 
> \<VirtualHost \*:443\>  
> ServerName [example.com](http://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/](http://localhost:9980/)  
> ProxyPassReverse / [http://localhost:9980/](http://localhost:9980/)
> 
> ProxyPass /browser [http://127.0.0.1:9980/browser](http://127.0.0.1:9980/browser) retry=0  
> ProxyPassReverse /browser [http://127.0.0.1:9980/browser](http://127.0.0.1:9980/browser)
> 
> – WOPI discovery URL  
> ProxyPass /hosting/discovery [http://127.0.0.1:9980/hosting/discovery](http://127.0.0.1:9980/hosting/discovery) retry=0  
> ProxyPassReverse /hosting/discovery [http://127.0.0.1:9980/hosting/discovery](http://127.0.0.1:9980/hosting/discovery)
> 
> – Capabilities  
> ProxyPass /hosting/capabilities [http://127.0.0.1:9980/hosting/capabilities](http://127.0.0.1:9980/hosting/capabilities) retry=0  
> ProxyPassReverse /hosting/capabilities [http://127.0.0.1:9980/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](http://127.0.0.1:9980/cool)  
> ProxyPassReverse /cool [http://127.0.0.1:9980/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](http://127.0.0.1:9980/cool)  
> ProxyPassReverse /lool [http://127.0.0.1:9980/cool](http://127.0.0.1:9980/cool)

> **Nextcloud proxy:**
>
> \<VirtualHost \*:80\>  
> ServerName [example2.com](http://example2.com)  
> Redirect permanent / [https://example2.com/](https://example2.com/)
> 
> \<VirtualHost \*:443\>  
> ServerName [example2.com](http://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](http://example.com)
- ssl.enable = false and ssl.termination = true

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

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

Once I add those I lose access to that panel

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [March 30, 2023, 11:48am UTC](https://help.nextcloud.com/t/collabora-server-for-secure-view/156559/4 "2023-03-30T11:48:28Z")

</div>

> [@denis\_ferreira](#):
>
> I cannot open documents and secure view is not working

please follow the guide I provided.

> [@denis\_ferreira](#):
>
> In coolwsd.xml I added:
> 
> - storage.wopi [example2.com](http://example2.com)
> - Did not change default storage.ssl config
> - Added in net.post\_allow [example.com](http://example.com)
> - ssl.enable = false and ssl.termination = true

I don’t know what are tring to achieve the configs are related to Collabora please ask in the [right forum](https://forum.collaboraonline.com)

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 12:03pm UTC](https://help.nextcloud.com/t/collabora-server-for-secure-view/156559/5 "2024-12-14T12:03:31Z")

</div>


