Collabora “Socket Connection Failed” After Nextcloud Hub 9 (30.0.6) Update, Even with Demo Servers
I have two different Nextcloud setups:
Nextcloud A: Recently upgraded to Hub 9 (30.0.6)
Nextcloud B: Still on an older Nextcloud version (pre-30.0.6)
They both point to the same Collabora environment. One is my own Collabora server (Docker & reverse proxy), and I’ve also tested official Collabora demo servers. Here’s what’s odd:
Nextcloud B (older version) works fine with Collabora—no errors.
Nextcloud A (the updated instance) shows this message every time I open a document:
“Socket connection could not be established or was unexpectedly closed. The reverse proxy may be misconfigured…”
Even if I switch Nextcloud A to use a Collabora demo server (which definitely works in other setups), I get the same error. Notably, before the Hub 9 update, Nextcloud A worked perfectly as well.
1) Redacted Config Overview
Reverse Proxy (Apache)
Standard ProxyPass and ProxyPassMatch for /cool/(.*)/ws$ to handle WebSockets, plus SSL termination at Apache.
Configuration is effectively identical for both Nextcloud instances (just different hosts).
Collabora
Docker container listening on 127.0.0.1:9980, environment variable domain=.* to allow any domain.
coolwsd.xml includes <alias_groups> for both Nextcloud hosts (protocol strings removed).
Collabora logs mention read-only systemplate warnings and missing shared presets—common but typically non-fatal.
Nextcloud A (Hub 9 / 30.0.6)
Reinstalled the “Collabora Online” (richdocuments) app from scratch.
'allow_local_remote_servers' => true in config.php.
Collabora URL set to either my own Collabora server or an official demo server.
Result:
Despite all these adjustments, Nextcloud A fails with the WebSocket/Socket error every time.
2) Error Details & Logs
Browser Error
“Socket connection could not be established or was unexpectedly closed…”
Nextcloud Logs
Occasionally an XML parse error: “Call to a member function xpath() on bool,” implying invalid WOPI discovery XML is returned (or Nextcloud thinks so).
Curl Tests
If I curl -I the Collabora /hosting/discovery endpoint from Nextcloud A’s server, I get valid XML—so basic connectivity is there.
Meanwhile, Nextcloud B (older version) + same Collabora config = no errors whatsoever.
3) Observations
The older Nextcloud setup (B) works fine, so the Collabora and reverse proxy configuration can’t be fundamentally broken.
Nextcloud A started having the socket issue only after upgrading to Hub 9 / version 30.0.6.
This happens with my local Collabora server and official Collabora demo servers—both are known to be properly configured.
Hence, it strongly suggests that something in Nextcloud A’s updated environment (possibly a new security measure or plugin conflict) is blocking or breaking the Collabora handshake.
4) Questions / Request for Help
Has anyone else encountered this “Socket connection failed” situation with Collabora specifically after moving to Nextcloud Hub 9 (30.0.x)?
Could there be new checks in the richdocuments app that kill the WOPI handshake or WebSockets?
Any pointers on debugging Nextcloud’s handling of Collabora’s discovery or the socket?
I’d be grateful for any insights or experiences. Thanks in advance!
I just downgraded the Nextcloud Office app to 8.6.1 and now I can open documents. After updating to 8.6.2 it’s broken again. So it seems to be an issue with the new app.