AIO Collabora CODE document loading times out on UGREEN NAS

Environment

  • UGREEN DXP4800 GT, UGOS Pro, 32 GB RAM.
  • Kernel observed: 6.18.15.
  • Nextcloud AIO 14.4.1; Nextcloud Server 34.0.5; richdocuments 11.1.2.
  • Collabora CODE 26.04.5.1, build hash 22ce52fb51.
  • Collabora image ID: sha256:27d88184f5455bdf05e8e7d06b081d64bee34e43ef3f4a39c49a5be7d6092df7.
  • Official AIO-managed containers. Private HTTPS access through Tailscale Serve to loopback Apache port 11000. No public exposure.

Reproduction

Create a disposable blank DOCX using Nextcloud Files → New → Document → Blank. Open it in the browser. Collabora remains at Connecting/0%, eventually reports a document loading timeout, and retries. A user independently reproduced the spinning wheel with another document. File storage and normal Nextcloud access work.

Connection evidence

  • Browser editor POST: HTTP 200.
  • Collabora WebSocket upgrade: HTTP 101.
  • Both WOPISrc and WebSocket load URL use http://nextcloud-aio-apache.nextcloud-aio:23973.
  • richdocuments wopi_url and wopi_callback_url use that internal address; public_wopi_url is the private Tailscale HTTPS hostname.
  • Collabora’s /hosting/wopiAccessCheck, with the internal Nextcloud /status.php as callback, returns Ok.
  • Discovery and capabilities checks pass; supported richdocuments:activate-config with the existing callback explicitly supplied exits 0, but does not fix editing.
  • Separate requests from Collabora to the private Tailscale hostname fail DNS resolution, including remote font configuration. Whether these auxiliary failures cause the loading stall is unresolved; they must not be conflated with the confirmed internal WOPI URL.

Failure evidence

Browser WebSocket messages:

error: cmd=load kind=docloadtimeout
error: cmd=load kind=docunloading

Collabora logs repeatedly state that a document at the internal WOPI address is taking too long to load, then kill its worker after per_document.limit_load_secs=100. The corresponding records show oomkilledcount=0.

Startup also logs:

  • usernamespace root mount failed with EACCES;
  • fallback to coolforkit-caps;
  • bind-mount failure, followed by disabling bind-mounting for the run;
  • proof RSA key could not be opened.

These are observations, not established causes.

Native security/runtime evidence

  • CapAdd: SYS_ADMIN, SYS_CHROOT, FOWNER, CHOWN — matches AIO v14.4.1’s definition.
  • CapDrop: NET_RAW.
  • Privileged=false; runtime=runc; AppArmor profile=docker-default.
  • A custom Docker seccomp profile is present; its first explicit allow group includes unshare, mount, setns, clone, chroot and umount2.
  • Kernel unprivileged_userns_clone=1; max_user_namespaces=125932.
  • Processes report Seccomp=2; kit workers have an additional seccomp filter and NoNewPrivs=1.
  • Collabora container is running/healthy, not restarting, OOMKilled=false. This is not a complete memory assessment.
  • A bounded scan of recent Nextcloud log data found no richdocuments entries; this is not a claim that all historical logs are clean.

Attempted remedies / diagnostics

  1. Re-activated existing richdocuments configuration, preserving internal callback; successful validation, no improvement.
  2. Restarted only the Collabora container; returned healthy, user confirmed the document still spins.
  3. Checked SIGUSR2 handler behaviour against the installed source revision, verified the live handler is registered, and requested a diagnostic backtrace. Collabora remained healthy. Output from multiple workers interleaves; visible frames include ppoll, SocketPoll::poll, KitSocketPoll::kitPoll, and the LibreOffice event loop. These traces do not identify a specific root cause and should not be presented as proof of a deadlock.

No sandbox protections were disabled, no privileges expanded, no global NAS DNS changes, no unrelated service restarts, and no data deletion/reinstallation.

Questions for maintainers

  1. Is CODE 26.04.5.1 known to stall before document load in the capability-based/copying fallback under docker-default AppArmor on this kernel?
  2. Can failure to retrieve the public remote-font configuration block loading despite successful internal WOPI connectivity? Is there an AIO-supported way to route it internally?
  3. What narrowly scoped logging or per-worker diagnostic would distinguish a blocked WOPI/preset fetch from a worker initialization failure?
  4. Is there a recommended supported AIO/CODE version or configuration change for this exact combination?

Please advise before any weakening of security settings or replacement of AIO-managed container configuration.

Update: this is now resolved, and browser Office editing works.

The successful fix addressed two internal network problems in this particular Tailscale/UGREEN setup:

  • Collabora’s Docker DNS resolver could not resolve the private Nextcloud hostname.
  • Even when DNS was bypassed with the correct tailnet IP and TLS SNI, NAS-local HTTPS reached UGREEN’s nginx and presented its self-signed certificate, rather than reaching Nextcloud through Tailscale Serve.

We added an internal Caddy proxy on the existing nextcloud-aio Docker network, with the private hostname as a network alias, proxying to AIO Apache on port 11000. Caddy obtains the hostname’s certificate through Tailscale. External access still uses Tailscale Serve; no public ports or TLS-verification bypasses were introduced, and Collabora’s sandbox settings were not weakened.

The permanent setup uses a stable shared Tailscale socket directory and restart policies. Socket access is a trust boundary: a read-only socket mount does not restrict the API to read-only operations.

Verified: internal DNS/TLS and Collabora’s access check pass, browser Office works, recovery after a Tailscale restart works without restarting Caddy, and a separate Caddy restart also recovers correctly. Unrelated services were preserved. A full NAS reboot has not been tested.

The earlier worker/sandbox warnings did not require security changes to resolve the loading problem. Successful internal WOPI connectivity alone had not ruled out failures on the private HTTPS path.

Posting this follow-up in case it helps others with a similar topology. Thank you!

Hi! Thanks for sharing your detailed troubleshooting steps.

I noticed that Collabora can reach Nextcloud through the internal Docker network, but you’re also seeing connectivity issues involving your Tailscale domain.

Could you share which version of Tailscale you’re currently running?

I’ve experienced a very similar issue with Nextcloud AIO and Collabora. After upgrading Tailscale to version 1.104.1, requests from the Nextcloud container to my public Tailscale Funnel URL started failing with Connection refused on port 443, and Collabora could no longer open documents.

Downgrading Tailscale to version 1.102.5 immediately restored connectivity, and Collabora started working again. Another user reported the same result after upgrading to Tailscale 1.104.2.

There’s an ongoing discussion about similar connection issues in the Tailscale repository:

If you’re running Tailscale 1.104.x, would you consider testing a rollback to 1.102.5, if it’s safe and practical in your setup? It would be interesting to see whether that makes any difference in your case, although your DNS resolution errors may have a different cause.

Thanks, and please let us know what you find!