Onlyoffice integration not working

Hi there!

First i want to tell you about my infrastructure.

Nextcloud is running on CentOS7 at Its opened to the outside world behind an Apache and HTTPS is enabled with a cert by letsencrypt (added with certbot)

OnlyOffice Document server is running on CentOS7 at Its NOT opened to the outside world. The webserver there is an nginx and https is enabled with a self-signed cert.

In Nextcloud admin section i added the address for the onlyoffice plugin.
After a few seconds the connection is established.

Now when i head over to nextcloud webinterface and try to open a document (e.g a word doc) it takes a very very very very very long time where nothing happens. I see “Document loading” and after a while there is an error message, saying that the document cannot be stored.
When i click OK, i´ll be fired back to the folder overview within nextcloud.

I have no clue what i might have done wrong.

Just 4 Info.
I have added :
‘onlyoffice’ => array ( ‘verify_peer_off’ => TRUE ),

I think i might have an error within my nginx conf but i dont see any :frowning:

Maybe someone of you can help me.
Here is my nginx.conf for onlyoffice.

include /etc/nginx/includes/onlyoffice-http.conf;

## Normal HTTP host
server {
  listen [::]:80 default_server;
  server_name _;
  server_tokens off;

  ## Redirects all traffic to the HTTPS host
  root /nowhere; ## root doesn't have to be a valid path since we are redirecting
  rewrite ^ https://$host$request_uri? permanent;

#HTTP host for internal services
server {
  listen [::1]:80;
  server_name localhost;
  server_tokens off;
  include /etc/nginx/includes/onlyoffice-documentserver-common.conf;
  include /etc/nginx/includes/onlyoffice-documentserver-docservice.conf;

## HTTPS host
server {
  listen ssl;
  listen [::]:443 ssl default_server;
  server_tokens off;
  root /usr/share/nginx/html;

  ## Strong SSL Security
  ssl on;
  ssl_certificate /etc/nginx/ssl/nginx.crt;
  ssl_certificate_key /etc/nginx/ssl/nginx.key;
  ssl_verify_client off;

  ssl_ciphers HIGH:!aNull:!MD5;
  ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
  ssl_session_cache  builtin:1000  shared:SSL:10m;

  ssl_prefer_server_ciphers   on;

  add_header Strict-Transport-Security max-age=31536000;
  # add_header X-Frame-Options SAMEORIGIN;
  add_header X-Content-Type-Options nosniff;

  include /etc/nginx/includes/onlyoffice-documentserver-*.conf;


What i also found out in the meantime
If i am internally connected … it works.
If i connect externally … nothing works.
White page for a very long time and then “ONLYOFFICE cannot be reached. Please contact admin”

So i think the problem must be, that the document server is running on an internal address.