Installation
Choose and install the RelayRTC packages for your frontend and backend.
On this page
Install a frontend SDK in your browser application and the Node SDK in your backend. Running these packages does not start RelayRTC services; connect them to an existing deployment or self-host RelayRTC.
Packages
| Package | Runs in | Use it for |
|---|---|---|
@relayrtc/react | React frontend | Providers, room hooks and media components. |
@relayrtc/client | Browser | Room connections, devices, publications and subscriptions. Required alongside the React SDK. |
@relayrtc/node | Node.js backend | Room administration, participant tokens and webhook verification. |
Shared types, validation and protocol packages support these SDKs. You do not need to install them separately for the first-call example.
React
Use React 18.3.1 or 19 in your application. Install both the React wrapper and browser client:
pnpm add @relayrtc/react@0.1.4 @relayrtc/client@0.1.4import { RelayProvider, RelayRoom, useRoom } from '@relayrtc/react'In Next.js, RTC providers and hooks belong in a 'use client' module. Keep server-side token issuance in a separate backend module. Camera and microphone access require HTTPS or localhost and browser permission.
Node.js
Use Node.js 22 or newer. The SDK is an ES module and includes TypeScript declarations.
pnpm add @relayrtc/node@0.1.4import { RelayServer, verifyWebhookRequest } from '@relayrtc/node'For JavaScript, use .mjs files or set "type": "module" in your application's package manifest. Configure a secret project-environment API key on the server; never import this configuration into a frontend bundle.
Plain browser client
Use the browser client directly if you do not use React or want to manage media elements yourself.
pnpm add @relayrtc/client@0.1.4import { RelayClient } from '@relayrtc/client'See the browser reference for joining, subscriptions and teardown.
Package and server compatibility
Room roles and permissions, room invitations and deadlines, speaker/activity observations and push-to-talk target SDK and service version 0.1.4. Use matching browser and React SDKs at 0.1.4, Node SDK 0.1.4, and the corresponding API, signaling and media release. The React wrapper requires browser client ^0.1.4.
Apply database migrations 0045_room_access, 0046_room_lifecycle and 0047_room_activity before deploying updated services. Older strict protocol clients require a coordinated upgrade. A version declared in source does not establish that its npm packages or images have been published.
The REST path /v1 is an API contract version, not an npm package version. Do not append an SDK version to the API URL.
Next step
Follow Build your first call to connect your backend and React frontend to the same room.