Fix o solution onlyoffice document server NextCloud 18.02

Hello everyone…

I hope that well, I comment that more than 1 month ago nextcloud was updated to version 18.02 since that time the onlyoffice connection with the document connector was broken, and it has been impossible for me to establish again that my nextcloud and my colleagues can work efficiently, if it was a headache trying or looking for solutions I had problems since I administer the portal.

So after many nights and woke up today 1 hour ago I found the solution that helped me to reset the office again on the server.

Below I give as I was before the update so you can understand this cumbersome problem.

03 Mar 2020
NC 17.01
Onlyoffice 4.1.4
Community Document Server 0.1.2
Server Ubuntu 18.04 lts 1.7 ram ssd 40 gb 2tb connection
Maria DB
PHP 7.3

That was my nextcloud configuration for x reasons it was updated to version 18.02 as commented

The connection between the reception of documents was lost internally I resorted to many forums with the intention of being able to look for a friendly solution, but I did not find any support
He even asked me to update only office and Community server update them to the latest version of onlyoffice but I had sudden problems with downloading the connector to version 0.1.5 curl and millisecond problems the installation chain was broken and everything was still chaos, So I agreed to see the logs and understood that it was impossible to download the onlyoffice connector. So I decided to install the Community Document Server separately outside of nextcloud inside my server in order to connect it externally.

I proceeded with the installation and then I could see that it had been installed correctly.

Then I decided to make the connection externally but another headache could not be connected since before it was possible to do it, but now I don’t know what could happen.

So I checked within Nextcloud in settings - Overview and you could see that this new error was throwing at me

“The HTTP header” Strict-Transport-Security “is not configured in at least” 15552000 “seconds. To improve security, we recommend activating HSTS as described in the security tips”

Following this, create a .htacces file and add to the path /var/www/ where I have the nextcloud configured

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

hen I updated and followed the same connection problem with the onlyoffice but the HTTP error had already disappeared and was already connecting as https. so i had to add one more configuration inside the config.php of nextcloud and add to the trusted domains

 'trusted_domains' =>
  array (
    0 => '',
    1 => '',

add url pointing to new Community Document Server installed a few hours ago so i went back to only office panel and save changes and walaaaaaaaa reconnected

I hope this contributes since many of us have had thousands of headaches since January 2020, but today I am solving life again. so discard the Community Document Server app and install it externally from nextcloud and link it as in old versions.