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:
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.
Or would I need to reinstall the whole docker app for this to work?
Also, after setting that up, do I still need to run the command you gave me?
docker run -i -t -d -p 80:80 --restart=always -e JWT_SECRET=
And due to me using a different port for this docker (9090 for Host Port 1), should I change something in the command?
As far as I know, configuration on screenshot mirrors the same functionality of adding variables to the starting container. Basically, Name field is used for simply naming the variable, Key field defines the variable and Value defines its value. Basically, it is the same as-e JWT_SECRET=<value> in the docker run command.
There is no need to run container with both variable in the command and variable added via mentioned configuration, you can choose either one of those methods.
To run Document Server on another port you must specify the port you are willing to use in -p flag:
Where <port> is a required port, e.g. for 9090 the flag is -p 9090:80.
I am not familiar with unRAID so I cannot tell how it handles variables and if it is required to re-run the container with new values to apply them as it must be done via terminal (command line).
I can tell for sure that it is not necessary to re-install Docker itself for that. Possibly via unRAID you can simply stop and remove running container with Document Server to start new one afterwards with new parameters.