OnlyOffice integration (Application) working with Nextcloud

Nextcloud: 31.0.6
Debian 12.8
onlyoffice-documentserver 9.0.2-9
"I’m unable to get the OnlyOffice integration (Application) working with Nextcloud. I’m using an internal network, with both servers (Nextcloud and OnlyOffice Document Server) running on HTTPS and the latest versions. Both were manually installed on Debian 12.8 servers. The certificates were generated by the internal CA (Zentyal 8 – Domain Controller used in the internal network).

I’ve tried so many procedures that I’m now completely lost, as none of them worked. I’ve even rebuilt the servers a few times without success.

The error occurs when I go to the application in Administration Settings => OnlyOffice, and after I enter the OnlyOffice server address and the secret key and click ‘Save’, I get the following error: ‘Error when trying to connect (Document service error: Error while downloading the document file to be converted.) (version 9.0.2.9).’

I’ve performed several communication tests between the Nextcloud and OnlyOffice servers, and they all succeed. For example, simple tests from each server using the following commands:

On the Nextcloud server:

  • curl -k -X POST https://onlyoffice_ip/ConvertService.ashx
  • curl -Iv https://onlyoffice_ip

On the OnlyOffice server:

  • curl -Ik "https://nextcloud_ip/index.php/apps/richdocuments/...jwt=TOKEN"
  • curl -Iv https://nextcloud_ip

Note: All of these commands, and others used to simulate connectivity in both directions, return successfully.

Does anyone have a solution that could help me get this integration working? I need it so that when I click a document in Nextcloud, it opens the OnlyOffice editor in the browser."