Technical Anshu
Tutorials Blog
Troubleshooting

Nextcloud Documents Open Read Only or Show Error With OnlyOffice Fix

The editor opens but will not edit - or refuses to open at all. Three causes explain almost every case, and each has a two-minute test.

By Technical AnshuLinux ServerSelf HostedFix guide
Watch the full video - Nextcloud and OnlyOffice setup and integration, step by step

Everything installed, the settings saved - and still the document opens read only, or shows a token error, or spins forever. Do not reinstall. In real setups this is one of three causes, and this page walks them in the order they actually occur.

The three usual causes - check them in this order
1. Secret mismatchTOKEN ERROR
2. Docs cannot reach NextcloudDOWNLOAD FAILED
3. File shared as view onlyREAD ONLY
Reinstalling fixes none of these. Each has a two-minute test below.
Example error patterns and which cause each one points to
1

Cause One - The Secret Does Not Match

Test: open a document you own, uploaded by you, on the server itself. If even that shows a token error or refuses to edit while the file permissions are clearly yours, suspect the pairing first.

Fix: copy the secret from the Docs server (container environment or local.json), paste it fresh into Settings, Administration, ONLYOFFICE, Secret key in Nextcloud, and save. Watch for a pasted trailing space - it is the classic silent killer. The JWT setup guide covers both sides field by field.

2

Cause Two - The Docs Server Cannot Reach Nextcloud

Remember the flow: the editor loads in your browser, but the Docs server itself downloads the file from Nextcloud and later sends the edited file back to a callback address. If the Docs server cannot resolve or reach Nextcloud's address - wrong internal DNS, a firewall, a self-signed certificate it does not trust - you get download failed errors, an endlessly spinning editor, or edits that never save.

  1. From the Docs server, test that it can open Nextcloud's address (for a Docker install, test from inside the container's network view, not just the host).
  2. If the servers use different addresses inside the network, fill the connector's advanced internal address fields so each server uses the address that actually works for it.
  3. If Nextcloud uses a self-signed certificate, the Docs server will refuse it - use a real certificate or expect this fight on every server.
3

Cause Three - The File Itself Is View Only

Sometimes the integration is perfect and the answer is boring: the document was shared with you as view-only, it sits in a read-only shared folder, or it is an external-storage mount that Nextcloud treats as read-only. Open the same file as its owner - if the owner can edit and you cannot, it is permissions, not pairing.

Also check the connector's own settings: the ONLYOFFICE settings page lets an admin restrict which file types open in the editor and can force view mode for some groups in some configurations. And confirm the file type is one the editor supports - an old or exotic format may open in the viewer deliberately.

4

A Clean Test That Splits the Problem in Half

  1. Create a brand new document from inside Nextcloud (New, Document) as the admin.
  2. Owner, fresh file, no sharing - this removes cause three completely.
  3. If it fails with a token message, it is cause one. If it spins or says download failed, it is cause two. If it works, your integration is fine and the original file's sharing was the whole story.

Watch the Complete Video Guide

Watch the video's connection test section - the success message it shows is exactly what a healthy pairing looks like.

Watch Full Video
Common Questions (FAQ)

Why does the editor open but not save my changes?

Saving travels the callback path from the Docs server back to Nextcloud. If that return path fails - wrong internal address, certificate the Docs server rejects, or the secret mismatch corrupting the signed callback - editing appears to work and the save silently fails. Test reachability from the Docs server side.

The document opens read only only for some users. Why?

That pattern points away from the integration and toward permissions: those users received the file or folder as view-only, or the share is on read-only external storage. If the owner can edit the same file, the pairing is fine.

I see the error -4 or download failed. What is it?

Download-style errors mean the Docs server could not fetch the file from Nextcloud. Check that the Docs server can resolve and open Nextcloud's address (including from inside the Docker network), fill the connector's internal address fields if the servers use different addresses inside the LAN, and make sure the certificate is trusted.

This guide is based on the Technical Anshu video on Nextcloud and OnlyOffice integration. Stuck on a step? Ask in the video comments - you will get an answer there.