Summary
When Collabora Online (built-in CODE server via Nextcloud's richdocumentscode app) is deployed behind a reverse proxy (HAProxy) with HTTP/2 enabled end-to-end, document loading fails due to WebSocket tunneling incompatibilities. HTTP/2 support for WebSocket connections (RFC 8441) would resolve this.
Environment
- Collabora Online: built-in CODE server (richdocumentscode Nextcloud app)
- Nextcloud version: latest (as of April 2026)
- Reverse proxy: HAProxy 3.2.14 (OPNsense)
- Web server: Apache + php-fpm
- Internal Collabora port: 9983 (HTTP, no TLS)
- OS: RHEL-based Linux
Current Behavior
When HAProxy has HTTP/2 enabled on the backend connection (HAProxy → Apache/Nextcloud), the WebSocket tunnel through Nextcloud's proxy.php fails with:
net::ERR_HTTP2_PROTOCOL_ERROR
net::ERR_CONTENT_LENGTH_MISMATCH
Document loading failed due to timeout: Please check for failing network requests
The coolwsd process runs correctly on port 9983 and responds to direct HTTP requests:
curl http://localhost:9983/
OK
The issue is not with coolwsd itself, but with the WebSocket tunneling layer when HTTP/2 is involved in the proxy chain.
Workaround
Force HTTP/1.1 on the HAProxy backend connection. This works but prevents end-to-end HTTP/2 optimization:
- Disable HTTP/2 on HAProxy backend pool
- Keep only
HTTP/1.1 in ALPN for backend
- Add
timeout tunnel 3600s to backend options
Expected Behavior
Collabora Online should work correctly in HTTP/2 reverse proxy environments. WebSocket over HTTP/2 has been standardized since RFC 8441 (September 2018) — nearly 8 years ago.
Feature Request
- Ensure
coolwsd fully supports RFC 8441 (WebSocket over HTTP/2)
- Ensure the WebSocket handshake and tunneling work correctly when the proxy chain uses HTTP/2 (either end-to-end or partially)
- Document the recommended HAProxy/nginx configuration for HTTP/2 deployments in the official docs
Why This Matters
HTTP/2 is now the standard for modern web deployments and brings significant performance improvements (multiplexing, header compression, reduced latency). Requiring a downgrade to HTTP/1.1 on the backend is a workaround that should not be necessary in 2026.
References
Summary
When Collabora Online (built-in CODE server via Nextcloud's
richdocumentscodeapp) is deployed behind a reverse proxy (HAProxy) with HTTP/2 enabled end-to-end, document loading fails due to WebSocket tunneling incompatibilities. HTTP/2 support for WebSocket connections (RFC 8441) would resolve this.Environment
Current Behavior
When HAProxy has HTTP/2 enabled on the backend connection (HAProxy → Apache/Nextcloud), the WebSocket tunnel through Nextcloud's
proxy.phpfails with:The
coolwsdprocess runs correctly on port 9983 and responds to direct HTTP requests:The issue is not with
coolwsditself, but with the WebSocket tunneling layer when HTTP/2 is involved in the proxy chain.Workaround
Force HTTP/1.1 on the HAProxy backend connection. This works but prevents end-to-end HTTP/2 optimization:
HTTP/1.1in ALPN for backendtimeout tunnel 3600sto backend optionsExpected Behavior
Collabora Online should work correctly in HTTP/2 reverse proxy environments. WebSocket over HTTP/2 has been standardized since RFC 8441 (September 2018) — nearly 8 years ago.
Feature Request
coolwsdfully supports RFC 8441 (WebSocket over HTTP/2)Why This Matters
HTTP/2 is now the standard for modern web deployments and brings significant performance improvements (multiplexing, header compression, reduced latency). Requiring a downgrade to HTTP/1.1 on the backend is a workaround that should not be necessary in 2026.
References