summaryrefslogtreecommitdiff
path: root/content/coturn.md
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2023-03-04 19:29:23 +0000
committerGitHub <noreply@github.com>2023-03-04 19:29:23 +0000
commit0d8a5922c1436f0b563fe59a720923b94f820ac5 (patch)
tree999dfc131e9144751959c7b33c2e0886cbdb2bbd /content/coturn.md
parentc4f22b93610833e0d21f4f1d42e0d16e8b497221 (diff)
parent83dc3e920cd3188a3a4b8aafd881ba86b10804fd (diff)
Merge pull request #263 from AleDenshi/master
Fixed up credits, added PSQL guides to multiple tutorials, cleaned up…
Diffstat (limited to 'content/coturn.md')
-rw-r--r--content/coturn.md56
1 files changed, 27 insertions, 29 deletions
diff --git a/content/coturn.md b/content/coturn.md
index 51a1f2c..614b87c 100644
--- a/content/coturn.md
+++ b/content/coturn.md
@@ -7,15 +7,12 @@ img: "webrtc.svg"
tags: ['service']
---
-[Coturn](https://github.com/coturn/coturn) is a libre **STUN** and
-**TURN** server software that allows users of chat protocols (Such as
-[XMPP](/prosody) and [Matrix](/matrix)) to perform WebRTC **voice
-and video calls** despite them being behind NATs.
+[Coturn](https://github.com/coturn/coturn) is a libre **STUN** and **TURN** server software that allows users of internet applications or protocols (Such as [XMPP](/prosody) and [Matrix](/matrix)) to perform WebRTC **voice and video calls** despite them being behind NATs.
-Almost every self-hosted voice and video conferencing program (such as
-[Jitsi](/jitsi) and [Nextcloud\'s](/nextcloud) Talk app) will
-**require** Coturn or some other equivalent turnserver to function
-properly.
+If you want to add video and voice calling natively to your XMPP or Matrix server (or a myriad of various other applications), you'll need to install Coturn and configure it appropriately.
+
+### Note on ejabberd
+If you're installing [ejabberd,](/ejabberd) then *you don't need Coturn.* Ejabberd comes with a TURN server built-in, and you should only setup ejabberd to connect to Coturn if you intend on running **multiple chat services** like Matrix and XMPP.
## Installation
@@ -35,7 +32,7 @@ turnserver.
Here is an example of some sane defaults:
-```md
+```txt
server-name={{<hl>}}turn.example.org{{</hl>}}
realm={{<hl>}}turn.example.org{{</hl>}}
listening-ip=your_public_ip
@@ -52,16 +49,14 @@ verbose
There are two options for authentication on a turnserver:
-1. **Usernames** and **passwords,**
-2. or **authentication secrets.**
+1. **Usernames** and **passwords**
+2. **Authentication secrets**
-Depending on what self-hosted service is being used in conjunction with
-Coturn, you may need one or the other of these two options.
+Depending on what self-hosted service is being used in conjunction with Coturn, you may need one or the other of these two options.
#### Usernames and Passwords
-To utilize username and password authentication with Coturn, add the
-following configuration in `turnserver.conf`:
+To utilize username and password authentication with Coturn, add the following configuration in `turnserver.conf`:
```txt
lt-cred-mech
@@ -78,35 +73,38 @@ use-auth-secret
static-auth-secret={{<hl>}}your_auth_secret{{</hl>}}
```
-## TURNS (TLS Encryption)
+### TURNS (TLS Encryption)
-Some self-hosted services (such as Matrix and XMPP) may support the use
-of **TURNS:** An encrypted version of TURN, which allows for WebRTC
-connections to be established with the use of an encrypted TLS tunnel,
-just like HTTPS allows for encrypted viewing of websites.
+Some self-hosted services may support the use of **TURNS:** An encrypted version of TURN, which allows for WebRTC connections to be established with the use of an encrypted TLS tunnel, just like HTTPS allows for encrypted viewing of websites.
-To utilize TURNS, certificates need to be declared for
-**turn.example.org** in `turnserver.conf`:
+*Note: This does **not** affect the encryption of the audio or video feeds. This only makes the requests to the TURN servers encrypted, which is still desireable for security. Any encryption of the call contents will be handled by the client and server of the application you are using.*
+
+To utilize TURNS, certificates need to be declared for **turn.example.org** in `turnserver.conf`:
```txt
cert=/etc/letsencrypt/live/{{<hl>}}turn.example.org{{</hl>}}/fullchain.pem
pkey=/etc/letsencrypt/live/{{<hl>}}turn.example.org{{</hl>}}/privkey.pem
```
+In this example, Letsencrypt certificates generated with `certbot` are used.
+
+
+
## Starting Coturn
-After all configuration changes are complete, Coturn can be started with
-its systemd daemon:
+After all configuration changes are complete, Coturn can be started with its systemd daemon:
```sh
systemctl restart coturn
```
-Congratulations! You\'ve successfully setup a Coturn server!
+## Configuring your application
-------------------------------------------------------------------------
+At this stage, you should look in your application's own guide on how to set the TURN and STUN server settings. Configure it to point at **turn.example.org** and use either your **username and password pair** or your super-secure **authentication secret.**
-*Written by [Denshi.](https://denshi.org)
+Congratulations! You've successfully setup a Coturn server!
+
+---
-Donate Monero at 48dnPpGgo8WernVJp5VhvhaX3u9e46NujdYA44u8zuMdETNC5jXiA9S7JoYMM6qRt1ZcKpt1J3RZ3JPuMyXetmbHH7Mnc9C
-[\[QR\]](https://denshi.org/images/xmr.png)*
+Written by [Denshi.](https://denshi.org)
+Donate Monero at: `48dnPpGgo8WernVJp5VhvhaX3u9e46NujdYA44u8zuMdETNC5jXiA9S7JoYMM6qRt1ZcKpt1J3RZ3JPuMyXetmbHH7Mnc9C`