Nextcloud + ONLYOFFICE integration: "Error while downloading the document file to be converted"

Nextcloud + ONLYOFFICE integration: “Error while downloading the document file to be converted”

I am trying to integrate Nextcloud with ONLYOFFICE Document Server in a local network environment.

Setup:

  • Nextcloud version: 32.0.3
  • ONLYOFFICE Document Server version: 9.3.1.10
  • ONLYOFFICE Nextcloud app version: 9.13.0
  • ONLYOFFICE is running in Docker container on Ubuntu server
  • Nextcloud is hosted on aaPanel (Apache reverse proxy)

Environment:

JWT configuration:

  • JWT enabled on both sides
  • Same secret on both servers
  • Header: Authorization
  • jwt_in_body enabled

Problem:

When configuring ONLYOFFICE in Nextcloud settings, I get:

“Error while downloading the document file to be converted.”

Documents cannot be opened in ONLYOFFICE.

Tests performed:

  1. Connectivity test from ONLYOFFICE container:

curl https://files.xxx.local/status.php

Works (valid JSON returned, no SSL errors)

  1. ONLYOFFICE endpoint test:

curl -k https://files.xxx.local/index.php/apps/onlyoffice/empty

Returns:
{“message”:“Access denied”}

  1. Download endpoint test:

curl -k https://files.xxx.local/index.php/apps/onlyoffice/download?doc=test

Returns:
{“message”:“Access denied”}

  1. Nextcloud logs:
  • No ONLYOFFICE download requests visible in logs
  • No errors related to document conversion
  1. JWT verification:
  • Same secret configured in Nextcloud and ONLYOFFICE
  • JWT enabled
  • Header matches
  1. SSL verification:
  • HTTPS works without -k
  • Certificates are trusted inside ONLYOFFICE container
  • No SSL errors during direct requests

Observation:

  • ONLYOFFICE can reach Nextcloud
  • SSL trust is confirmed working
  • But document download fails before conversion
  • Nextcloud does not log any valid download request
  • Requests without JWT correctly return “Access denied”

Question:

Could this issue be related to how JWT is being passed (header vs body)?
Does ONLYOFFICE require JWT strictly in Authorization header?

Summary:

  • Network connectivity OK
  • SSL trust OK
  • JWT configured
  • Endpoints reachable
  • Download fails with “Error while downloading the document file to be converted”

Looking for guidance on JWT handling or internal request validation in ONLYOFFICE Document Server.

Hello @vubavic

Please take a look at logs of Document Server too. Logs are located in /var/log/onlyoffice/documentserver/, in particular you should check out …/converter/out.log for any errors. Also, you can use docker logs command on the container with Document Server to print latest logs into the terminal of the server.

Let me know if you see any [ERROR] severity messages in logs and share them for the reference.

Nextcloud + ONLYOFFICE integration: “Error while downloading the document file to be converted”

Hi I did the set the rejectiUnauthorised to false in default.json but it’s still popping the same error

How can help me to fix this

Hello @infralocksystems

Please also check out logs for more information about the issue. Also, let me know installation type of your Document Server and its version too.