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.


modules_enabled = {
    -- other modules

-- 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 = ""

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


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