OnlyOffice Issues
Troubleshooting OnlyOffice integration problems.
Editor Not Loading
Configuration Missing
Check:
- OnlyOffice server URL is configured
BACKEND_URLenvironment variable is set- Settings page configuration
Solutions:
- Configure OnlyOffice in Settings (admin)
- Set
BACKEND_URLin.env - Verify OnlyOffice server is accessible
File Not Opening
Check:
- File type is supported (.docx, .xlsx, .pptx, .pdf)
- File exists and is accessible
- OnlyOffice server is running
- File MIME type matches extension
Solutions:
- Verify file type is supported
- Check file permissions
- Verify OnlyOffice server is accessible
- Ensure file content matches extension (e.g., .txt renamed to .docx will fail)
MIME Type Mismatch
Error: "Cannot open file: type mismatch (expected .docx format)"
Cause:
- File content does not match extension
- File was renamed with incorrect extension
Solutions:
- Upload file with correct extension
- Do not rename files to different types
- File content must match declared type
Callback Issues
Callback Not Working
Check:
BACKEND_URLis correct and accessible- OnlyOffice server can reach backend
- Callback endpoint is working
Solutions:
- Verify
BACKEND_URLis publicly accessible - Check firewall rules
- Test callback endpoint manually
Auto-Save Issues
Changes Not Saving Until Close
Expected behavior: Documents save to storage every 30 seconds while being edited.
Check:
- Backend logs show
[ONLYOFFICE-AUTOSAVE] Auto-save startedwhen document is opened - Backend logs show
[ONLYOFFICE-AUTOSAVE] Triggering forcesaveevery 30 seconds - Callback logs show status 6 with
forcesavetype: 0
If no auto-save logs appear:
- Verify
onlyofficeAutoSave.jsis loaded (check for import errors on startup) - Check that document registration runs in viewer/config controllers
If forcesave commands fail silently:
- Check OnlyOffice URL is correct and reachable from the backend
- If OnlyOffice uses HTTPS with a self-signed certificate, verify
rejectUnauthorized: falseis set in the request options - Check OnlyOffice container logs:
docker logs onlyoffice_documentserver
If forcesave commands return non-200:
- Status 403: JWT secret mismatch between backend and OnlyOffice server
- Status 404: Wrong command service URL (should be
/coauthoring/CommandService.ashx) - Check backend logs for
[ONLYOFFICE-AUTOSAVE] Forcesave command failedwith status code
Auto-Save Running After Document Closed
Cause: Callback with status 2 or 4 was not received, so the document was not unregistered.
Check:
- OnlyOffice server can reach the callback URL (
BACKEND_URL) - Callback endpoint returns
{ "error": 0 }(required for OnlyOffice to stop retrying) - No network/firewall issues between OnlyOffice container and backend
Only Manual Saves (Ctrl+S) Work
Cause: The auto-save service is not sending forcesave commands, or they are being rejected.
Check:
- Backend logs for
[ONLYOFFICE-AUTOSAVE] Request errororForcesave command failed - OnlyOffice JWT secret matches between backend settings and OnlyOffice server config
- OnlyOffice server is accessible from the backend host (not just from the browser)
Related Topics
- OnlyOffice API - API endpoints
- Architecture - System architecture