private replayClick(data: any, doc: Document): void const cursor = doc.querySelector('.replay-cursor') as HTMLElement; if (cursor) cursor.style.left = $data.xpx ; cursor.style.top = $data.ypx ; cursor.style.display = 'block';
Engineers and product managers using internal admin portals (like Retool or custom dashboards) can see user sessions right alongside database records.
PostHog has a built-in download feature.
What are you planning to run this portable setup in (e.g., Docker, an offline desktop app, a local server)? posthog session replay portable
For deep integration into your own software stack, you can fetch session replay data programmatically using the PostHog REST API.
: If you need to move high volumes of data, PostHog supports batch exports to destinations like Amazon S3 , Google Cloud Storage , or Snowflake . Note that it is safest to export recordings after 24 hours to ensure they are complete and immutable .
The snapshot endpoint for a specific recording returns a list of "sources." Each source represents a compressed block of the replay. By iterating through these sources, you can download each block and reconstruct the full session data [9†L10-L14]. While the API wasn't originally designed for bulk public use, it's the route many developers take to build custom scripts in Python or Node.js to programmatically fetch and archive recordings. For deep integration into your own software stack,
Ultimately, portability is not just about avoiding lock-in. It's about realizing the full potential of your user data. It's about connecting the dots between a user's frustrated clicks and a failed API call in your logs. It's about giving your data team the freedom to ask new questions with old data. PostHog's architecture gives you the tools to do exactly that, putting the power of portable session replay directly in your hands.
Developers have successfully used it to build scripts that fetch session data programmatically. However, the API has a few critical caveats:
Building a architecture frees your product analytics from the constraints of traditional cloud setups. It gives you the flexibility to debug apps offline, comply with strict data residency laws, and streamline your local development workflows. By taking advantage of PostHog's open-source DNA, you can build a resilient, secure, and fully customized session recording pipeline that works whenever and wherever your application does. The snapshot endpoint for a specific recording returns
request.onupgradeneeded = (event) => const db = (event.target as IDBOpenDBRequest).result; if (!db.objectStoreNames.contains('sessions')) db.createObjectStore('sessions', keyPath: 'sessionId' );
: Every recording includes related user data, events, and feature flag variants, plus triggered errors. Debugging Power : The platform provides advanced tools to inspect console logs network calls
this.isRecording = false; if (this.flushInterval) clearInterval(this.flushInterval); this.flushInterval = null;
| Feature | PostHog Cloud (SaaS) | Portable (Self-Host) | |---------|----------------------|----------------------| | Data residency | EU/US only | Anywhere you deploy | | Export raw replays | Limited (via API) | Full database access | | Maintenance | None | Team handles upgrades | | Cost | Free tier + usage | Infrastructure + support (optional) |
Building a resilient, data-driven organization requires a clear strategy. Consider this phased approach to portable session replay with PostHog.