Stop ONLYOFFICE Co-Editing Lag by Finding the Bottleneck

When ONLYOFFICE co-editing feels slow on a self-hosted Docker server, first determine whether the delay follows the server, the network path, or a particular document. Measure the same editing session before changing anything: check container and host resource use, then confirm that your reverse proxy passes the live editor connection correctly. Add CPU, memory, or more infrastructure only when those measurements show a capacity limit.

1. Reproduce the lag and check the server before tuning it

Ask two editors to open the same document and make a small change at the same time. Note whether typing lags for both users, whether one user sees updates late, and whether the issue occurs with every file or only one large or complex file. This simple comparison helps separate a general service problem from a document-specific workload.

On the Docker host, identify the Document Server container and watch its resource use while the lag occurs:

docker ps
 docker stats <container_name_or_id>

Look for sustained CPU saturation, memory approaching the host or container limit, swap activity, or a container that restarts. Also check host disk space and I/O if saves or document loading pause. A short spike is less conclusive than a bottleneck that lines up with the slow edits. The ONLYOFFICE Docker troubleshooting page notes that memory use rises with open documents and concurrent users; it gives 2–4 GB as normal for a server with a few dozen active users, but that is not a universal sizing guarantee.

Terminal-style Docker stats view showing a documentserver container with CPU and memory columns
Illustrative terminal view of the CPU and memory fields to watch while reproducing co-editing lag.

Remember that ONLYOFFICE counts a concurrent active user as someone with a document open, whether editing or viewing. Compare your peak open-editor count with the edition-specific Community Docker system requirements. The published figures are reference configurations, and the documentation says actual capacity depends on document type and size.

2. If editors reconnect, inspect the proxy and network path

If the editor loads but co-editors repeatedly disconnect, or the delay appears only through your public URL, inspect the reverse proxy before adding server resources. WebSocket is the persistent connection used for live editor traffic. A proxy that closes or fails to upgrade that connection can make edits appear delayed or cause reconnects.

Check the proxy’s access and error logs during one laggy session. Confirm that your configuration forwards the HTTP Upgrade and Connection headers and preserves the original host and protocol. For NGINX, compare your setup with ONLYOFFICE’s official proxy examples; the documentation specifically calls out forwarded X-Forwarded-Proto and X-Forwarded-Host headers. Do not paste a sample wholesale if your TLS termination, path prefix, or proxy topology differs.

Dark configuration editor showing proxy_http_version 1.1 and WebSocket Upgrade and Connection headers
Illustrative reverse-proxy configuration view highlighting the HTTP upgrade headers to verify in your own configuration.

Also test from a client on the same LAN and from the normal remote route. If the LAN session is responsive while the public route is slow, investigate proxy, firewall, VPN, DNS, or WAN latency. If both routes lag at the same time, server-side load becomes more likely. Browser developer tools can help: repeated WebSocket disconnects point toward connection handling, while a stable connection with slow editing on a saturated host points toward capacity or workload.

Terminal-style log window with repeated WebSocket disconnect and reconnect entries
Illustrative log view showing the kind of repeated WebSocket reconnect pattern that warrants checking proxy and network logs.

3. Choose Fast or Strict for the workflow, not as a server fix

ONLYOFFICE offers Fast co-editing, which is the default and shows other users’ edits in real time, and Strict co-editing, which holds changes until a user saves them. The co-editing documentation describes the difference in how changes are displayed. Strict can suit teams that prefer to review and apply changes in batches; Fast is the natural choice when immediate shared visibility matters.

Changing modes does not repair a saturated CPU, a constrained memory limit, or a broken WebSocket route. Treat the mode as a collaboration preference, then compare the same file and user count in each mode only if your team is deciding which workflow fits. Avoid presenting a mode switch as a guaranteed performance improvement.

Two browser document windows showing collaborators editing separate highlighted passages
Illustrative co-editing view of two users working in the same document; it represents the collaboration flow, not a measured test.

4. Scale only after the measurements identify capacity pressure

If lag occurs across documents and users while CPU remains saturated, memory is constrained, or containers restart, first give Document Server adequate host resources and verify that Docker limits do not undercut the host. Then retest. The published Community Edition Docker reference lists 4 GB RAM and storage requirements that vary by concurrent-user band; for more than 400 concurrent active users it recommends a cluster deployment and points to Kubernetes. Use those figures as a planning reference, not a promise that a given server will support a specific workload.

For a small installation, increasing available CPU or memory is usually simpler to operate than splitting services across hosts. For sustained high concurrency, separate or clustered services can offer more headroom, but they add network dependencies, configuration, monitoring, and failure points. ONLYOFFICE’s current official Compose example includes a health check for the Document Server endpoint; use container health and application responsiveness together rather than assuming that a running container means a healthy editing path. Keep the image version pinned during diagnosis so that a deployment update does not confound before-and-after measurements.

Verify the fix with the same editing test

Repeat the original two-user edit using the same document, client route, and approximate load. Confirm that typing feels responsive for both editors, changes appear consistently in the selected co-editing mode, and reconnects or container restarts have stopped. Watch docker stats during the retest and check proxy logs if the issue was connection-related. If a small test works but peak-hour sessions still lag, collect the container image/version, host and Docker versions, mounted volumes, resource graphs, and relevant logs before changing more settings; the official debug logging guide explains how to enable temporary debug logs in Docker. Turn verbose logging back down after collecting evidence because it adds log volume.

Use the outcome to choose the trade-off: correct the proxy when connections break, add capacity when measurements show sustained resource pressure, and leave the server alone when only one complex document is affected until you have isolated that workload.

Leave a Comment

Clear Nextcloud’s File Locking Warning with Redis

Enable reliable Nextcloud file locking, choose the right Redis or Valkey backend, and verify the warning clears without risking concurrent file changes.

What It Takes to Target an A+ Nextcloud Security Rating

What It Takes to Target an A+ Nextcloud Security Rating

Fix common Nextcloud scan findings with current updates, HTTPS and HSTS, precise reverse-proxy trust, and checks against the public server.

Automate Consistent Nextcloud Backups with Restic and Cron

Automate Consistent Nextcloud Backups with Restic and Cron

Back up Nextcloud’s files and MariaDB together, schedule encrypted Restic snapshots with cron, and verify recovery without risking the live server.

Enable Nextcloud Server-Side Encryption with Measured Impact

Configure Nextcloud SSE for the storage that needs it, protect encryption keys, and measure transfer and CPU impact before encrypting existing files.

Add Elasticsearch Full-Text Search to Nextcloud

Connect Nextcloud’s file search to Elasticsearch, index document contents, and choose a setup that fits your server and security needs.

Set a Reliable Expiration Policy for Nextcloud Deleted Files

Set a Reliable Expiration Policy for Nextcloud Deleted Files

Configure Nextcloud to remove deleted files after a defined retention period, schedule background jobs reliably, and avoid commands that purge every user’s trash.

Clear Nextcloud’s Missing Database Indexes Warning

Clear Nextcloud’s Missing Database Indexes Warning

Run Nextcloud’s OCC repair safely, preview the database changes, and check why the warning might remain.

Raise Nextcloud’s Web Upload Limit Past 2 GB

Raise Nextcloud’s Web Upload Limit Past 2 GB

Allow larger Nextcloud browser uploads by aligning PHP, Nginx or Apache, temporary storage, and timeout settings—and verify which limit is blocking the file.

Clear Nextcloud’s PHP Memory Warning at the Web Server

Set the PHP memory limit Nextcloud actually uses, restart the right service, and confirm the 512 MB setting in Admin Overview.

Connect an S3-Compatible Bucket to Nextcloud External Storage

Mount a compatible object-storage bucket in Nextcloud using its S3 backend, with the right endpoint, credentials, access scope, and verification steps.