Docker-DocumentServer
Docker-DocumentServer copied to clipboard
Set static secret key
For the connection with Nextcloud i'm using the secret key which can be found with; docker exec [name or id docker container] /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'
But when the container is deployed with a new version the secret keys changes so Nexclout will be disconnected.
I can't find to set a static secret key. Is there a envorionment variable for this?
Hi, I think it's done by design, so users who already connected to some document lost connection during update
Without that - users with old front-end scripts may be connected to new version of back-end and something unpredictable should happen
In any way we strongly advice run documentserver-prepare4shutdown.sh
before any operation with documentsever, so all users save all data and nothing is lost
I had the same problem.
The secret key will be restored each time when I restart Docker container.
As a result, Nextcloud was unable to successfully connect onlyoffice. I had to manually re-check the new secret key, and then re-enter it to connect.
I also want to set static secret key.
Whoops, I may be wrong before
Are you meaning JWT key?
You know you can use docker env JWT_KEY
to set it statically
@ShockwaveNN Thank you very much. The way you told me is right.
Adding environment variables:
JWT_ENABLED=false
When nextcloud connects to onlyoffice, you do not need to enter a JWT key
or
JWT_SECRET=<your own JWT key>
The JWT key will NOT be restored each time when you restart Docker container.
Maybe help you @hari-bo
And please note that we strongly advice do not disable JWT, since it may lead to vulnerabilities
@ShockwaveNN Thank you very much. The way you told me is right.
Adding environment variables:
JWT_ENABLED=false
When nextcloud connects to onlyoffice, you do not need to enter a JWT keyor
JWT_SECRET=<your own JWT key>
The JWT key will NOT be restored each time when you restart Docker container.Maybe help you @hari-bo
You are right, JWT_SECRET
env set a constant JWT key, and after restart the container it is not cnange.
I close this issue. Feel free to comment or reopen it if you got further questions.
I close this issue. Feel free to comment or reopen it if you got further questions.