mod_turn_external

Easily connect a TURN/STUN server by enabling this module.

This module is included with Prosody starting with 0.12.0. For Prosody 0.11.x, you can use the community module with the same name, the documentation below applies to both versions of the module.

We have documentation dedicated to setting up a TURN server with Prosody that may also be helpful to you.

Once this module is configured, we recommend running prosodyctl check turn to ensure everything is working correctly.

Usage

modules_enabled = {
    -- other modules
    "turn_external",
}

-- a secret shared with the turn server is the only required setting
turn_external_secret = "aGVtbGlndAo="

-- if the service is hosted on a hostname that differs from name of virtualhost
turn_external_host = "turn.example.com"

-- if a non-standard port is used
turn_external_port = 3478

Configuration

turn_external_secret
A secret shared with the TURN server, used to dynamically generate credentials. required
turn_external_user
Suffix to use for generated usernames, if the TURN server uses this.
turn_external_ttl
How long the generated credential are valid, defaults to 86400 = 1 day.
turn_external_host
DNS hostname of the TURN (and STUN) server, defaults to same as VirtualHost.
turn_external_port
Port number used by TURN (and STUN) server, defaults to 3478.
turn_external_tcp
Whether to announce TURN (and STUN) over TCP, in addition to UDP (uncommon).
turn_external_tls_port
Port offering TURN over TLS (uncommon).