// troubleshooting guide · onlyoffice
ONLYOFFICE 'Document Security Token Is Not Correctly Formed' Error
- Status
- Workaround available
- platforms:
- Docker, Linux, any integration
- updated:
- November 16, 2026
- reports:
- 5
- Method
- how we research
RUNBOOK · onlyoffice/security-token-not-correctly-formed3 FIXES
// quick answer
The JWT secret differs between the Document Server and the host app. Make both match and restart.
Most likely fix: Match the JWT secret
How to fix it
// try these in order, the most common fix is first
FIX 1Match the JWT secret
- 01Open local.json on the Document Server (services.CoAuthoring.token / secret)
- 02Enter the identical secret in the integration's settings
- 03Restart the Document Server services
Did this fix it?FIX 2Pin the secret in Docker
- 01Run the container with -e JWT_SECRET=your_secret
- 02Without it the secret is regenerated on reboot
Did this fix it?FIX 3Test with JWT disabled (temporary)
- 01Set JWT_ENABLED=false only to confirm the cause
- 02Turn it back on after fixing the secret
Did this fix it?
Symptoms
The editor shows 'The document security token is not correctly formed. Please contact your Document Server administrator.'
Why it happens
- C-01JWT secret or header mismatch
- C-02Config changed without restarting services
- C-03Version change in Nextcloud or the integration
// this guide also covers
- onlyoffice document security token not correctly formed
- onlyoffice jwt error
Still not working?
If ONLYOFFICE keeps failing, you're not alone. See every ONLYOFFICE problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All not loading, error messages & connection guides →
Word Experienced an Error Trying to Open the File (Microsoft Word)
Other ONLYOFFICE errors
- ONLYOFFICE Not Working in Nextcloud
- ONLYOFFICE 'Error While Downloading the Document File to Be Converted'
- ONLYOFFICE Not Loading After Docker Update
- ONLYOFFICE Desktop Editors Crash or Won't Start
- Why Is ONLYOFFICE So Slow?
- ONLYOFFICE Fonts Not Showing or Missing
- ONLYOFFICE DOCX Formatting Changes or Won't Open in Word
- ONLYOFFICE Community Edition 20 Connection Limit