Post

Coturn

Coturn is an open-source TURN and STUN server that relays audio, video and data for WebRTC clients that cannot connect directly through NAT or firewalls. It is the relay commonly paired with Matrix (Synapse), Jitsi Meet and Nextcloud Talk, and authenticates clients with time-limited credentials derived from a shared secret.

Coturn
In Development
This script is currently in active development and may be unstable or incomplete. Use in production environments is not recommended.

Installation

Default install:

1
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/DevScripts/main/ct/coturn.sh)"
CPU: 1 cores RAM: 512 MB Disk: 4 GB OS: Debian 13

Notes

Point your app (e.g. Synapse turn_shared_secret) at the static-auth-secret in /opt/coturn_data/.env. Relaying to private IP ranges is denied; add allowed-peer-ip in /etc/turnserver.conf for internal media servers.
Behind NAT, set external-ip in /etc/turnserver.conf and forward 3478 (UDP/TCP), 5349 (TCP) and UDP 49160-49200 to the container.
Port 5349 (turns:) uses a self-signed certificate; replace cert and pkey with a trusted one if clients use TLS.

Web Interface

Port: 3478

Source code
Loading...