# Session replay storage configuration - Docs

> **Note:** These instructions are for **self-hosted hobby PostHog instances** only. For PostHog Cloud, see the main [replay recording retention](/docs/session-replay/data-retention.md) docs.

## Storage backends for session replay

The original version of session replay stored recordings in ClickHouse. At higher scale, this was impractical and expensive. To make PostHog cheaper and easier to run and maintain, we have deprecated storing recordings in ClickHouse.

We now only support [blob storage-backed recordings](/docs/how-posthog-works/recordings-ingestion.md).

-   In **PostHog Cloud**, we use AWS S3 as a blob store.
-   In self-hosted **hobby** deployments, we include [MINIO](https://min.io/) so you can use whichever blob storage you prefer.

## Using ClickHouse for recording storage (deprecated)

If you still need ClickHouse-backed recordings, you can pin your deployment to the final PostHog release that officially supports them:

-   The last release to support ClickHouse-stored recordings is documented on Docker Hub: [final PostHog release to officially support ClickHouse stored recordings](https://hub.docker.com/layers/posthog/posthog/9c68581779c78489cfe737cfa965b73f7fc5503c/images/sha256-4dec586a83328f4123039bab924289f9bd52bd46f56bf14e9ae91fcd6d05ed5d?context=explore).
-   You can pin to this image with the `deploy-hobby` script, or by editing your `docker-compose` file to replace:

YAML

PostHog AI

```yaml
image: posthog/posthog:$POSTHOG_APP_TAG
```

with:

YAML

PostHog AI

```yaml
image: posthog/posthog:9c68581779c78489cfe737cfa965b73f7fc5503c
```

All subsequent releases only support blob storage-backed recordings.

## Managing storage and TTL

For **older self-hosted hobby versions that still store recordings in ClickHouse**:

-   You can control the retention period using the `RECORDINGS_TTL_WEEKS` configuration on your instance settings page.
-   Make sure you manage available disk capacity carefully:
    -   Increase volume capacity **before** changing `RECORDINGS_TTL_WEEKS` (even if you are decreasing the value).
    -   ClickHouse requires abundant free disk space to manage the `session_recording_events` table.

For **later versions that use blob storage for recordings**:

-   Your installation relies on the configured blob storage (for example S3, GCS, or another S3-compatible provider).
-   You should manage retention using blob storage lifecycle policies. The exact setup will vary depending on your environment and storage provider.

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better