Skip to content

STUN/TURN Service

In real-world networks, most devices sit behind NAT or firewalls, which makes WebRTC peer-to-peer links difficult. STUN and TURN are core parts of the ICE (Interactive Connectivity Establishment) framework that solve this.

  • STUN: tries to discover a workable direct P2P path
  • TURN: relays traffic when direct paths fail

STUN vs TURN

TURN Providers

There are plenty of public STUN servers, but almost no public TURN endpoints. You can self-host STUN/TURN with coturn.

If you already use Cloudflare, each account includes 1 TB of TURN relay traffic monthly. For Mainland China users, TURN via Cloudflare may have reachability or latency issues.

Cloudflare STUN/TURN