Seafile Connector Cannot Access Onlyoffice Behind NginX Proxy Manager

With Docker on an Ubuntu Server I am running Seafile, Onlyoffice and Nginx Proxy Manager (NPM). Seafile and Onlyoffice each have their own domain; files.domain.dlt and office.domain.dlt respectively. Both of those domains can be accessed without issues. Onlyoffice is spun up with the variables:

JWT_ENABLED=true
JWT_SECRET=REDACTED

Following the Seafile manual for Onlyoffice integration, I added the following to seahub_settings.py:

ENABLE_ONLYOFFICE = True
ONLYOFFICE_APIJS_URL = 'https://office.domain.dlt/web-apps/apps/api/documents/api.js'
ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods')
ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx')
ONLYOFFICE_JWT_SECRET = 'REDACTED'

When I open an office file in Seafile, I get redirected to Onlyoffice and then I get an error:

Onlyoffice document server log showing repeated error:

22:01.809] [ERROR] [localhost] [redacted] [redacted@auth.local] nodeJS - postData error: url = https://files.domain.dlt/onlyoffice/editor-callback/;data = {"key":"redacted","status":1,"users":["redacted@auth.local"],"actions":[{"type":1,"userid":"redacted@auth.local"}],"token":"redacted"} Error: connect ECONNREFUSED 172.19.0.22:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

[2025-02-05T16:22:18.370] [ERROR] [localhost] [redacted] [redacted@auth.local1] nodeJS - postData error: url = https://files.domain.dlt/onlyoffice/editor-callback/;data = {"key":"redacted","status":4,"actions":[{"type":0,"userid":"redacted@auth.local"}],"token":"redacted"} Error: connect ECONNREFUSED 172.19.0.22:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

[2025-02-05T16:22:19.595] [ERROR] [localhost] [redacted] [redacted@auth.local] nodeJS - postData error: url = https://files.domain.dlt/onlyoffice/editor-callback/;data = {"key":"redacted","status":1,"users":["redacted@auth.local"],"actions":[{"type":1,"userid":"redacted@auth.local"}],"token":"redacted"} Error: connect ECONNREFUSED 172.19.0.22:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

[2025-02-05T16:22:41.088] [ERROR] [localhost] [redacted] [redacted@auth.local2] nodeJS - postData error: url = https://files. domain.dlt/onlyoffice/editor-callback/;data = {"key":"redacted"} Error: connect ECONNREFUSED 172.19.0.22:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

[2025-02-05T17:17:15.060] [ERROR] [localhost] [redacted] [redacted@auth.local] nodeJS - postData error: url = https://files.domain.dlt/onlyoffice/editor-callback/;data = {"key":"redacted","status":1,"users":["redacted@auth.local"],"actions":[{"type":1,"userid":"redacted@auth.local"}],"token":"redacted"} Error: connect ECONNREFUSED 172.19.0.22:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

The Onlyoffice nginx log has the following log:

2025/02/05 16:21:58 [error] 837#837: *30 recv() failed (104: Unknown error) while reading response header from upstream, client: 2001:db8:22::11, server: , request: "GET /8.2.2-redacted/doc/redacted/c/?shardkey=redacted=4&transport=websocket HTTP/1.1", upstream: "http://[::1]:8000/doc/redacted/c/?shardkey=redacted=4&transport=websocket", host: "office.domain.dlt"

2025/02/05 16:21:58 [error] 837#837: *30 connect() failed (111: Unknown error) while connecting to upstream, client: 2001:db8:22::11, server: , request: "GET /8.2.2-redacted/doc/redacted/c/?shardkey=redacted=4&transport=websocket HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/redacted/c/?shardkey=redacted=4&transport=websocket", host: "office.domain.dlt"

2025/02/05 16:21:59 [error] 837#837: *33 connect() failed (111: Unknown error) while connecting to upstream, client: 172.19.0.17, server: , request: "GET /8.2.2-redacted/doc/redacted/c/?shardkey=redacted=4&transport=polling&t=PJMwnXi HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/redacted/c/?shardkey=redacted=4&transport=polling&t=PJMwnXi", host: "office.domain.dlt", referrer: "https://office.domain.dlt/8.2.2-redacted/web-apps/apps/spreadsheeteditor/main/index.html?_dc=8.2.2-22&lang=en&customer=ONLYOFFICE&type=desktop&frameEditorId=placeholder&isForm=false&parentOrigin=https://files.domain.dlt&fileType=xlsx"

2025/02/05 16:21:59 [error] 837#837: *33 connect() failed (111: Unknown error) while connecting to upstream, client: 172.19.0.17, server: , request: "GET /8.2.2-redacted/doc/redacted/c/?shardkey=redacted=4&transport=polling&t=PJMwnXi HTTP/1.1", upstream: "http://[::1]:8000/doc/redacted/c/?shardkey=redacted=4&transport=polling&t=PJMwnXi", host: "office.domain.dlt", referrer: "https://office.domain.dlt/8.2.2-redacted/web-apps/apps/spreadsheeteditor/main/index.html?_dc=8.2.2-22&lang=en&customer=ONLYOFFICE&type=desktop&frameEditorId=placeholder&isForm=false&parentOrigin=https://files.domain.dot&fileType=xlsx"

2025/02/05 20:14:59 [error] 1222#1222: *33 connect() failed (111: Connection refused) while connecting to upstream, client: 2001:db8:22::11, server: , request: "GET /example/ HTTP/1.1", upstream: "http://[::1]:3000/", host: "office.domain.dlt", referrer: "https://office.domain.dlt/welcome/"

2025/02/05 20:14:59 [error] 1222#1222: *33 connect() failed (111: Connection refused) while connecting to upstream, client: 2001:db8:22::11, server: , request: "GET /example/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "office.domain.dlt", referrer: "https://office.domain.dlt/welcome/"

The Onlyoffice connector log in Seafiles has those errors:

2025-02-05 21:32:19,637 [INFO] onlyoffice:128 get_onlyoffice_dict get doc_key redacted from database by repo_id redacted file_path /Documents/test (_30W Idle)-.xlsx
2025-02-05 21:35:09,469 [ERROR] onlyoffice:56 onlyoffice_editor_callback Request method is not POST.

I am assuming this is because NPM is not configured correctly for Onlyoffice. I could not find anywhere a working configuration for Nginx Proxy Manager.

Any help is greatly appreciated

Hello @Awesomepie
So far it seems that the issue is related to your proxy or DNS settings. Please check mutual availability between servers via curl or wget commands. For example, go to DS server and run wget https://files.domain.dlt and vice versa, from the Seafile server run wget office.domain.dlt.
Probably this title might be useful: Using ONLYOFFICE Docs behind the proxy - ONLYOFFICE
It contains config samples, please compare them with your one.