Problem with Nextcloud 18 and OnlyOffice Desktop Editor v 5.4.2.30

Hi,

I got a problem when I’am trying to connect OnlyOffice Desktop Editor (Ubuntu 18.04) to my Nextcloud, I got an timeout and this error message :
ERROR:cert_verify_proc_nss.cc(921)] CERT_PKIXVerifyCert for nextcloud.domain.name failed err=-8179

I got two VM, one for nextcloud and one for OnlyOffice, The installation of the app OnlyOffice on the Nextcloud server worked well. And when I am using Onlyoffice from a web browser through nextcloud server is worked well too.

The both server got a HTTPS configuration with an CA authority self signed. I added this CA in /usr/local/share/ca-certificates/

For try, I added the CA on the client VM (Ubuntu 18.04) but that not resolve the problem…

I Modified the config.php from Nextcloud for connect to OnlyOffice :
'onlyoffice' => array ( 'verify_peer_off' => TRUE, ),

The both servers works on Ubuntu 18.04, and I follow Install instructions from the official site.
All DNS records are update from /etc/hosts for the 3 VM.

Here my configurations files :

Nextcloud config.php

<?php
$CONFIG = array (
  'instanceid' => 'string',
  'passwordsalt' => '+string',
  'secret' => '+string',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.domain.name',
    1 => 'lan network*',
  ),
  'datadirectory' => '/usr/share/nginx/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '18.0.1.3',
  'overwrite.cli.url' => 'https://nextcloud.domain.name',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'cloud',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'onlyoffice' => array ( 'verify_peer_off' => TRUE, ),
  "log_type" => "file",
  "logfile" => "/var/log/nextcloud.log",
  "loglevel" => "1",
  "logdateformat" => "F d, Y H:i:s",
);

Nextcloud NGINX :

server {
    listen IP_LAN_NEXTCLOUD_SERVER:443 ssl http2;
    server_name nextcloud.domain.name;

#ssl
    ssl_certificate /etc/nginx/ssl/Nextcloud.crt;
    ssl_certificate_key /etc/nginx/ssl/Nextcloud.key;
    ssl_protocols TLSv1.2 TLSv1.1 TLSv1;

# Add headers to serve security related headers
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
    add_header Referrer-Policy no-referrer;

#I found this header is needed on Ubuntu, but not on Arch Linux. 
add_header X-Frame-Options "SAMEORIGIN";

# Path to the root of your installation
root /usr/share/nginx/nextcloud/;

access_log /var/log/nginx/nextcloud.access;
error_log /var/log/nginx/nextcloud.error;

location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
}

    # The following 2 rules are only needed for the user_webfinger app.
    # Uncomment it if you're planning to use this app.
    #rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
    # last;

    location = /.well-known/carddav {
        return 301 $scheme://$host/remote.php/dav;
    }
    location = /.well-known/caldav {
       return 301 $scheme://$host/remote.php/dav;
    }

    location ~ /.well-known/acme-challenge {
      allow all;
    }

    # set max upload size
    client_max_body_size 1024M;
    fastcgi_buffers 64 4K;

    # Disable gzip to avoid the removal of the ETag header
    gzip off;
    # Uncomment if your server is build with the ngx_pagespeed module
    # This module is currently not supported.
    #pagespeed off;

    error_page 403 /core/templates/403.php;
    error_page 404 /core/templates/404.php;

    location / {
       rewrite ^ /index.php$uri;
    }

    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
       deny all;
    }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
       deny all;
     }

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
       include fastcgi_params;
       fastcgi_split_path_info ^(.+\.php)(/.*)$;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       fastcgi_param PATH_INFO $fastcgi_path_info;
       #Avoid sending the security headers twice
       fastcgi_param modHeadersAvailable true;
       fastcgi_param front_controller_active true;
       fastcgi_pass unix:/run/php/php7.2-fpm.sock;
       fastcgi_intercept_errors on;
       fastcgi_request_buffering off;
    }

    location ~ ^/(?:updater|ocs-provider)(?:$|/) {
       try_files $uri/ =404;
       index index.php;
    }

    # Adding the cache control header for js and css files
    # Make sure it is BELOW the PHP block
    location ~* \.(?:css|js)$ {
        try_files $uri /index.php$uri$is_args$args;
        add_header Cache-Control "public, max-age=7200";
        # Add headers to serve security related headers (It is intended to
        # have those duplicated to the ones above)
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;
        add_header Referrer-Policy no-referrer;
        # Optional: Don't log access to assets
        access_log off;
   }

   location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
        try_files $uri /index.php$uri$is_args$args;
        # Optional: Don't log access to other assets
        access_log off;

OnlyOffice local.json :

{
  "services": {
    "CoAuthoring": {
      "sql": {
        "dbHost": "localhost",
        "dbName": "onlyoffice",
        "dbUser": "onlyoffice",
        "dbPass": "onlyoffice"
      },
      "redis": {
        "host": "localhost"
      },
      "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "Authorization"
        },
        "outbox": {
          "header": "Authorization"
        }
      },
      "secret": {
        "inbox": {
          "string": "topsecrettoken"
        },
        "outbox": {
          "string": "topsecrettoken"
        },
        "session": {
          "string": "topsecrettoken"
        }
      }
    }
  },
  "rabbitmq": {
    "url": "amqp://guest:guest@localhost"
  }
}

OnlyOffice NGINX :

include /etc/nginx/includes/http-common.conf;
server {
  listen IP_LAN_ONLYOFFICE_SERVER:443 ssl http2;
  server_tokens off;
  server_name onlyoffice.domain.name;

#ssl
  ssl_certificate /etc/nginx/ssl/OnlyOffice.crt;
  ssl_certificate_key /etc/nginx/ssl/OnlyOffice.key;
  ssl_protocols TLSv1.2 TLSv1.1 TLSv1;


  include /etc/nginx/includes/ds-*.conf;
}

EDIT : Now when I’ am using nextcloud and onlyoffice accross web browser and from an another machine I got the follow error message :

OnlyOffice is unavailable. Please contact your administrator.

Anyone could help me plz ?

Thanks for reading,