TrueNAS Collabora app: custom Web UI port causes 502 Bad Gateway

Hello Collabora Team,
I’m running Collabora on TrueNAS SCALE using the official TrueNAS app.
Environment

  • TrueNAS SCALE: 25.10.6
  • Collabora App Version: 26.04.4.1.1
  • TrueNAS App Version: 1.5.30
    I found what appears to be a port-mapping issue when configuring a custom Web UI port.
    With the Web UI port set to 30002, the application containers report as healthy, but accessing the Web UI returns:
    502 Bad Gateway
    The nginx container logs show that it is attempting to connect to Collabora on the internal port 9980:

connect() failed (111: Connection refused) while connecting to upstream
upstream: "http://172.16.12.2:9980/browser/dist/admin/admin.html"

upstream: "http://172.16.12.2:9980/hosting/discovery"

Inspecting the Collabora container shows that coolwsd is actually started with:


/usr/bin/coolwsd ... --port 30002

The container’s Docker port configuration, however, exposes the expected internal port:


9980/tcp

The nginx configuration also consistently proxies to:


collabora:9980

Therefore, with a custom Web UI port of 30002, the effective configuration becomes:


nginx → collabora:9980
                 ↑
          nothing listening
                 
coolwsd → 30002

As a test, I changed only the TrueNAS Web UI port from 30002 to 9980. After redeployment, Collabora immediately became accessible and the 502 error disappeared.
This suggests that the Web UI port setting is currently being used as Collabora’s internal listening port, while the bundled nginx configuration continues to expect Collabora on port 9980.
Could you please confirm whether custom Web UI ports are expected to be supported in this TrueNAS deployment, and if so, whether this port mapping can be corrected?
Ideally, the configuration should allow something like:


TrueNAS host:30002 → Collabora container:9980

while nginx continues to communicate with Collabora internally on 9980.
I can provide additional container inspection output or logs if needed.
Thank you.

Hello,

Thank you for the detailed report. Your analysis is correct. This is a bug in the TrueNAS app template, not in Collabora Online itself.

When a certificate is configured, the app puts an nginx container in front of Collabora. The template starts coolwsd on the WebUI port you choose (–port 30002), but the bundled nginx configuration always proxies to collabora:9980. The two only line up when the WebUI port is 9980, which is why your test fixed it.

The app is maintained by the TrueNAS team at GitHub - truenas/apps · GitHub (under ix-dev/stable/collabora), so the fix needs to happen there. The simplest correction is for the nginx configuration to proxy to the configured WebUI port instead of the fixed 9980. Please open an issue on that repository and include your findings; the nginx and coolwsd lines you quoted are exactly what they need.

Until it is fixed, you can keep the WebUI port at 9980, or disable the certificate option and terminate TLS in your own reverse proxy.

I hope this helps Thanks
Darshan