# Temporary Chat (https://www.librechat.ai/docs/features/temporary_chat)

Temporary chats let you ask something without keeping it. Use them for sensitive topics, quick experiments, or anything you don't need to save. A temporary chat stays out of your history sidebar, never appears in search, can't be bookmarked, and is deleted automatically once its retention period ends (30 days by default).

## Start a Temporary Chat

<Steps>

<Step>

**Open the model menu.** Select the model dropdown at the top left of the chat view.

</Step>

<Step>

**Turn on Temporary Chat.** Toggle the **Temporary Chat** switch to the ON position.

<Frame>
![Temporary Chat toggle in the model menu](https://github.com/user-attachments/assets/ebd5370d-7fac-45af-b0d3-2de59df506e9)
</Frame>

</Step>

<Step>

**Confirm it's active.** Before the first message, the landing view identifies the session as a Temporary Chat and explains that it stays out of history and is deleted automatically. After the conversation starts, a read-only indicator remains in the header even though the setup toggle is no longer available.

</Step>

</Steps>

## What a Temporary Chat Does

- Does not appear in the chat history sidebar.
- Is excluded from search results.
- Cannot be bookmarked.
- Shows a dedicated landing state before the first message and an active indicator afterward.
- Is stored in the database until its retention period ends, then deleted automatically.

<Callout type="info" title="Retention period">

The default retention period is 30 days. Administrators can change it. See [Configuration](#configuration-administrators) below.

</Callout>

## Configuration (administrators)

Temporary Chat is available to users by default. Administrators control whether the feature is offered and how long temporary chats are kept.

**Availability** is governed by the `TEMPORARY_CHAT` role permission. Manage it for each role from the [Admin Panel](/docs/features/admin_panel). The `interface.temporaryChat` option in `librechat.yaml` only seeds this permission for the default `USER` role at startup and is deprecated for permission management.

**Retention** is set with `interface.temporaryChatRetention` (in hours). The minimum is 1 hour, the maximum is 8760 (1 year), and the default is 720 (30 days).

<Tabs items={['librechat.yaml (recommended)', 'Environment variable (deprecated)']}>

<Tabs.Tab>

```yaml filename="librechat.yaml"
interface:
  temporaryChat: true
  temporaryChatRetention: 168 # retain temporary chats for 7 days
```

</Tabs.Tab>

<Tabs.Tab>

```bash filename=".env"
# Hours to retain temporary chats (default: 720 = 30 days)
TEMP_CHAT_RETENTION_HOURS=168
```

<Callout type="warning" title="Deprecated">

`TEMP_CHAT_RETENTION_HOURS` is deprecated. Prefer `interface.temporaryChatRetention` in `librechat.yaml`, which takes precedence over the environment variable.

</Callout>

</Tabs.Tab>

</Tabs>

Common retention values:

| Value | Period |
| --- | --- |
| `1` | 1 hour (minimum) |
| `24` | 1 day |
| `168` | 1 week |
| `720` | 30 days (default) |
| `8760` | 1 year (maximum) |

For the full set of options, including `retentionMode` and `retainAgentFiles`, see the [interface reference](/docs/configuration/librechat_yaml/object_structure/interface#temporarychatretention).
