Can't connect to OnlyOffice to Nextcloud

I am having trouble trying to to connect the onlyoffice app to nextcloud. I am running on the latest version of Unraid OS 6.12.08. I have nextcloud installed via docker. I have the OnlyOfficeDocumentServer app installed via docker. I can access my server and nextcloud via cloudflare tunnels which I also have setup on the same server.

I created a cloudflare tunnel instance for the document server and it works and I can access the server address remotely. I have the secret inputted as well but when I input the same cloudflare address into the Server settings in Nextcloud for Onlyoffice I am getting an error of “Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version 8.0.1.31)”.

I have tried reinstalling nextcloud and the document server multiple times and I still cannot get it to work. When I look at the logs for the document server I am seeing:

[2024-03-26T10:35:31.413] [ERROR] [localhost] [conv_check_56695237_docx] [userId] nodeJS - error downloadFile:url=https://192.168.2.66:449/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.ENW2ha3tCGXc_FZzY7-B7_hCiGrRUgB3rj-tch7wZvE;attempt=3;code:DEPTH_ZERO_SELF_SIGNED_CERT;connect:null Error: self signed certificate

I don’t know how to where to download the logs for the document server in Unraid but if someone tells me I can provide those.

Hello @Ja55ie

Document Server does not validate self-signed certificates by default. To overwrite this behavior you need to set rejectUnauthorized to false in default.json config.

In Docker container with Document Server please locate this config in /etc/onlyoffice/documentserver/, change the value, save the change and restart Document Server services with command supervisorctl restart all. After that please try connecting again.

1 Like

Thank you! This fixed my issue. I went into Unraid Terminal, then hit docker ps command, then docker exec -it [ID] bash command then cd /etc/onlyoffice/documentserver/
command then selected nano default.json then changed the rejectUnauthorized value to false.

1 Like