jami-docs

Forked version of Jami documentation, see wrycode.com/jami-docs-demo
git clone git://git.wrycode.com/wrycode/jami-docs.git
Log | Files | Refs

how-to-set-up-a-turn-server.txt (2125B)


      1 ############################
      2 How to Set Up a TURN Server
      3 ############################
      4 
      5 Jami can be configured to use TURN or STUN servers (`RFC
      6 5766 <https://tools.ietf.org/html/rfc5766>`__) to establish a connection
      7 between two peers.
      8 
      9 The default TURN server is “turn.jami.net”, with username “ring”,
     10 password “ring”, and realm “ring”.
     11 
     12 In this guide, we will setup a
     13 `coturn <https://github.com/coturn/coturn>`__ server. There are other
     14 TURN/STUN server implementations available under a free license, such as
     15 `TurnServer <http://turnserver.sourceforge.net/>`__ and
     16 `Restund <http://www.creytiv.com/restund.html>`__.
     17 
     18 Installing
     19 ==========
     20 
     21 COTURN is available in most Linux distributions. On Debian, install it
     22 with the following command:
     23 
     24 .. code:: bash
     25 
     26    apt-get install coturn
     27 
     28 Configuring
     29 ===========
     30 
     31 Here is a basic ``turnserver.conf`` file:
     32 
     33 ::
     34 
     35    listening-port=10000
     36    listening-ip=0.0.0.0
     37    min-port=10000
     38    max-port=30000
     39    lt-cred-mech
     40    realm=sfl
     41 
     42 This also will function as a STUN server. The STUN server does not
     43 require a username and password (STUN uses very little bandwidth).
     44 
     45 Creating users on your TURN server
     46 ==================================
     47 
     48 To create users on your TURN server, use the ``turnadmin`` binary (this
     49 might require superuser permissions).
     50 
     51 .. code:: bash
     52 
     53    turnadmin -a -u bob -p secretpassword -r sfl
     54 
     55 Launching the TURN server
     56 =========================
     57 
     58 .. code:: bash
     59 
     60    turnserver -c turnserver.conf
     61 
     62 Configuring Jami to authenticate with the TURN server
     63 =====================================================
     64 
     65 You can configure Jami to use your TURN server from the advanced section
     66 of your account settings:
     67 
     68 ============== ============================ ==============
     69 Field          Value                        Example
     70 ============== ============================ ==============
     71 **server url** host and port of your server 0.0.0.0:10000
     72 **username**   username                     bob
     73 **password**   password                     secretpassword
     74 **realm**      realm                        sfl
     75 ============== ============================ ==============