sidebar_position: 16
Open WebUI provides a feature that allows administrators to configure the expiration time of their JWT (JSON Web Token) token. This setting is crucial for ensuring secure access to the API, as it determines how long a JWT token remains valid for.
To configure the JWT expiration time, follow these steps:
Admin Panel -> Settings -> General.JWT Expiration option.Alternatively, you can configure the JWT expiration time by setting the JWT_EXPIRES_IN environment variable.
For more information on configuring environment variables in Open WebUI, see Environment Variable Configuration.
Open WebUI uses a secret key to generate JWT tokens. By default, this secret key is randomly generated on the first start of the container. However, you can override this secret key by setting the WEBUI_SECRET_KEY environment variable.
JWT_EXPIRES_IN:
WEBUI_SECRET_KEY:
s: secondsm: minutesh: hoursd: daysw: weeks-1: no expirationTo authenticate your API requests using your JWT token, obtain your API key from Settings > Account > API Keys > API Key in Open WebUI. Alternatively, you can obtain a JWT token from the same location.
Note: The JWT token is used for authentication purposes only and should be kept secure to prevent unauthorized access to the API.
JWT_EXPIRES_IN environment variable.s, m, h, d, w, or -1 for no expiration.Settings > Account in the Open WebUI admin panel.WEBUI_SECRET_KEY environment variable.