[GH-ISSUE #839] JWT secret is considered invalid if set as an environment variable #408

Closed
opened 2026-02-26 10:32:25 +03:00 by kerem · 2 comments
Owner

Originally created by @supremedutchgamer on GitHub (Dec 23, 2025).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/839

i'm running the main onlyoffice/documentserver image with a very basic config using docker compose on an ubuntu server using the latest LTS release, i'm making use of Dockge as my management interface and i'm primarily using onlyoffice to tie into owncloud.

I no longer want to deal with the JWT secret resetting every time the container reboots, so i went toset the JWT_SECRET environment variable.

This does set correctly, running the docker exec command to fetch the JWT secret returns the string i put in.

However, this string is considered invalid by the server, as a result i cannot link my onlyoffice instance to my owncloud instance.

when i remove the JWT environment variables and grab the key normally, i can connect onlyoffice to owncloud just fine.

this is my compose.yaml (with the actual secret redacted)

  documentserver:
    stdin_open: true
    tty: true
    ports:
      - 1080:80
    image: onlyoffice/documentserver
    dns:
      - 1.1.1.1
      - 8.8.8.8
    environment:
      - JWT_SECRET="My_Super_Secret_String"
      - JWT_IN_BODY=true
networks:
  dockge_default:
    external: true```



Originally created by @supremedutchgamer on GitHub (Dec 23, 2025). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/839 i'm running the main onlyoffice/documentserver image with a very basic config using docker compose on an ubuntu server using the latest LTS release, i'm making use of Dockge as my management interface and i'm primarily using onlyoffice to tie into owncloud. I no longer want to deal with the JWT secret resetting every time the container reboots, so i went toset the JWT_SECRET environment variable. This does set correctly, running the docker exec command to fetch the JWT secret returns the string i put in. However, this string is considered invalid by the server, as a result i cannot link my onlyoffice instance to my owncloud instance. when i remove the JWT environment variables and grab the key normally, i can connect onlyoffice to owncloud just fine. this is my compose.yaml (with the actual secret redacted) ```services: documentserver: stdin_open: true tty: true ports: - 1080:80 image: onlyoffice/documentserver dns: - 1.1.1.1 - 8.8.8.8 environment: - JWT_SECRET="My_Super_Secret_String" - JWT_IN_BODY=true networks: dockge_default: external: true```
kerem closed this issue 2026-02-26 10:32:25 +03:00
Author
Owner

@igwyd commented on GitHub (Dec 25, 2025):

Show the error you receive when setting up the integration and the error from the document server log. There is a JWT_HEADER env in the docker environment and owncloud settings, have you set it up?

<!-- gh-comment-id:3691327697 --> @igwyd commented on GitHub (Dec 25, 2025): Show the error you receive when setting up the integration and the error from the document server log. There is a JWT_HEADER env in the docker environment and owncloud settings, have you set it up?
Author
Owner

@Rita-Bubnova commented on GitHub (Feb 5, 2026):

This issue was closed due to no response.

<!-- gh-comment-id:3853456283 --> @Rita-Bubnova commented on GitHub (Feb 5, 2026): This issue was closed due to no response.
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#408
No description provided.