[GH-ISSUE #661] How to specify token with Docker variable? #246

Closed
opened 2026-02-26 10:31:17 +03:00 by kerem · 4 comments
Owner

Originally created by @DesertCookie on GitHub (Sep 28, 2022).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/661

Version 7.2 automatically generates a JWT token. I am having an issue where this token obviously changes every time my Docker container restarts and I am required to manually change it in Nextcloud. I've tried mapping local.json to a volume but once I do that the container doesn't start anymore because it won't write to local.json.

Is there a way to specify the token in a variable to make it static that way?

  • Docker in unRAID 6.10
  • Nextcloud 24/25 and OODC 7.2
Originally created by @DesertCookie on GitHub (Sep 28, 2022). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/661 Version 7.2 automatically generates a JWT token. I am having an issue where this token obviously changes every time my Docker container restarts and I am required to manually change it in Nextcloud. I've tried mapping `local.json` to a volume but once I do that the container doesn't start anymore because it won't write to `local.json`. Is there a way to specify the token in a variable to make it static that way? - Docker in unRAID 6.10 - Nextcloud 24/25 and OODC 7.2
kerem 2026-02-26 10:31:17 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@ShockwaveNN commented on GitHub (Oct 4, 2022):

Hi, this is described here

something like this:

docker run -itd -p 80:80 -e JWT_ENABLED=true -e JWT_KEY=mysecretkey onlyoffice/documentserver
<!-- gh-comment-id:1713762757 --> @ShockwaveNN commented on GitHub (Oct 4, 2022): Hi, this is described [here](https://github.com/ONLYOFFICE/Docker-DocumentServer#available-configuration-parameters) something like this: ``` docker run -itd -p 80:80 -e JWT_ENABLED=true -e JWT_KEY=mysecretkey onlyoffice/documentserver ```
Author
Owner

@spiffyguy commented on GitHub (Jan 9, 2023):

I think the environment variable should be JWT_SECRET not JWT_KEY

According to the link you provided: (https://github.com/ONLYOFFICE/Docker-DocumentServer#available-configuration-parameters)

<!-- gh-comment-id:1713762760 --> @spiffyguy commented on GitHub (Jan 9, 2023): I think the environment variable should be `JWT_SECRET` not ~~`JWT_KEY`~~ According to the link you provided: (https://github.com/ONLYOFFICE/Docker-DocumentServer#available-configuration-parameters)
Author
Owner

@igwyd commented on GitHub (Sep 11, 2023):

Hello @DesertCookie, sorry for the late reply. Yes this is the correct link https://github.com/ONLYOFFICE/Docker-DocumentServer#available-configuration-parameters and @spiffyguy you are right, should use JWT_SECRET instead JWT_KEY.

<!-- gh-comment-id:1713762765 --> @igwyd commented on GitHub (Sep 11, 2023): Hello @DesertCookie, sorry for the late reply. Yes this is the correct link https://github.com/ONLYOFFICE/Docker-DocumentServer#available-configuration-parameters and @spiffyguy you are right, should use ```JWT_SECRET``` instead ```JWT_KEY```.
Author
Owner

@Rita-Bubnova commented on GitHub (Sep 11, 2023):

I close this issue. Feel free to comment or reopen it if you got further questions.

<!-- gh-comment-id:1713762767 --> @Rita-Bubnova commented on GitHub (Sep 11, 2023): I close this issue. Feel free to comment or reopen it if you got further questions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#246
No description provided.