How to make nextcloud connect to an internally deployed Onlyoffice

I am running Nextcloud v25 (soon to upgrade to v26) in a docker container. I am also running Onlyoffice V7.2 in a docker container. I am trying to get nextcloud to connect to onlyoffice.

I am running onlyoffice for the sole purpose of using it with nextcloud. It therefore does not require SSL and it is inaccessible to anything outside my intranet.

I tested nextcloud connection using the OnlyOffice demo server, and it works seamlessly.

Unfortunately, I have 2 problems when attempting to connect with my onlyoffice docker instance:

  1. Nextcloud only allows https connections to onlyoffice. I have gotten around this by using the advanced settings to enter the http version of the URL. So my DOCS address is:

and my internal requests URL is

When I do a save the system accepts the settings. Unfortunately, when I attempt to open a .docx file, I get the follpwing failure message:

ONLYOFFICE cannot be reached. Please contact admin
  1. I suspect that the reason why the configuration saving is working and the actual access is not is because Nextcloud is testing the configuration using the internal connection, but when it is actually connecting to open a document it is using the DOCS URL. I believe this because when I enter the internal address in the browser, I get the OpenOffice welcome page. When I enter the DOCS URL into the same browser (using Firefox), I get SSL_ERROR_RX_RECORD_TOO_LONG failures. Note that if I use Chrome or Edge, I get ERR_SSL_PROTOCOL_ERROR failures.

I need to do one of two things:

  1. I need to somehow configure Nextcloud’s onlyoffice system to accept http URLs, instead of always forcing the use of https urls (which I don’t need anyway since, as I said, SSL isn’t needed here)

  2. I need to somehow force nextcloud to always use the internal URL to access onlyoffice, so that I can get proper connections when using it to open documents. This I suspect would be the best option.

Can someone help in this matter? How do I get my Nextcloud to work properly with my OnlyOffice installation?

Some more details about this problem:

  1. Monitoring the logs for both Nextcloud and OnlyOffice, there are no failure messages generated when attempting to open a document with OnlyOffice. Neither Nextcloud nor OnlyOffice generates any error or failure messages in their logs. I still, however, get the
ONLYOFFICE cannot be reached. Please contact admin

failure when attempting to open a document from Nextcloud.

  1. The config.php file has the following entries which I am told are supposed to make OpenOffice more accessible from Nextcloud:
  'allow_local_remote_servers' => true,
  'onlyoffice' => 
     array (
       'verify_peer_off' => true,
       'jwt_secret' => '<<REDACTED>>',

so the problem sound like an nginxs problem, may i suggest you to try the snapd installation of onlyoffice which has the way to make a self cert and its working since i have test it ? GitHub - ONLYOFFICE/snap-documentserver: The ONLYOFFICE Document Server snap package for the snap package system just give it a try and see if after you get the error !!!let me know


the issue has nothing to do with the fact that I am using Docker to deploy it.

The SNAP installation generates the same failures – even though I had to shut down my security system, open Port 80, and run Chatbot to generate an (ultimately redundant) ssl cert. I am getting the same behavior attempting to open files from Nextcloud: the cannot connect failure and the SSL_ERROR_RX_RECORD_TOO_LONG failure when attempting direct access.

This problem is being caused by some other, unknown factor. At this time, OnlyOffice is not usable on my system.

not unknown factor rather than you don’t understand it !if the error stats that there is problem here SSL_ERROR_RX_RECORD_TOO_LONG failure when attempting direct access then you know where and what the problem is but you dont understand it self cert you have? if yes then look it and start the process again from start make a new one follow the steps.that is why i told you to youn snapd installation which makes it by it self…anyway.