Recent Changes - Search:




edit SideBar

Doc /


1) Requirements

In order to compile TurnServer, you need the followings packages :

  • autoconf
  • automake
  • make
  • gcc
  • libssl-dev
  • libconfuse-dev
  • check
  • doxygen
  • pkg-config

Note : on your system the packages may have different name.

2) Build / Install

 $ autoreconf -i
 $ ./configure
 $ make
 # make install

./configure can take options:

 --enable-debug-build                 :   allow to compile with debug informations default=no
 --enable-fdsetsize=number            :   allow to preconfigure FD_SETSIZE macro (must be a number >=32) default=no
 --enable-xor-peer-address-max=number :   allow to preconfigure XOR_PEER_ADDRESS_MAX macro (must be a number > 0) default=5

Copy the template configuration file (extra/turnserver.conf.template) and template accounts database file (extra/turnusers.txt) to a directory of your choice (i.e. /etc/ or /usr/local/etc/). Do not forget the accounts database file pathname has to be populated in configuration file (attribute account_file), see next section.

To generate the API documentation:

 $ make doxygen-run

The HTML generated documentation is located in doc/html/ directory of TurnServer sources.

3) Configuration

Here are the configuration options supported :

  • listen_address = { IPv4 address [, IPv4 address, ...] }

The public IPv4 address of any relayed address (if not set, no relay for IPv4).

  • listen_addressv6 = { IPv6 address [, IPv6 address, ...] }

The public IPv6 address of any relayed address (if not set, no relay for IPv6).

  • udp_port = number

The UDP port of the server to listen for incoming connection.

  • tcp_port = number

The TCP port of the server to listen for incoming connection.

  • tls = boolean

Whether or not enable TLS over TCP connection.

  • dtls = boolean

Whether or not enable DTLS (Datagram TLS) connection.

  • max_port = number

Maximum allocation port number.

  • min_port = number

Minimum allocation port number.

  • turn_tcp = boolean

Enable or not TURN-TCP extension. This extension is documented in draft-ietf-behave-turn-tcp.

  • "tcp_buffer_userspace = boolean

Enable or not userspace buffering for TURN-TCP extension. If false server will use OS buffering.

  • tcp_buffer_size = number

TURN-TCP internal buffer size. It is used to bufferize data coming from TCP peer when client does not have sent ConnectionBind.

  • daemon = boolean

Whether or not to run the program as daemon.

  • unpriv_user = string

If the program is run as root or setuid root, the program will drop its privileges to the unpriv_user privileges.

  • realm = string

Realm value (i.e.

  • nonce_key = string

Key used to hash nonce.

  • max_relay_per_username = number

Maximum number of allocation per username.

  • allocation_lifetime = number

Lifetime of an allocation in second.

  • "denied_address {
 "address" = IPv4 address | IPv6 address
 "mask" = bitmask number
 "port" = number (1 - 65535)


  • bandwidth_per_allocation = number

Bandwidth limit for an allocation in KBytes/s. 0 value means disable bandwidth quota.

  • ca_file = string

The pathname of the Certification Authority certificate (required when tls=true).

  • cert_file = string

The pathname of the server certificate (required when tls=true).

  • private_key_file = string

The pathname of the server private key (required when tls=true).

  • account_method = [file | db | ldap ...]

The method to retrieve account data. Note that only the "file" method is implemented.

  • account_file = string

The pathname of the account file (required when account_method=file).

4) Launching TurnServer

turnserver -c /patch/to/configfile.conf

Edit - History - Print - Recent Changes - Search
Page last modified on May 15, 2013, at 05:03 PM