[GH-ISSUE #664] ONLYOFFICE cannot be reached. Please contact admin #295

Closed
opened 2026-02-26 10:31:41 +03:00 by kerem · 4 comments
Owner

Originally created by @sjkhsl on GitHub (Sep 15, 2023).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/664

I have two instances of Nextcloud on the same machine. I configured the connector of both cases to use the same settings. The configuring was successful - I saw the message with the green label:

Settings have been successfully updated (version 7.4.1.36)

However, one instance of Nextcloud opens files with ONLYOFFICE successfully whereas the other instance does not:

ONLYOFFICE cannot be reached. Please contact admin

nextcloud config.php:

  array (
     "jwt_secret" => "xxxxxxx",
     "jwt_header" => "AuthorizationJwt",
     //'verify_peer_off' => TRUE,
  )

nginx:

upstream docservice {
  server xxx.xxx:9980;
}

map $http_host $this_host {
    "" $host;
    default $http_host;
}

map $http_x_forwarded_proto $the_scheme {
     default $http_x_forwarded_proto;
     "" $scheme;
}

map $http_x_forwarded_host $the_host {
    default $http_x_forwarded_host;
    "" $this_host;
}

map $http_upgrade $proxy_connection {
  default upgrade;
  "" close;
}

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

server {
  listen 9980 ssl;
  server_name xxx.xxx;

  ssl_certificate /etc/nginx/conf.d/xxx.xxx.crt;
  ssl_certificate_key /etc/nginx/conf.d/xxx.xxx.key;

  ssl_verify_client off;

  ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";

  ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
  #ssl_session_cache  builtin:1000  shared:SSL:10m;

  ssl_prefer_server_ciphers   on;

  ## [Optional] Before enabling Strict-Transport-Security headers, ensure your server is properly configured for SSL.
  ## This directive informs the browser to always use HTTPS. For more info see:
  ## - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  # add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
  # add_header X-Frame-Options SAMEORIGIN;
  add_header X-Content-Type-Options nosniff;

  ## [Optional] If your certficate has OCSP, enable OCSP stapling to reduce the overhead and latency of running SSL.
  ## Replace with your ssl_trusted_certificate. For more info see:
  ## - https://medium.com/devops-programming/4445f4862461
  ## - https://www.ruby-forum.com/topic/4419319
  ## - https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx
  # ssl_stapling on;
  # ssl_stapling_verify on;
  # ssl_trusted_certificate /etc/nginx/ssl/stapling.trusted.crt;
  # resolver 208.67.222.222 208.67.222.220 valid=300s; # Can change to your DNS resolver if desired
  # resolver_timeout 10s;

  ## [Optional] Generate a stronger DHE parameter:
  ##   cd /etc/ssl/certs
  ##   sudo openssl dhparam -out dhparam.pem 4096
  ##
  # ssl_dhparam /etc/ssl/certs/dhparam.pem;

  location / {
       proxy_pass http://192.168.2.3:9980;
       proxy_http_version 1.1;

  }
}
Originally created by @sjkhsl on GitHub (Sep 15, 2023). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/664 I have two instances of Nextcloud on the same machine. I configured the connector of both cases to use the same settings. The configuring was successful - I saw the message with the green label: `Settings have been successfully updated (version 7.4.1.36)` However, one instance of Nextcloud opens files with ONLYOFFICE successfully whereas the other instance does not: `ONLYOFFICE cannot be reached. Please contact admin` nextcloud config.php: ``` array ( "jwt_secret" => "xxxxxxx", "jwt_header" => "AuthorizationJwt", //'verify_peer_off' => TRUE, ) ``` nginx: ``` upstream docservice { server xxx.xxx:9980; } map $http_host $this_host { "" $host; default $http_host; } map $http_x_forwarded_proto $the_scheme { default $http_x_forwarded_proto; "" $scheme; } map $http_x_forwarded_host $the_host { default $http_x_forwarded_host; "" $this_host; } map $http_upgrade $proxy_connection { default upgrade; "" close; } proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $proxy_connection; proxy_set_header X-Forwarded-Host $the_host; proxy_set_header X-Forwarded-Proto $the_scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; server { listen 9980 ssl; server_name xxx.xxx; ssl_certificate /etc/nginx/conf.d/xxx.xxx.crt; ssl_certificate_key /etc/nginx/conf.d/xxx.xxx.key; ssl_verify_client off; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #ssl_session_cache builtin:1000 shared:SSL:10m; ssl_prefer_server_ciphers on; ## [Optional] Before enabling Strict-Transport-Security headers, ensure your server is properly configured for SSL. ## This directive informs the browser to always use HTTPS. For more info see: ## - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security # add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; # add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; ## [Optional] If your certficate has OCSP, enable OCSP stapling to reduce the overhead and latency of running SSL. ## Replace with your ssl_trusted_certificate. For more info see: ## - https://medium.com/devops-programming/4445f4862461 ## - https://www.ruby-forum.com/topic/4419319 ## - https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx # ssl_stapling on; # ssl_stapling_verify on; # ssl_trusted_certificate /etc/nginx/ssl/stapling.trusted.crt; # resolver 208.67.222.222 208.67.222.220 valid=300s; # Can change to your DNS resolver if desired # resolver_timeout 10s; ## [Optional] Generate a stronger DHE parameter: ## cd /etc/ssl/certs ## sudo openssl dhparam -out dhparam.pem 4096 ## # ssl_dhparam /etc/ssl/certs/dhparam.pem; location / { proxy_pass http://192.168.2.3:9980; proxy_http_version 1.1; } } ```
kerem 2026-02-26 10:31:41 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@igwyd commented on GitHub (Sep 15, 2023):

Hello @sjkhsl, one of the NextCloud servers does not detect the server, open a document on the NC when ONLYOFFICE cannot be reached and check the errors in the documentserver logs. Are NextCloud and ONLYOFFICE document server behind a proxy? The error may be in the proxy settings, try to check connecting without a proxy.

<!-- gh-comment-id:1720749250 --> @igwyd commented on GitHub (Sep 15, 2023): Hello @sjkhsl, one of the NextCloud servers does not detect the server, open a document on the NC when ```ONLYOFFICE cannot be reached``` and check the errors in the documentserver logs. Are NextCloud and ONLYOFFICE document server behind a proxy? The error may be in the proxy settings, try to check connecting without a proxy.
Author
Owner

@sjkhsl commented on GitHub (Sep 15, 2023):

NextCloud and ONLYOFFICE

NextCloud and ONLYOFFICE can be used in the intranet behind a proxy, but cannot be connected to the Internet after a proxy.

The error in nextcloud is a test error. There is no error after the configuration is correct and the connection can be made. However, when opening the document, an error is displayed. I suspect it is still a configuration problem with the proxy nginx.

<!-- gh-comment-id:1720784086 --> @sjkhsl commented on GitHub (Sep 15, 2023): > NextCloud and ONLYOFFICE NextCloud and ONLYOFFICE can be used in the intranet behind a proxy, but cannot be connected to the Internet after a proxy. The error in nextcloud is a test error. There is no error after the configuration is correct and the connection can be made. However, when opening the document, an error is displayed. I suspect it is still a configuration problem with the proxy nginx.
Author
Owner

@igwyd commented on GitHub (Sep 18, 2023):

Most likely yes - proxy, because 2 identical NextClouds one works and the other does not.

<!-- gh-comment-id:1722768743 --> @igwyd commented on GitHub (Sep 18, 2023): Most likely yes - proxy, because 2 identical NextClouds one works and the other does not.
Author
Owner

@igwyd commented on GitHub (Dec 28, 2023):

We close this issue. Feel free to comment or reopen it if you got further questions.

<!-- gh-comment-id:1870879469 --> @igwyd commented on GitHub (Dec 28, 2023): We close this issue. Feel free to comment or reopen it if you got further questions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#295
No description provided.