OO Docs-enterprise: Connectivity Issues with OnlyOffice and Nextcloud via HTTPS and Custom Domain

Hello,

I am experiencing issues connecting OnlyOffice and Nextcloud, both hosted in separate Docker containers on a Debian VM on Proxmox.

  • When accessing via Tailscale IP and using the OnlyOffice Tailscale IP in the connector, everything functions correctly.

Below are the configurations and symptoms of the problems I am facing:

  • Host: Debian VM on Proxmox
  • Containers: OnlyOffice and Nextcloud running in separate Docker containers
  • Network: Both the VMs are part of my Tailscale network

OnlyOffice Docker Compose Configuration:

services:
  documentserver-ee:
    stdin_open: true
    tty: true
    ports:
      - 8181:80
    restart: always
    volumes:
      - /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice
      - /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data
      - /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice
      - /app/onlyoffice/DocumentServer/db:/var/lib/postgresql
    environment:
      - JWT_SECRET=secret
    image: onlyoffice/documentserver-ee

Caddy Configuration on LXC (part of the tailscale network):
I have configured Caddy to handle requests for nextcloud.mydomain.com and onlyoffice.mydomain.com, translating them to their respective internal IPs. This functions correctly.

# Nextcloud
nextcloud.mydomain.com {
   reverse_proxy http://100.xx.xx.xx:8080
   import cloudflare
}

# OnlyOffice
onlyoffice.mydomain.com {
   reverse_proxy http://100.xx.xx.xx:8181
   import cloudflare
}

Issue Description:

  • After setting up HTTPS access via nextcloud.mydomain.com and onlyoffice.mydomain.com using a guide and adding a CNAME in Cloudflare DNS pointing to the FQDN of the Caddy LXC:
    • Using the local IP or Tailscale IP in the connector results in:
      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)
      
    • Using https://onlyoffice.mydomain.com results in:
      Error when trying to connect (cURL error 6: Could not resolve host: onlyoffice.mydomain.com) for https://onlyoffice.mydomain.com/healthcheck
      

Additional Logs:

  • The out.log of the converter shows:
    [2024-04-14T06:45:19.532] [ERROR] [localhost] [conv_check_1935636965_docx] [userId] nodeJS - dnsLookup error: hostname = nextcloud.mydomain.com Error: getaddrinfo ENOTFOUND nextcloud.mydomain.com
    
  • Network diagnostics within the OnlyOffice Docker container show that dig resolves nextcloud.mydomain.com to the correct FQDN, but ping fails to recognize the name.

Attempts to Resolve:

  • Explicitly added Cloudflare’s DNS to the Docker compose.
  • Tried using network_mode: "host", both to no avail.

I’ve reached a point where I’m unsure how to proceed. Here are my full logs for more details: this is the zip of my log-folder

I might have missed some steps, especially regarding the transition to HTTPS and using a custom domain, but I don’t have a clue atm.

Any help is much appreciated!

Hi @Maurits2828 :wave:

OO Docs-enterprise

As I can see, you are using Enterprise Edition, if you have an active license or trial license, I’d recommend contacting us via Zendesk to get prompt replies

There is an issue with resolving [nextcloud.****.org] name.

Try adding the IP/domain name pair for [nextcloud.****.org] to /etc/hosts file inside the DS container.

Hi Nikolas, thanks for your reply. I don’t have a Zendesk account (I tried “I forgot my password” but I’m not getting an email). I bought the OO Docs Home Server licence, so probably has something to do with that.

I’ve added 192.168.178.241 nextcloud.mydomain.com to /etc/hosts in DS container, which results in a connection refused: Error: connect ECONNREFUSED 192.168.178.241:80. Which isn’t suprising as nextcloud is running on 8080.

[2024-04-16T09:12:07.170] [ERROR] [localhost] [conv_check_822905409_docx] [userId] nodeJS - error downloadFile:url=http://nextcloud.mydomain.org/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.YZhIdQ5yIPXFiDTcAR2OlpAlMcsP8XQArhWW-5SUqEY;attempt=3;code:ECONNREFUSED;connect:null Error: connect ECONNREFUSED 192.168.178.241:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

I’m using the tailscale IP of the DS container (in nextcloud) atm and it seems to connect: Settings have been successfully updated (version 8.0.1.31). This is without adding any lines to /etc/hosts.

But when I click on a docx file:
ONLYOFFICE cannot be reached. Please contact admin

And I can’t find any logs with this timestamp, so it seems there’s no debug log somewhere about this.

Hello, @Maurits2828

Could you please send the complete compose file that you used to deploy NC and OO Docs?

Also, please attach the local.json file (located in container) /etc/onlyoffice/documentserver/local.json

and a screenshot of the connector settings for ONLYOFFICE in NextCloud.

Thanks for your reply.
Regarding the connector settings, apart from the tailscale IP, I’ve also tried the addresses: https://onlyoffice.domain.org and http://192.168.178.241:8181. All 3 addresses lead to the “ONLYOFFICE Docs Enterprise Edition installed”-page where I can generate a new JWT-secret.

For now I’ve set the tailscale-IP. As long as I connect to nextcloud using the nextcloud-tailscale-ip, onlyoffice is working. It’s not https though.

The files + screenshot can be downloaded here:

If you need more info, please let me know.

@Maurits2828 , during testing of your .yml files, no issues with the solution’s functionality were observed.

It seems the problem lies indeed in the network settings. Currently, suspicions are directed towards Caddy LXC. We have configurations for using ONLYOFFICE Docs behind the proxy

The simplest way to check is to activate the checkbox in the integration settings: Connect to demo ONLYOFFICE Docs server.

Additionally, we have a solution for Docker installation to install and configure Document Server and Nextcloud with just a couple of commands.