---
id: "coturn"
type: "component"
kind: "media-router"
provider: "default"
category: "edge"
docs: "https://github.com/coturn/coturn/wiki/turnserver"
url: "https://localhost:3000/catalogue/components/coturn"
---

# coturn

STUN and TURN relay server for NAT traversal in WebRTC sessions.

| | |
|---|---|
| Provider | [default](https://localhost:3000/catalogue?provider=default) |
| Kind | [Media router](https://localhost:3000/catalogue/kinds/media-router) |
| Category | Edge |
| Official docs | [https://github.com/coturn/coturn/wiki/turnserver](https://github.com/coturn/coturn/wiki/turnserver) |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `authMechanism` | enum | `anonymous`, `long-term`, `short-term` | no | "anonymous" | inherited |
| `cascading` | boolean | — | no | false | **false** |
| `managed` | boolean | — | no | false | **false** |
| `mode` | enum | `sfu`, `mcu`, `p2p`, `ingest` | no | "sfu" | **"p2p"** |
| `rerouteOnFailure` | boolean | — | no | false | inherited |
| `tlsEnabled` | boolean | — | no | false | inherited |
| `transport` | enum | `udp`, `tcp`, `both` | no | "both" | **"both"** |

Bold values are the ones this component pins.

## Rules that apply · 0

No rule selects this kind or its category.

## Other products of the same kind · 23

- [Amazon Chime SDK](https://localhost:3000/catalogue/components/aws-chime-sdk.md) `aws-chime-sdk` — aws
- [Amazon IVS](https://localhost:3000/catalogue/components/aws-ivs.md) `aws-ivs` — aws
- [AWS Elemental MediaConnect](https://localhost:3000/catalogue/components/aws-mediaconnect.md) `aws-mediaconnect` — aws
- [AWS Elemental MediaPackage](https://localhost:3000/catalogue/components/aws-mediapackage.md) `aws-mediapackage` — aws
- [AWS Elemental MediaTailor](https://localhost:3000/catalogue/components/aws-mediatailor.md) `aws-mediatailor` — aws
- [Cloudflare MoQ](https://localhost:3000/catalogue/components/cloudflare-moq.md) `cloudflare-moq` — cloudflare
- [Cloudflare Realtime SFU](https://localhost:3000/catalogue/components/cloudflare-realtime-sfu.md) `cloudflare-realtime-sfu` — cloudflare
- [RealtimeKit](https://localhost:3000/catalogue/components/cloudflare-realtimekit.md) `cloudflare-realtimekit` — cloudflare
- [Cloudflare Realtime TURN](https://localhost:3000/catalogue/components/cloudflare-turn.md) `cloudflare-turn` — cloudflare
- [Agora](https://localhost:3000/catalogue/components/agora.md) `agora` — default
- [Ant Media Server](https://localhost:3000/catalogue/components/ant-media.md) `ant-media` — default
- [Daily](https://localhost:3000/catalogue/components/daily.md) `daily` — default
- [Icecast](https://localhost:3000/catalogue/components/icecast.md) `icecast` — default
- [Janus](https://localhost:3000/catalogue/components/janus.md) `janus` — default
- [Jitsi Videobridge](https://localhost:3000/catalogue/components/jitsi.md) `jitsi` — default
- [LiveKit](https://localhost:3000/catalogue/components/livekit.md) `livekit` — default
- [Generic media router](https://localhost:3000/catalogue/components/media-router.md) `media-router` — default
- [mediasoup](https://localhost:3000/catalogue/components/mediasoup.md) `mediasoup` — default
- [Red5](https://localhost:3000/catalogue/components/red5.md) `red5` — default
- [SRS](https://localhost:3000/catalogue/components/srs.md) `srs` — default
- [Twilio Video](https://localhost:3000/catalogue/components/twilio-video.md) `twilio-video` — default
- [Wowza Streaming Engine](https://localhost:3000/catalogue/components/wowza.md) `wowza` — default
- [Video Stitcher API](https://localhost:3000/catalogue/components/google-video-stitcher-api.md) `google-video-stitcher-api` — gcp

## Use it in a design

```yaml
nodes:
  - { id: "coturn", component: "coturn" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# coturn: STUN and TURN relay server. Per the coturn "turnserver" manual it listens on 3478 for
# UDP/TCP and 5349 for TLS/DTLS, relays over both UDP and TCP unless --no-udp-relay or
# --no-tcp-relay is given, and runs without authentication until a credential mechanism is set.
schemaVersion: "1"
type: "component"
id: "coturn"
kind: "media-router"
provider: "default"
docs: "https://github.com/coturn/coturn/wiki/turnserver"
defaults:
  managed: false
  mode: "p2p"
  transport: "both"
  cascading: false
properties:
  tlsEnabled:
    type: "boolean"
    default: false
  authMechanism:
    type: "enum"
    values: ["anonymous", "long-term", "short-term"]
    default: "anonymous"
```

Human page: https://localhost:3000/catalogue/components/coturn
