Self-host Coturn
docker/4.18.0-r0TURN/STUN relay server for WebRTC and VoIP NAT traversal
docker run -d -p 3478:3478 -p 3478:3478/udp -p 5349:5349 -p 5349:5349/udp -p 49152-65535:49152-65535/udp coturn/coturn- Stars
- 14 548
- Ports
- 3478 (TURN/STUN listener for UDP and TCP), 5349 (TURN listener for TLS and DTLS)
coturn/coturnWhat is Coturn?
coturn is a free open-source TURN and STUN server, used as a media relay and NAT-traversal gateway for VoIP and WebRTC traffic. It speaks UDP, TCP, TLS (including TLS 1.3) and DTLS to clients, relays over UDP and TCP, and implements the modern STUN/TURN specs (RFC 8489 and RFC 8656) plus extensions such as IPv6, TCP relaying, ALPN, NAT behavior discovery and TURN mobility. Clients can authenticate with the classic long-term credentials mechanism, with time-limited TURN REST API secrets for WebRTC, or with an experimental third-party oAuth option; accounts can live in SQLite, MariaDB/MySQL, PostgreSQL, Redis or MongoDB, and a multi-tenant setup can map ORIGIN values to realms. Operations tooling includes a telnet CLI and an HTTPS management interface, plus a Prometheus metrics endpoint and optional Redis status/statistics reporting; traffic bandwidth limits, per-user and global allocation quotas and DNS SRV or ALTERNATE-SERVER based load balancing support large deployments. You install it with your Linux distribution's package (turnserver binary) or run the published coturn/coturn Docker image, usually with host networking and the 49152-65535 UDP relay range opened. The RFC 3489 'classic' STUN compatibility path is deprecated and scheduled for removal in the next major release, ICMP relaying from RFC 8656 is not implemented, and the Prometheus interface is unavailable in the apt package.
Coturn alternatives
Janus WebRTC ServerSelf-hosted open-source WebRTC media server in C: relays RTP/RTCP to browser PeerConnections while plugins add video rooms, streaming, audio bridges and SIP gatewaying.CompareJanus WebRTC Server with Coturn
ChattoChatto is an open-source, self-hosted team chat server: one compact binary, no separate database, with rooms, threads, attachments, search, calls and SSO.CompareChatto with Coturn
SIPCAPTURE HomerSelf-hosted, open-source telecom observability server: capture SIP/VoIP traffic over HEP into a DuckLake datalake, with web UI, call search, QoS and API.CompareSIPCAPTURE Homer with Coturn
heplifyheplify is a self-hosted, open-source HEP capture agent for SIP, RTCP, DNS, Diameter and logs. Runs as a single binary on Linux, macOS, Windows with Docker.Compareheplify with Coturn
Peer CallsSelf-hosted, open-source WebRTC group video calling server in Go and TypeScript, with optional SFU mode, TURN support, ICE over TCP and Kubernetes or Docker deployment.ComparePeer Calls with Coturn
Nextcloud SignalingSelf-hosted, open-source signaling server for Nextcloud Talk video calls and screen sharing via WebRTC, NATS, Janus, and TURN.CompareNextcloud Signaling with Coturn
StoatSelf-hosted, open-source deployment of the Stoat group chat platform: back-end, web client, file server, voice and image proxies run as one Docker Compose stack.CompareStoat with Coturn
VDO.NinjaOpen-source browser-based WebRTC tool that pipes remote guests, phone cameras, and screen shares into OBS and other live-production software, with director control rooms.CompareVDO.Ninja with Coturn
Should you self-host Coturn?
Coturn scores 71/100 on selfhost.directory (how scoring works) and ranks #1 of 1 in WebRTC. It has 14 548 GitHub stars, +93 in the last 30 days.
It shipped 16 stable releases in the past year. The latest, docker/4.18.0-r0, came out on 8 September 2026. New versions land roughly every 3 days.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is BSD-3-Clause-licensed and written mostly in C.
Features
- HTTPS management interfaceRequires the admin_user database table to be populated
- IPv6 Support
- Load balancing support
- Long-term credentials authentication
- Multi-tenant realms (ORIGIN)
- Pluggable user databases
- Prometheus metrics endpointUnavailable in the apt package
- STUN and TURN server
- Telnet CLI management interface
- Third-party oAuth authorizationDescribed as experimental
- Traffic bandwidth control
- TURN mobility (MICE)
- TURN REST API credentials
Coturn README
Docker Hub | GitHub Container Registry | Quay.io
coturn is a free open source implementation of TURN and STUN Server. The TURN Server is a VoIP media traffic NAT traversal server and gateway.
Linux distros may have a version of coturn which you can install by
apt install coturn
turnserver --log-file stdout
More in WebRTC
dograhSelf-hosted open-source voice AI platform: build phone agents in a visual workflow editor with BYOK LLM/STT/TTS and telephony — an alternative to Vapi and Retell.
FreeSBCFreeSBC is a self-hosted, open-source SBC in Go that keeps FreeSWITCH/Asterisk off the public internet with SIP proxying, RTP/SRTP media anchoring, WebRTC gateway.
FreeSWITCHOpen-source self-hosted softswitch replacing proprietary telecom hardware: SIP PBX with dialplan, voicemail, conferencing, WebRTC and an ESL control API.
jangoutsOpen-source, self-hosted Hangouts-style conferencing app: browser video, voice, screen broadcast and typed chat across unlimited rooms, powered by Janus Gateway.
JanusJanus WebRTC Server
Janus WebRTC ServerSelf-hosted open-source WebRTC media server in C: relays RTP/RTCP to browser PeerConnections while plugins add video rooms, streaming, audio bridges and SIP gatewaying.
Jitsi Video BridgeJitsi Videobridge is an open-source, self-hosted WebRTC SFU that routes video for scalable multiparty conferencing.
Nextcloud SignalingSelf-hosted, open-source signaling server for Nextcloud Talk video calls and screen sharing via WebRTC, NATS, Janus, and TURN.
OpenViduOpenVidu is an open-source, self-hosted WebRTC platform: the ready-made OpenVidu Meet conferencing app plus programmable SDKs, built on LiveKit and mediasoup.
SRSOpen-source, self-hosted C++ media server for live video over RTMP, WebRTC, HLS, HTTP-FLV, SRT, DASH and GB28181, with Docker and Kubernetes deployment.
waterbus-rsWaterbus is a self-hosted, open-source WebRTC SFU media server in Rust for low-latency real-time video, audio, and data streaming with simulcast and egress.
webrtc_turnOpen-source TURN relay for AndroMeld that relays encrypted WebRTC traffic when P2P fails. Deploy via Docker on your VPS or one-click Cloudflare Worker.
0 comments