> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cymph.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Log retention

> Choose how long the audit log and API access log are kept.

Users with the On-prem Administrator role decide how many days of logs the deployment keeps. Two logs are covered:

* **Audit log**: the administrative and product activity shown on the [Audit Logs](/security/audit-logging) page. Its retention is also how far back that page can show.
* **Access log**: every request made to the Cymph API. It is kept on the server only and is not shown in the application.

By default the audit log is kept for **90 days** and the access log for **30 days**.

## How to change log retention

1. Go to the **On-prem settings** page
   * Click on **On-prem** from the navigation menu, then **Settings**
2. Open the **Data** tab and click **Configure** on **Log Retention**
3. Enter the number of days for the **Audit log** and the **Access log**. Each must be a whole number of at least 1.
4. Click **Update Settings**

The card shows the current periods, for example *Audit 90 · Access 30 days*.

## How cleanup works

Once a day, shortly after midnight, Cymph deletes log files older than these periods. It runs once for the whole deployment and reads the latest values each time, so a change applies from the next nightly run. The files being written to at the time are never touched.

<Warning>
  Deleted log files cannot be recovered. If you need logs for longer, for example for compliance, raise the retention before the next nightly run or copy the files from the server's log directory beforehand.
</Warning>
