TrueNAS Onlyoffice DocumentServer running behind NGINX

First time posting !

I am having a tough time getting Onlyoffice Document Server running with https in my env:
TrueNAS (TN) running the new docker environment.
Nginx-Proxy-Manager (works for Nextcloud) running as TN app
Nextcloud running as TN app

Trying to use Onlyoffice DocumentServer to edit word documents from Nextcloud. From what I read, I believe the external address must be https. So, https://nextcloud.mydomain.com uses https://oo.mydomain.com ; however, I cannot get OO to use my Cloudflare origin certificate.

So far, I have managed to start the docker container with the mounts pointed to persistent storage on the server with the correct certificate files (.crt and .key). So, in the running container, /certs/tls.crt and /certs/tls.key are my Cloudflare certificates. However, running curl -k https://… and openssl report using self-signed certificates. While I can get to the https://…/welcome screen, when I try https://…/example , I get 502 Bad Gateway.

My env vars SSL_CERTIFICATE_PATH and SSL_KEY_PATH point to the files in /certs. I do not use DHPARM (sp?) - but, I thought that was not required from what I read.

Any idea what else I can try to have OO use my Cloudflare certs?

Hello,

I believe this is useful guide:Installing ONLYOFFICE Docs for Docker on a local server
Have you set up permissions for .key file?
Also could you please reproduce the situation and collect entire Document server logs folder? It’s located here: /app/onlyoffice/DocumentServer/logs

As far as I understand, the Document server is located behind the Nginx proxy server. If so, it’s better to compare our config samples with your one: Using ONLYOFFICE Docs behind the proxy

I am hiving the same problem:

Onlyoffice is in docker behind nginx
same is mattermost behind nginx.
onlyoffice is reachable by http:// Lokal_IP:Port
the domain Onlyoffice.domain.net connects sucessfully to nginx.
nginx can get LE Certs for onlyoffice and the given domain.

BUT
it does not connect to the local IP

I am using Nginx Prox Manager
Proxy host points to local IP → http ->port
Websocket disabled, Cache assets and block common expoits enabled

custom location
set to IP and /
added:
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_read_timeout 3600s;
client_max_body_size 20m;

SSL
LE Certificate
sucessfully retrieved

advanced
noe entries.

spent already two days anon this issue!!

Hello there,
I personally don’t use Proxy Manager, but OO needs websocket to work, so you have to proxy that:

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

If you use Firefox you can look at the browser-console (usually F12) and see what responses you get while connecting to OO or opening a document.