Solve "Document loading failed" errors with professional troubleshooting
This troubleshooting guide is based on the official Collabora Online proxy configuration documentation. For additional technical details and alternative setups, refer to:
This guide solves a complex issue where Nextcloud Office appears to connect to Collabora Online during tests, but fails when users try to open documents. Common in Cloudflare Tunnel + Apache + Docker environments.
90% of these issues are caused by Nextcloud's SSRF protection blocking localhost connections. Try this first:
If this doesn't work, continue with the full diagnostic process below.
First, identify the specific error patterns:
The most common cause is Nextcloud's security feature blocking local server connections:
For Cloudflare Tunnel environments, use the official SSL termination configuration:
Since Cloudflare Tunnel handles SSL termination, configure Collabora to expect HTTP internally but know it's behind HTTPS:
ssl.enable = false (HTTP internally)ssl.termination = true (Knows it's behind HTTPS)Open Developer Tools (F12) â Console tab while trying to open a document. Look for:
Try opening different document types:
Symptom: 404 errors for static assets (CSS, JS, images)
Solution: Ensure the /browser proxy configuration is present and properly configured
Symptom: "Socket connection closed unexpectedly"
Solution: Enable proxy_wstunnel module and verify WebSocket proxy rules
Symptom: Mixed content errors, connection refused
Solution: Set Collabora to SSL termination mode (ssl.enable=false, ssl.termination=true)