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:
- Nextcloud URL: https://files.xxx.local
- ONLYOFFICE URL: https://onlyoffice.xxx.local
- Both servers are in the same LAN
- Reverse proxy (Apache via aaPanel) is used for HTTPS
- Internal enterprise CA is used (not public CA)
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:
- Connectivity test from ONLYOFFICE container:
curl https://files.xxx.local/status.php
Works (valid JSON returned, no SSL errors)
- ONLYOFFICE endpoint test:
curl -k https://files.xxx.local/index.php/apps/onlyoffice/empty
Returns:
{“message”:“Access denied”}
- Download endpoint test:
curl -k https://files.xxx.local/index.php/apps/onlyoffice/download?doc=test
Returns:
{“message”:“Access denied”}
- Nextcloud logs:
- No ONLYOFFICE download requests visible in logs
- No errors related to document conversion
- JWT verification:
- Same secret configured in Nextcloud and ONLYOFFICE
- JWT enabled
- Header matches
- 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.