---
title: "Self-host Session Replay SDKs"
description: Host Amplitude SDK files and proxy API calls from your own domain to bypass ad blockers and meet data residency requirements.
product: session-replay
lang: en
last_updated: 2026-10-19
token_estimate: 802
---
# Self-host Session Replay SDKs

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

Self-hosting serves browser SDK files and routes API calls through your own domain. Use it to avoid requests that ad blockers prevent or to meet requirements for routing data through your infrastructure before it reaches Amplitude.

Choose either or both independent tasks:

| Task | Use when |
| --- | --- |
| [Self-host the browser script](https://amplitude.com/docs/session-replay/self-host-browser-script) | You load the SDK through a `<script>` tag and want to serve the file from your CDN or static server. Bundled npm installations skip this task. |
| [Proxy replay requests](https://amplitude.com/docs/session-replay/proxy-replay-requests) | You want replay ingestion requests, and browser remote configuration requests, to pass through your server. |

The iOS and Android SDKs support a custom URL for replay uploads. The React Native and Flutter SDKs don't support custom proxy URLs. Their `serverZone` option selects Amplitude's US or EU data center, and requests go directly to Amplitude.

## Part 1: Self-host the SDK script

Go to [Self-host the browser Session Replay script](https://amplitude.com/docs/session-replay/self-host-browser-script).

### Get the SDK file

Go to [Get the SDK file](https://amplitude.com/docs/session-replay/self-host-browser-script#get-the-sdk-file) for pinned download examples.

### Serve the file

Go to [Serve the file](https://amplitude.com/docs/session-replay/self-host-browser-script#serve-the-file) to update script tags and caching.

## Part 2: Proxy API calls

Go to [Proxy Session Replay requests](https://amplitude.com/docs/session-replay/proxy-replay-requests).

### How the proxy works

Go to [How the proxy works](https://amplitude.com/docs/session-replay/proxy-replay-requests#how-the-proxy-works) for forwarding and response requirements.

### Analytics SDKs

Go to [Proxy Analytics SDK requests](https://amplitude.com/docs/sdks/analytics/proxy-requests) if your implementation also needs to proxy Analytics traffic.

### Remote config proxy (Browser SDK 2 only)

Go to [Remote config proxy](https://amplitude.com/docs/sdks/analytics/proxy-requests#remote-config-proxy-browser-sdk-2-only) for the separate Browser SDK 2 configuration request.

### Session Replay: Browser (Plugin and Standalone SDK)

Go to [Browser replay proxy configuration](https://amplitude.com/docs/session-replay/proxy-replay-requests#session-replay-browser-plugin-and-standalone-sdk) for ingestion and configuration endpoints.

### Session Replay: Mobile (iOS and Android)

Go to [Mobile proxy setup](https://amplitude.com/docs/session-replay/proxy-replay-requests#session-replay-mobile-ios-and-android) for the iOS and Android custom server URL options.

## Content Security Policy (CSP)

Configure [script hosting CSP](https://amplitude.com/docs/session-replay/self-host-browser-script#content-security-policy) for your file-serving domain and [proxy CSP](https://amplitude.com/docs/session-replay/proxy-replay-requests#content-security-policy-csp) for network endpoints.

