FreedomBox/doc/manual/en/Coturn.raw.xml
James Valleroy 296c136d94
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-19 19:23:48 -04:00

4 lines
14 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN' 'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FreedomBox/Manual/Coturn</title><revhistory><revision><revnumber>13</revnumber><date>2020-07-19 22:15:01</date><authorinitials>fioddor</authorinitials><revremark>Translations header added outside include block</revremark></revision><revision><revnumber>12</revnumber><date>2020-07-18 15:36:19</date><authorinitials>fioddor</authorinitials><revremark>Availability standardized.</revremark></revision><revision><revnumber>11</revnumber><date>2020-07-18 15:03:33</date><authorinitials>fioddor</authorinitials><revremark>Icon added for fast identification. Availability standardized.</revremark></revision><revision><revnumber>10</revnumber><date>2020-05-30 18:10:51</date><authorinitials>SunilMohanAdapa</authorinitials><revremark>Update the title to emphasize app name over its generic name</revremark></revision><revision><revnumber>9</revnumber><date>2020-05-23 19:57:40</date><authorinitials>JamesValleroy</authorinitials><revremark>add TableOfContents</revremark></revision><revision><revnumber>8</revnumber><date>2020-05-18 23:24:50</date><authorinitials>JamesValleroy</authorinitials><revremark>remove duplicate word &quot;server&quot;</revremark></revision><revision><revnumber>7</revnumber><date>2020-05-18 23:23:07</date><authorinitials>JamesValleroy</authorinitials><revremark>spelling &quot;known&quot;</revremark></revision><revision><revnumber>6</revnumber><date>2020-05-18 23:22:26</date><authorinitials>JamesValleroy</authorinitials><revremark>add common acronym (NAT)</revremark></revision><revision><revnumber>5</revnumber><date>2020-05-18 23:21:45</date><authorinitials>JamesValleroy</authorinitials><revremark>spelling</revremark></revision><revision><revnumber>4</revnumber><date>2020-05-10 10:33:22</date><authorinitials>fioddor</authorinitials><revremark>Stress the benefits of direct streaming.</revremark></revision><revision><revnumber>3</revnumber><date>2020-05-08 19:15:06</date><authorinitials>Drahtseil</authorinitials><revremark>tiny typo in synapes corrected</revremark></revision><revision><revnumber>2</revnumber><date>2020-05-06 06:04:11</date><authorinitials>SunilMohanAdapa</authorinitials><revremark>Update title, include footer</revremark></revision><revision><revnumber>1</revnumber><date>2020-05-06 05:59:44</date><authorinitials>SunilMohanAdapa</authorinitials><revremark>Add manual page for new app Coturn</revremark></revision></revhistory></articleinfo><para><!--"~-smaller-~" is not applicable to DocBook--><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/DebianWiki/EditorGuide#translation">Translation(s)</ulink>: English - <ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/es/FreedomBox/Manual/Coturn#">Español</ulink> </para><section><title>Coturn (VoIP Helper)</title><informaltable><tgroup cols="1"><colspec colname="col_0"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para> <inlinemediaobject><imageobject><imagedata fileref="https://wiki.debian.org/FreedomBox/Manual/Coturn?action=AttachFile&amp;do=get&amp;target=Coturn-icon_en_V01.png"/></imageobject><textobject><phrase>Coturn icon</phrase></textobject></inlinemediaobject> </para></entry></row></tbody></tgroup></informaltable><para><emphasis role="strong">Available since</emphasis>: version 20.8 </para><para>Coturn is a server to facilitate audio/video calls and conferences by providing an implementation of TURN and STUN protocols. WebRTC, SIP and other communication servers can use it to establish a call between parties who are otherwise unable connect to each other. </para><para>It is not meant to be used directly by users. Servers such as Matrix Synapse need to be configured with the details provided on the Coturn app page. Apart from Matrix Synapse, Jitsi, Ejabberd, Nextcloud Talk, etc. can use Coturn server for audio/video calls and conferences. There is no need for the servers to be running on the same machine as FreedomBox and external servers can use Coturn running on FreedomBox. </para><para>Coturn is configured in FreedomBox as an advanced app. This means that you need to check &quot;Show advanced apps and features&quot; in &quot;General Configuration&quot; to see Coturn icon in the &quot;Apps&quot; section. </para><section><title>How it works</title><para>When making an audio/video call, it is best to route the media streams between two peers directly. This will give the best possible latency (better signal quality) and avoid depending on a centralized server (privacy). It scales well because a simple chat server can host thousands of calls without involving the server in any way other than to setup the call. However, this approach does not work most of the time to due to how networks are configured. Most peers on the network do not have a unique IP address allocated to them. They work hidden behind a network device that performs &quot;Network Address Translation&quot; (NAT) for them. This means that the two peers have no way of reaching each other. </para><para>To address this problem, a simple technique known as STUN was introduced. With the help of a third party STUN server, the peers can trick the NAT devices, to carry the traffic between the two peers. Unfortunately, this trick only works about 80% of the time. So, if STUN fails, peers have no choice but to route their traffic through an intermediary server called TURN server. All the mechanism of trying out STUN first and then falling back to TURN is described in a protocol known as ICE. </para><para>On FreedomBox, Coturn provides both STUN and TURN servers. Both services are provided over TCP as well as UDP. They are provided on unencrypted as well as encrypted channels (with have a higher chance of success). Since STUN servers are very inexpensive and don't consume a lot of server resources, there is no authentication needed to use them. TURN servers on the other hand need authentication. This authentication is highly simplified and does not require maintaining a database of users. A server such as matrix-synapse which is about to setup an audio/video call between two peers will generate a username and password using a shared secret. When the peers use the TURN server, they will be validated using these credentials because the TURN server also knows the same secret. </para><para>In summary, a communication server needs to know the URLs of the STUN/TURN servers along with a shared authentication secret for TURN. After that, during audio/video call setup, they will correctly guide the peers to use STUN/TURN servers. Coturn app in FreedomBox provides exactly this information. This information can be used to configure a communication server irrespective of whether it is running on the same FreedomBox or on another server. </para></section><section><title>Configuring Matrix Synapse</title><para>Matrix Synapse server in FreedomBox can be configured to use Coturn TURN/STUN server. In future, when you install Matrix Synapse, FreedomBox will automatically install Coturn and configure its parameters into Matrix Synapse. To configure Matrix Synapse, edit the file <emphasis>/etc/matrix-synapse/homeserver.yaml</emphasis> with the following lines: </para><screen><![CDATA[turn_uris: [ "stun:myfreedombox.example.org:3478?transport=udp", "stun:myfreedombox.example.org:3478?transport=tcp", "turn:myfreedombox.example.org:3478?transport=udp", "turn:myfreedombox.example.org:3478?transport=tcp" ]
turn_shared_secret: "my-freedombox-provided-secret"
turn_user_lifetime: 86400000
turn_allow_guests: True]]></screen><para>And then restart matrix-synapse server by disabling and re-enabling the matrix-synapse app. </para><para>Back to <ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Features#">Features introduction</ulink> or <ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Manual#">manual</ulink> pages. </para><!--rule (<hr>) is not applicable to DocBook--><informaltable><tgroup cols="8"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><colspec colname="col_3"/><colspec colname="col_4"/><colspec colname="col_5"/><colspec colname="col_6"/><colspec colname="col_7"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para><emphasis role="strong">Information</emphasis></para></entry><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1"><para><emphasis role="strong">Support</emphasis></para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Contribute</emphasis></para></entry><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1"><para><emphasis role="strong">Reports</emphasis></para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Promote</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Introduction#">Overview</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Hardware#">Hardware</ulink> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong"> </emphasis></para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Support#">Live Help</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Contribute#">Where To Start</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Translate#">Translate</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/ProgressCalls#">Calls</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/TalksAndPresentations#">Talks</ulink> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Features#">Features</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Vision#">Vision</ulink> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong"> </emphasis></para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/QuestionsAndAnswers#">Q&amp;A</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Design#">Design</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/TODO#">To Do</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/ReleaseNotes#">Releases</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Press#">Press</ulink> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Download#">Download</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Manual#">Manual</ulink> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong"> </emphasis></para></entry><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Contribute/Code#">Code</ulink> </para></entry><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Contributors#">Contributors</ulink> </para></entry><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1"><para><ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/FreedomBox/Blog#">Blog</ulink> </para></entry></row><row rowsep="1"><entry colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> <ulink url="https://en.wikibooks.org/wiki/FreedomBox_for_Communities">FreedomBox for Communities</ulink> </para></entry><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1"/><entry colsep="1" nameend="col_5" namest="col_4" rowsep="1"><para> <ulink url="https://docs.freedombox.org">FreedomBox Developer Manual</ulink> </para></entry><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1"/></row></tbody></tgroup></informaltable><para><!--"~-smaller-~" is not applicable to DocBook-->HELP &amp; DISCUSSIONS: <ulink url="https://discuss.freedombox.org">Discussion Forum</ulink> - <ulink url="https://lists.alioth.debian.org/mailman/listinfo/freedombox-discuss">Mailing List</ulink> - <ulink url="irc://irc.debian.org/freedombox">#freedombox irc.debian.org</ulink> | CONTACT <ulink url="https://freedomboxfoundation.org/">Foundation</ulink> | JOIN <ulink url="https://salsa.debian.org/freedombox-team/">Project</ulink> </para><para><link linkend="">Next call</link>: Sunday, August 23rd at 17:00 UTC </para><para><link linkend="">Latest news</link>: Help translate freedombox.org - 2020-08-01 </para><para>This page is copyright its contributors and is licensed under the <ulink url="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</ulink> license. </para><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="https://wiki.debian.org/FreedomBox/Manual/Coturn/CategoryFreedomBox#">CategoryFreedomBox</ulink> </para></section></section></article>