Skip to content

Self-hosting session replay documentation#1361

Draft
stevenchien-amplitude wants to merge 3 commits intomainfrom
cursor/self-hosting-session-replay-documentation-3b95
Draft

Self-hosting session replay documentation#1361
stevenchien-amplitude wants to merge 3 commits intomainfrom
cursor/self-hosting-session-replay-documentation-3b95

Conversation

@stevenchien-amplitude
Copy link

Add documentation for self-hosting the Session Replay SDK, detailing proxy configurations to address data residency, ad blocker bypass, and security policy needs.


Slack Thread

Open in Cursor Open in Web

- Created new documentation page covering how to self-host Session Replay
- Explains SDK configuration options (trackServerUrl, configServerUrl)
- Provides proxy setup guides for AWS CloudFront, Nginx, and Node.js
- Includes API endpoint reference for US and EU data centers
- Added troubleshooting section for common proxy issues
- Positioned in navigation after Heatmaps section

Co-authored-by: steven.chien <steven.chien@amplitude.com>
@cursor
Copy link

cursor bot commented Jan 26, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Jan 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
amplitude-docs Ready Ready Preview Jan 29, 2026 10:02pm

@markzegarelli markzegarelli self-requested a review January 26, 2026 19:32
@stevenchien-amplitude stevenchien-amplitude added the documentation Improvements or additions to documentation label Jan 27, 2026
| Option | Type | Description |
| ------ | ---- | ----------- |
| `trackServerUrl` | `string` | The URL where the SDK sends replay data. This overrides the default data ingestion endpoint. |
| `configServerUrl` | `string` | The URL where the SDK fetches remote configuration. This overrides the default configuration endpoint. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also need serverUrl for the plugin (standalone doesn't talk to event server so doesn't need it) to relay data sent to Amplitude event server

});

amplitude.add(sessionReplayTracking);
amplitude.init(API_KEY);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc, serverUrl should go into this init() function.

deviceId: DEVICE_ID,
sessionId: SESSION_ID,
serverUrl: "https://your-proxy.example.com",
sampleRate: 0.1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there probably should be 3 url overrides too. Please check with SDK team on url override options.


Your proxy server must forward requests to the appropriate Amplitude endpoints based on your data center region.

### Data ingestion endpoints

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use something like (Session Replay) Data ingestion endpoints to distinguish from Amplitude event ingestion

| Region | Endpoint |
| ------ | -------- |
| US (default) | `https://sr-client-cfg.amplitude.com/config` |
| EU | `https://sr-client-cfg.eu.amplitude.com/config` |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plus Amplitude event ingestion endpoints

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest endpoint put API key in the URL, for example:

https://sr-client-cfg.amplitude.com/config/API_KEY_XXXXXXXXX

Not sure if there's way to configure it in proxies but it's preferred to use the latest endpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants