Back to browse
GitHub Repository

Self-hosted browser session replay built on S2 with live tailing

83 starsTypeScript

RePlaya – self-hosted browser session replay with live tailing

by shikhar·Jun 2, 2026·1 point·0 comments

AI Analysis

●●SolidBig BrainSolve My Problem

Live session tailing via streams beats standard database-backed replay tools.

Strengths
  • One stream per session eliminates database and queue complexity entirely.
  • Live tailing active sessions via SSE enables real-time debugging without refresh.
  • Self-hosted Node app avoids vendor lock-in and privacy concerns of SaaS rivals.
Weaknesses
  • Competes directly with PostHog and OpenReplay which have larger ecosystems.
  • Requires running S2 infrastructure, adding operational overhead for small teams.
Target Audience

Developers needing privacy-focused session replay, S2 users

Similar To

PostHog · OpenReplay · LogRocket

Post Description

Hi HN, I'm one of the founders of s2.dev. RePlaya (https://github.com/s2-streamstore/replaya) is a self-hosted rrweb session replay server backed by one S2 stream per browser session.

I hacked this because it popped into my head that browser session replay could be modeled almost entirely with durable streams. There's no separate database, queue, or search index for the recording itself. It's a Node app you can self-host.

S2 gives this use case durable storage, ordered appends, timestamped playback, and live tailing from the same primitive. You can point RePlaya at a self-hosted S2 instance with open source s2-lite (https://news.ycombinator.com/item?id=46708055).

How it's implemented:

- one S2 stream per browser session - large rrweb events, like full snapshots, framed across multiple binary S2 records and reassembled on read - active sessions tailed with an S2 read session and bridged to the browser over SSE - session listing from reverse-time stream names, so lexicographic listing returns newest sessions first - a small sidecar stream for live "new session appeared" updates to the first page - fencing tokens so a stopped session can't be written to again by a late recorder - retention and GC of streams handled by S2 config, so no cron or cleanup job needed

RePlaya is pretty young, but I'm curious whether this "one durable stream per replay" shape is interesting to others.

Similar Projects