---
title: Setting the Session Duration
description: By default, the session duration is set to 30 minutes. You can change this value at installation by setting the JWT_EXPIRY property in the /autoid-config/vars.yml file.
component: autonomous-identity
version: 2022.11.12
page_id: autonomous-identity:admin-guide:chap-session-duration
canonical_url: https://docs.pingidentity.com/autonomous-identity/2022.11.12/admin-guide/chap-session-duration.html
---

# Setting the Session Duration

By default, the session duration is set to 30 minutes. You can change this value at installation by setting the `JWT_EXPIRY` property in the `/autoid-config/vars.yml` file.

If you did not set the value at installation, you can make the change after installation by setting the `JWT_EXPIRY` property using the API service.

Set the session duration:

1. Log in to the Docker manager node.

2. Verify the `JWT_EXPIRY` property.

   ```
   $ docker inspect api_zoran-api
   ```

3. Go to the API folder.

   ```
   $ cd /opt/autoid/res/api
   ```

4. Edit the `docker-compose.yml` file and update the `JWT_EXPIRY` property. The `JWT_EXPIRY` property is set to minutes.

5. Redeploy the Docker stack API.

   ```
   $ docker stack deploy --with-registry-auth --compose-file docker-compose.yml api
   ```

   If the command returns any errors, such as "image could not be accessed by the registry," then try the following command:

   ```
   $ docker stack deploy --with-registry-auth --resolve-image changed \
       --compose-file /opt/autoid/res/api/docker-compose.yml api
   ```

6. Verify the new `JWT_EXPIRY` property.

   ```
   $ docker inspect api_zoran-api
   ```

7. Log in to the Docker worker node.

8. Stop the worker node.

   ```
   $ docker stop [container ID]
   ```

   The Docker manager node re-initiates the worker node. Repeat this step on any other worker node.
