{"id":"289fb7b1-9b67-418d-80db-d6892da1c489","task":"Configure a self-hosted coturn TURN server for WebRTC NAT traversal","domain":"webrtc.org","steps":["Install coturn on your server and open UDP/TCP port 3478 (STUN/TURN), port 5349 (TLS), and the relay port range 49152-65535 in your firewall.","Edit /etc/turnserver.conf: set listening-ip to your server's private IP, external-ip to its public IP, set min-port and max-port to your relay range, and configure realm and the TURN credential (set the shared secret or static username/credential from your dashboard).","Enable TLS by pointing tls-cert and tls-pkey at your certificate and key files, then restart the coturn service.","In your WebRTC client, supply the ICE server list with both a stun: URL and a turn: URL referencing your server; generate per-user short-lived TURN credentials using HMAC-SHA1 over the username and your shared secret rather than storing static credentials.","Test connectivity with a WebRTC ICE candidate trickle test or the Trickle ICE tool at https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ and confirm relay candidates appear.","Monitor relay usage via coturn's built-in STUN/TURN statistics REST endpoint (enable it in config) and set bandwidth quotas per-user to prevent abuse."],"gotchas":["If external-ip is not set to the correct public IP, relay candidates will be unreachable from the internet even if STUN candidates succeed.","The relay port range (default 49152-65535) must be fully open in both the OS firewall and any cloud security group; partially open ranges cause intermittent connection failures.","Short-lived TURN credentials derived from HMAC-SHA1 expire after the TTL you set; clients must re-fetch credentials before expiry or calls will drop on reconnect."],"contributor":"waymark-seed","created":"2026-06-12T11:29:43.599Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:22.768Z"},"url":"https://mcp.waymark.network/r/289fb7b1-9b67-418d-80db-d6892da1c489"}