Depending on how your app or website is built, recordings can take a lot of disk space. To manage this, we have the following retention policy options in place.
PostHog Cloud & Clickhouse Self-hosted
By default, recordings are automatically deleted after 3 weeks. Old recordings are deleted with Clickhouse's Table TTL. If you're self-hosting, you can set your own retention policy by updating the RECORDINGS_TTL_WEEKS
configuration on your instance settings page.
Please note, if your Clickhouse storage is nearing capacity, you'll want to temporarily increase your volume size before running the command above (even if you're decreasing the value). Otherwise, the command can hang.
Legacy Postgres Self-hosted
Recordings are kept indefinitely by default. You can set recordings to delete after a configurable number of days in the project settings page.
Preserving recordings
Any recordings you'd like to preserve for longer can be done by downloading them locally. Downloaded recordings can then be imported back into PostHog for future playback, even if the original recording has expired. Currently, it's only possible to save a single recording at a time.