ONLYOFFICE Docs v7.3 released: enhanced forms, SmartArt, new security settings, Watch Window, and more
ONLYOFFICE Docs v7.3 released

Error while trying to connect from OnlyOffice to Nextcloud

Hello everyone,

I have installed ONLYOFFICE Docs Community Edition 7.0.1 as indicated in the documentation on the ONLYOFFICE website.
It is installed on a Ubuntu 18.04 LTS.
It integrated well with my Nextcloud (this one is installed on another computer).

However when I updated the version from 7.0.1 to 7.2.1, it does not want to connect to my Nextcloud.
It tells me as error message:
“Error while attempting to connect (An error occurred in the document service: Error while downloading the document file to be converted.) (version 7.3.0.184)”

My Nextcloud version is there 20.0.14.

And when I use the built-in test example it tells me this:
screen

Do you have any idea what I could do to get this one to successfully reconnect to my Nextcloud?

Hello @onlyofficepb

First of all, I want you to pay attention that you are using an outdated version of Document Server, the actual version is 7.3.3.

Second, starting from version 7.2 JWT Token is enabled by default.

So far, I am quite confused about which version is currently installed on your server.

You are telling that updated to version 7.2.1, but in the error message it is stated that the version is 7.3.0.

Could please double check the currently installed version with command apt list --installed | grep onlyoffice and share the output?
Additionally, please specify the installation method whether it is Docker or DEB/RPM packages.

Hello @Constantine

Thank you for your quick answer.

Yes indeed the current version is 7.3.3 but as I had a problem on the 7.3.0 I wanted to find an answer to my problem before starting another version update

It is a mistake on my part it is indeed the version 7.3.0.184 installed on the machine.
image

Concerning the installation it was an installation of DEB/RPM packages, I had followed for the installation of there 7.0.1 this procedure which now is for the 7.3.3 : Installer ONLYOFFICE Docs sur Debian, Ubuntu et dérivés - ONLYOFFICE

Thank you for your help

Thank you for the confirmation.

To fix the issue you have two options:

  • disable JWT Token (not recommended);
  • configure JWT Token on both sides (Document Server and Nextcloud).

If you decide to disable it, please follow these simple steps:

  1. Locate local.json config of Document Server in /etc/onlyoffice/documentserver/;
  2. Open it and find section "token", then change "inbox", "outbox" and "browser" strings to false like that:
      "token": {
        "enable": {
          "request": {
            "inbox": false,
            "outbox": false
          },
          "browser": false
        },
  1. After that restart Document Server services with systemctl restart ds-* to apply the change.

To make sure that JWT Token is configured properly on both sides, please follow this instruction:

  1. In the mentioned local.json config locate "secret" section and fetch JWT Token secret key (marked on the example below as <secret>):
      },
      "secret": {
        "inbox": {
          "string": "<secret>"
        },
        "outbox": {
          "string": "<secret>"
        },
        "session": {
          "string": "<secret>"
        }
      }
  1. Open your Nextcloud portal and proceed to the ONLYOFFICE connector app settings;
  2. Make sure that the address of Document Server is valid, then in the Secret key field insert your secret key (<secret> from local.json) and try connecting.

Let me know if it helps.

Hello @Constantine

I have just tried the whole configuration that you have indicated just on your post.

So I have this in my local.json file :
image

And when I enter on my nextcloud the address and then the secret key indicated in the local.json file, I always have the same error message which is : “Error while trying to connect (An error occurred in the document service: Error while downloading the document file to be converted.) (version 7.3.0.184)”.

Thank you again for your answers.

Hello @onlyofficepb

As I can see, you have JWT Token disabled. That way you have to leave Secret key field blank in the connector settings.

Indeed I deactivated it to test but my first goal was to make it work by letting it activate but even by leaving the “true” instead of the “false” and with my secret key, I still have this error message.

Please set inbox, outbox and browser values back to true to enable JWT, restart Document Server services with systemctl restart ds-* to apply the change and then specify token credentials on Nextcloud side:

  1. Locate config.php of Nextcloud in config folder of root Nextcloud catalog;
  2. Add next section to it to specify JWT credentials:
  'onlyoffice' =>
  array (
    "jwt_secret" =>"<secret>",
    "jwt_header" =>"<header>"
  ),

In your case <header> is AuthorizationJwt and <secret> is test, so it should be like that:

    "jwt_secret" =>"AuthorizationJwt",
    "jwt_header" =>"test"

After that try to connect again.

I reset the values to enable JWT and restart the Document Server.
I have this in my local.json file:

      "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "AuthorizationJwt"
        },
        "outbox": {
          "header": "AuthorizationJwt"
        }
      },
      "secret": {
        "inbox": {
          "string": "test"
        },
        "outbox": {
          "string": "test"
        },
        "session": {
          "string": "test"

On Nextcloud I added the line :
"jwt_header" => "test"
So I have this in my config.php file :
image

I restarted my web server to take the changes into account but still get this error message: “Error while attempting to connect (An error occurred in the document service: Error while downloading the document file to be converted.) (version 7.3.0.184)”.

Please provide us log files of Document Server that are located in /var/log/onlyoffice/documentserver for analysis.
You can upload them to your portal and share an external link. If you are worried about any sensitive data, you can send the link me via PM.

Very well, however when I want to send you a personal message, it tells me that it is not possible…

I have increased your trust level, please try again.