Nextcloud can't connect to Document Server

Do you want to: Ask a how-to question
For feature suggestions, describe the result you would like to achieve in detail.
For bug reports, provide the steps to reproduce and if possible a minimal demo of the problem.
Document Server version: 7.2.1
Type of installation of the Document Server (docker, deb/rpm, exe)
OS: rpm via Repo
Browser version: Firefox 107.0.1

I’m having an issue connecting ONLYOFFICE to Nextcloud. I am receiving the error “Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version”.
Both servers, Nextcloud and ONLYOFFICE Document Server, are running on separate servers on my LAN; both on AlmaLinux 8. Docker is not involved in any way. Both are using self-signed certificates. When I look at /var/log/onlyoffice/documentserver/converter/out.log I see this:

[ERROR] [localhost] [conv_check_365022798_docx] [userId] nodeJS - error downloadFile:url=https://tyrell.offworld.lan/nextcloud/index.php/apps/onlyoffice/empty?doc=a_bunch_of_characters;attempt=2;code:DEPTH_ZERO_SELF_SIGNED_CERT;connect:undefined Error: self signed certificate

I have read that a possible fix is to add this: use_unauthorized_storage=true
However, everywhere I have seen this is to add it as a variable in a Docker compose file. I also found it as a snap command but I don’t use snaps.
Is use_unauthorized_storage=true a possible fix? If so, where would I add this setting if I am not using Docker or Snapd?

I followed these directions on installing Document Server:

Further troubleshooting I tested by going to the Test Example site and received errors when attempted to access a file on the site. Same error seen when attempting to create a new document on the site and creating a document offline and uploading. The error is seen in the below screenshot:

More troubleshooting:

From my Nextcloud server I ran this command and received the error seen below:

sudo -u apache ./occ onlyoffice:documentserver --check
Error connection: Error occurred in the document service: Error while downloading the document file to be converted.

I confirmed I still receive the error after adding this to my Nextcloud config.php:

'onlyoffice' => array (
    'verify_peer_off' => true

Hello @t3kg33k

To disable certificate validation on Document Server’s side you have to set this parameter "rejectUnauthorized" to false in next config /etc/onlyoffice/documentserver/default.json

The issue with Test Example appeared after applying template of ds.conf config. To fix this you have to run next command bash

If you face any other issues please provide all log files of Document Server.

That worked. Thanks so much.