Open Relay: Free WebRTC TURN Server
Need a Premium TURN Serverβ
Metered also offers a premium TURN server service that automatically routes users to nearest server offering lowest possible latency. Plus also offer powerful REST API that allows creation, automatic expiry of credentials and ability to fetch detailed usage stats.
Learn more about it here.
Premium TURN server by MeteredWhat is a TURN Server?β
WebRTC TURN Server is required to relay the traffic between the peers when direct connection cannot be established among them.
WebRTC protocol establishes a direct connection between the peers, but the sometimes a direct connection cannot be established for this a TURN Server is required to relay the traffic between the peers.
As peers cannot directly connect to each other the TURN Server acts as an intermediary among the peers and forwards the traffic from one peer to another.
All the traffic (video/audio + data) that passes through the TURN server is already end-to-end encrypted by the peers and the TURN Server cannot decode/read the encrypted packet, it just relays the packet to other peers.

Overviewβ
Open Relay is a free TURN server provided by Metered Video that you can use in your WebRTC applications. The Open Relay TURN server is highly available, reliable and offers both STUN and TURN Capabilities.
The Open Relay runs on port 80 and 443 to bypass corporate firewalls, many corporate/enterprise firewall only allow port 80 or 443, it also supports turns + SSL for maximum compatibility.
The TURN Server provides 20 GB of free TURN Usage every month.
- β Runs on port 80 and 443
- β Tested to bypass most firewall rules
- β Support TURNS + SSL to allow connections through deep packet inspection firewalls.
- β Support STUN
- β Supports both TCP and UDP
- β Dynamic routing to the nearest server
- β 20GB of free TURN Usage Every Month
Global TURN server Cloud Infrastructureβ

β¨ How to useβ
You can use the Open Relay TURN Server in your Javascript Code.
To use the TURN Server you will have to call the TURN Server REST API, the TURN Server REST API will return the iceServers array that you
can use in the front-end.
The REST API automatically returns iceServers that are nearest to the geo-location of the user for the lowest latency.
info
To obtain your API_KEY sign-up for a free account.
Using the JavaScript Fetch() APIβ
const peerConfiguration = {};
(async () => {
const response = await fetch("https://yourappname.metered.live/api/v1/turn/credentials?apiKey=API_KEY");
const iceServers = await response.json();
peerConfiguration.iceServers = iceServers;
})();
const myPeerConnection = new RTCPeerConnection(peerConfiguration);
Using Axiosβ
const peerConfiguration = {};
(async () => {
const response = await axios.get("https://yourappname.metered.live/api/v1/turn/credentials?apiKey=API_KEY");
const iceServers = response.data;
peerConfiguration.iceServers = iceServers;
})();
const myPeerConnection = new RTCPeerConnection(peerConfiguration);
Using the @metered-ca/realtime SDKβ
The examples above fetch iceServers for a raw RTCPeerConnection β you still have to build signalling, reconnect, and negotiation yourself. The free @metered-ca/realtime SDK (~12.5 KB, MIT) bundles all of it and auto-injects your Open Relay TURN credentials at connect time:
import { MeteredPeer } from "@metered-ca/realtime";
const peer = new MeteredPeer({ apiKey: "pk_live_..." }); // free key in your dashboard
await peer.join("my-room"); // discovers peers; TURN auto-applied
peer.on("peer-joined", ({ peer: remote }) => {
remote.on("stream-added", ({ stream }) => {
remoteVideo.srcObject = stream;
});
});
const cam = await navigator.mediaDevices.getUserMedia({ audio: true, video: true });
peer.addStream(cam);
note
The SDK's apiKey here is your signalling publishable key (pk_live_...), separate from the TURN REST API_KEY used above β both are free in your dashboard. Create it from Dashboard β Realtime Messaging β Keys β Create key β Publishable, and make sure Send is enabled β it's off by default, and without it WebRTC connects but the video never negotiates.
Free signalling + 20 GB/mo free Open Relay TURN, no backend to run. @metered-ca/realtime β the open-source WebRTC library β Β· Free WebRTC signalling server β
π Credentialsβ
To Connect to the Open Relay TURN Server, you need to sign-up for a free account and obtain your API Key.
Using the API you can call the end-point to fetch the iceServers array that you can use in the RTCPeerConnection.
π Static Authβ
Services like Nextcloud Talk or Matrix+Synapse+Riot uses static auth instead of username and password authentication for the TURN Server.
To use the TURN Server with those services use the static auth url which is staticauth.openrelay.metered.ca
secret: openrelayprojectsecret
TURN Server for Nextcloud Talkβ
Open Relay Project also works with Nextcloud talk, follow the instructions below to learn how to configure Nextcloud talk to work with Open Relay.
Nextcloud talk require the auth-secret-authentication so we have to use the Open Relay Project's TURN Server with auth-secret-authentication.
Use the turn server url staticauth.openrelay.metered.ca with Nextcloud talk and turn secret: openrelayprojectsecret.
- Go to
Nextcloud-> Settings -> Talkand under TURN Servers press the + button - Then select
turn:only - Under turnserver:port enter
staticauth.openrelay.metered.ca:80 - Under secret enter
openrelayprojectsecret
Add another entry for port 443
- Select
turn:only - Under turnserver:port enter
staticauth.openrelay.metered.ca:443 - Under secret enter
openrelayprojectsecret

π§° Testing the TURN and STUN Serverβ
You can test the TURN Server using our TURN Server Testing tool
Trickle ICEβ
Go to the TURN Server Testing tool website at: https://www.metered.ca/turn-server-testing and enter the TURN Server credentials.
1. Add TURN Server Info Add the TURN Server Credential. If you do not have the TURN Server credentials you can obtain them by signup for a free account.

2. Add STUN Server Info
Click the Launch Button to Launch the test. If you don't specify the STUN Server address it will not display your PUBLIC IP address.

π§° Complete your free WebRTC stackβ
A TURN server is just one piece of WebRTC. To actually connect two peers you also need signalling (to exchange connection info) and a client library (to manage the connection and reconnects). Metered gives you all three β free to start:
| Piece | What it does | Free tier |
|---|---|---|
| π’ Open Relay TURN | Relays media when peers can't connect directly | 20 GB / month |
| π΅ Metered Realtime (signalling) | Coordinates connections over WebSocket | 100 connections Β· 100k msgs / month |
| π£ @metered-ca/realtime | Open-source JS library β auto-reconnect, TURN built in | MIT Β· free |
β Free WebRTC signalling server Β· The open-source PeerJS & simple-peer alternative
π‘ Free WebRTC Signalling Serverβ
A TURN server only relays media once a connection exists β to establish the connection, peers must first exchange SDP offers/answers and ICE candidates over a signalling channel. Metered's Realtime Messaging is a free, managed signalling server that pairs with Open Relay, so you don't have to build or host your own.
- β
Pub/sub over a single WebSocket (
wss://rms.metered.ca/v1) - β Channels, presence (join/leave + per-peer metadata), and direct peer-to-peer messages
- β JWT-minted credentials β your backend decides who can do what
- β REST API to mint tokens, list peers, and publish server-side
- β Auto-injects your Open Relay TURN credentials at connect time β no manual fetch
π§© @metered-ca/realtime β WebRTC Peer Libraryβ
The fastest way to use Open Relay and Realtime Messaging together. A free, open-source (MIT) browser SDK (~12.5 KB) that bundles signalling, WebRTC negotiation, and TURN injection into a few lines of code β a modern, batteries-included alternative to PeerJS and simple-peer.
- β Auto-reconnect that survives Wi-Fi drops (WebSocket reconnect + ICE-restart + identity-preserving reconcile)
- β Perfect-negotiation β no glare or initiator-role bugs
- β Multi-stream with per-stream metadata (route camera + screen through one peer)
- β ~12.5 KB gzipped, zero dependencies, TypeScript-native
npm install @metered-ca/realtime
- Replacing PeerJS? β PeerJS migration guide
- Replacing simple-peer? β simple-peer migration guide
π‘οΈSecurityβ
All the WebRTC traffic is end-to-end encrypted using DTLS-SRTP and the TURN server just relays the traffic. The TURN server only parse the UDP layer of WebRTC packet for routing purposes, and do not (and cannot) touch the DTLS encryption.
All the application layer data, include video and datachannel is encrypted using DTLS+SRTP and the TURN server cannot decrypt that data and it only relays the encrypted data among the peers.
You can read more about it here: https://webrtc-security.github.io/
To read more about the TURN proposed standard refer to RFC 5766
βΉοΈ Contactβ
If you have any questions, comments or suggestions you can email us at contact[at]openrelayproject.org
π Powered by Metered Videoβ
Metered Video provides enterprise grade WebRTC video calling apis that you can use to create video conferencing applications that can scale upto thousands of simultaneous online users, with live streaming and recording capabilities.
Building peer-to-peer WebRTC? Metered's free @metered-ca/realtime SDK and Realtime Messaging signalling service pair with Open Relay for signalling, presence, and auto-reconnect.
Terms and Conditionsβ
By using Open Relay Project Website or TURN server, you agree to our terms and conditions.