: For individual sessions you need to keep permanently, use the "Export to JSON" option found in the "more options" menu of any recording . These files can be imported back into PostHog later, even after the original data has expired from your project .
JavaScript errors, warnings, and standard logs synchronized with the visual timeline. Architecting a Portable PostHog Setup
: Users can preserve specific recordings by selecting Export to JSON . This creates a portable data file that can be stored in external repositories or uploaded back into PostHog later, ensuring that critical bug reproductions are not lost when standard retention periods expire.
For most teams, the second pattern——offers the best balance of portability and utility. Here is how to configure a web or desktop application to handle session replays portably using a local buffer. Step 1: Initialize PostHog to Capture Offline posthog session replay portable
You can liberate your replay data from the PostHog platform using these primary methods:
At its heart, portable session replay is about agency. It rests on three key principles, each of which PostHog addresses head-on.
Understanding how data flows through PostHog will help you grasp the full extent of your portability options. : For individual sessions you need to keep
// session-uploader.ts class SessionUploader async uploadSession(session: SessionRecording, endpoint: string): Promise<void> const compressed = await this.compressSession(session); const response = await fetch(endpoint, method: 'POST', headers: 'Content-Type': 'application/json', , body: JSON.stringify( sessionId: session.sessionId, userId: session.userId, startTime: session.startTime, endTime: session.endTime, events: compressed, metadata: session.metadata, ), );
The value of portable data extends far beyond a theoretical desire for control, with several practical benefits for development and product teams.
provides the highest degree of sovereignty. You install and run PostHog on your infrastructure, such as a Hetzner or AWS box. You must manage the entire stack—including ClickHouse, Redis, and Kafka—yourself, which requires significant time and expertise. The official self-hosted version is identical to the cloud product, and you are free to directly access its file system and databases to create your own backup and archiving mechanisms [19†L5-L7]. This eliminates any API rate limits or feature gates for data extraction. Architecting a Portable PostHog Setup : Users can
Support agents can view the exact customer journey leading up to a bug report directly inside Zendesk, Intercom, or Salesforce without switching tabs.
Companies operating in the EU or with sensitive health/financial data need to know exactly where their data resides. Self-hosted PostHog lets you choose the region.