# Extend session timeout

> Increase the OneFuse API token expiration beyond the default 5-minute timeout

---

Site [llms.txt](/llms.txt)

---

<div class="alert alert-warning" role="alert">


For security purposes, the default timeout of API Tokens in OneFuse is **5 minutes**.
</div>


When an API call is invoked in OneFuse UI, the session automatically extends. However, when the user remains on a particular page in OneFuse UI, the default timeout setting may be too short (for example, when creating or updating OneFuse Policies, Property Sets, and so on). Follow the instructions below to extend the session timeout for OneFuse API Tokens.

1. SSH or WinSCP to the OneFuse appliance as root, switch to the root user with `sudo su -`, and then run the required commands.
2. Go to `/var/opt/cloudbolt/proserv`.
3. Open `customer_settings.py` in a text editor.
4. Add the following imports at the top of the file if not already present:

   ```python
   import datetime
   from settings import JWT_AUTH
   ```

5. Add the following line to the bottom of the file, if it does not already exist. Update the value to the desired number of seconds (for example, 1800 seconds is 30 minutes):

   ```python
   JWT_AUTH['JWT_EXPIRATION_DELTA'] = datetime.timedelta(seconds=3600)
   ```

6. Restart the Apache service on the OneFuse appliance:

   ```bash
   service httpd restart
   ```

7. Verify the httpd service is back up and running before logging in to the OneFuse UI:

   ```bash
   service httpd status
   ```

8. If clustered, repeat the steps above on all OneFuse servers running the web component.
