// 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
Share

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

  1. FIX 1Match the JWT secret

    1. 01Open local.json on the Document Server (services.CoAuthoring.token / secret)
    2. 02Enter the identical secret in the integration's settings
    3. 03Restart the Document Server services
    Did this fix it?
  2. FIX 2Pin the secret in Docker

    1. 01Run the container with -e JWT_SECRET=your_secret
    2. 02Without it the secret is regenerated on reboot
    Did this fix it?
  3. FIX 3Test with JWT disabled (temporary)

    1. 01Set JWT_ENABLED=false only to confirm the cause
    2. 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 us

Watch ONLYOFFICE Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other ONLYOFFICE errors