ONLYOFFICE Workspace 12.5: enhanced security, optimized document management, Dark theme, and more
ONLYOFFICE Workspace 12.5 released

Can you disable JWT on ONLYOFFICE docker on unRAID?

Hi all,

Since not that long ago, “JSON Web Tokens” were introduced and every time I restart the container or update it or w/e, it asks me to create a new token and add it into the settings panel for OnlyOffice on Nextclould, on my unRaid server.

Is there a way to disable that requirement? Or to somehow automate creation of those tokens and insertion into Nextcloud settings?

I tried not entering a token - as it says in the field that you can leave blank to disable, but that doesn’t work and fails when I try to save settings:

unRaid version: 6.11.5
Nextcloud version: Nextcloud Hub 3, 25.0.2
ONLYOFFICE version: 7.6.8
Browser version: Chrome Version 108.0.5359.125

Please let me know if you need anything else.

Thanks!

Hello @IMDS

If you want to run the container with disabled JWT Token (not recommended) you can use JWT_ENABLE environment variable set to false. Simply run new container with added -e JWT_ENABLE=false to the command. Here’s an example of the command with set environment variable and without mounted volumes:
docker run -i -t -d -p 80:80 --restart=always -e JWT_ENABLED=false onlyoffice/documentserver

However, I’d recommend to use JWT_SECRET variable to run the container with enabled JWT Token but with defined by you secret key:
docker run -i -t -d -p 80:80 --restart=always -e JWT_SECRET=<secret> onlyoffice/documentserver where <secret> is desired key of the Token. That way you will be able to use the same key for all newly created containers and you won’t need to change the key in Nextcloud connector settings.

Note that every time you run new container you have to use needed variable. However, after restarting the container the variable stays in place.
You can save the command somewhere and use it when it is needed or recall the history to find it.