Onlyoffice integration into Nextcloud

Hello everyone,

i’ve setup 2 VMs one running Nextcloud and the other one running Onlyoffice (Installed via Snap).
The Onlyoffice VM uses a openssl Self Signed Certificate, while the Nextcloud uses a LetsEncrypt CA.

Let me describe my setup first:

  • 2 VMs running on the same Host
  • Nextcloud 23 (NC)
  • Ubuntu Server 20.04-LTS (Both VMs)
  • Onlyoffice Document Server (OO-DS) installed via Snap (Latest Build)
  • Nextcloud should be reachable from the Internet while the documentserver should only be reachable from the local network (for NC)

Now, i can reach the both VMs from each oder (OO → NC + NC → OO) and healthcheck on the OO Vm also returns true.
However when i try to connect the OO-Documentserver via the OO-Integration App in Nextcloud, i recieve the following Message: “Error when trying to connect (Error occured in the document service: Error while downloading the document file to be converted)”

Converter Logs shows this:

 [2022-26-01T22:17:50.413] [ERROR] nodeJS - error downloadFile:url=https://nextcloud.mydomain.com/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.tB-df7RJd6Wb7mYwZ4kq_goQEDCfaS-ASNkaXy0iZF0;attempt=3;code:null;connect:null;(id=conv_check_2042821037_docx)

I’ve already tried to:

  • Reinstall the Document Server
  • set “rejectedUnauthorized” to “false” in both local.json and default.json
  • Google Search Results which mostly lead to the step mentioned above
  • Updated all installed Packages to the latest Version
  • set verify_peer_off to true in config.php on NC
  • added the local IP of the OO-DS to config.php

I am running out of Idead, i’ve been looking for a Solution for about 6 Days now.
If anyone knows a possible Solution please do let me know.

Thanks alot in advance,
Fabian

Hi @sxge, can you send a screenshot of the configuration menu of onlyoffice app ( admin settings and hide private information)

I’m not sure but onlyoffice document server needs to be accessible from the internet if you want use it from outside your local network

No secret was configured by me so i left it blank
Unbenannt

Yes. I also think so, too.

@sxge
Please open the Nextcloud/OnlyOffice and switch with F12 to “network analysis”. Perhaps you find a hint.

i would understand it if i cant reach the document server directly from outside. But i should still be able to access it locally, shouldnt i? And Nextcloud tries to access it using the local IP.

yes normally, if you access your nextcloud from your local network

Do you use a proxy for your onlyoffice document server ? if yes see this link : Using ONLYOFFICE Docs behind the proxy - ONLYOFFICE

I tried accesing it from the local network too. Didnt work.

Seemed to be a issue with ufw not actually opening the required ports. Reinstalling UFW worked for me
thanks for the help my friends

1 Like

Hi @sxge ,

it is a long time ago since I did my setup so I do not know the details anymore.
I had to choose between if it is working from the internet or in LAN.
I could not get it working for both.

Since I use the programs (Excel on Computer) in LAN, OnlyOffice (WEB) in LAN was not necessary so I did not investigate any further.
Probably this helps.