# Building/configuring a TURN server

**URL:** https://discuss.freedombox.org/t/building-configuring-a-turn-server/832
**Category:** Development
**Created:** [October 22, 2019, 5:17pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832 "2019-10-22T17:17:35Z")
**Posts on this page:** 12
**Page:** 4

<div class="post-metadata">

### Author: ![ScottishFreedom](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/scottishfreedom/32/316_2.png) [@ScottishFreedom](https://discuss.freedombox.org/u/ScottishFreedom)
#### Post date: [May 20, 2020, 12:42pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/63 "2020-05-20T12:42:09Z")

</div>

😃 wow, exactly what I needed - nice find 🙂 I’m going to follwo his set up guide whan I get time over the weekend: [https://help.nextcloud.com/t/howto-setup-nextcloud-talk-with-turn-server/30794](https://help.nextcloud.com/t/howto-setup-nextcloud-talk-with-turn-server/30794)

---

<div class="post-metadata">

### Author: ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)
#### Post date: [May 20, 2020, 3:33pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/64 "2020-05-20T15:33:47Z")

</div>

Bad news! We won’t get it to work until ejabberd 20.4 is in the debian repos. At the moment it’s 18something … so … I guess that will time until then. 😕

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [May 21, 2020, 11:27pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/65 "2020-05-21T23:27:13Z")

</div>

> [@homer77](#):
>
> We won’t get it to work until ejabberd 20.4 is in the debian repos.

The article mentioned 20.04 though, and that is already in buster-backports.  
It is widely, highly apprecieated I guess. 🙂

---

<div class="post-metadata">

### Author: ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)
#### Post date: [May 22, 2020, 8:31pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/66 "2020-05-22T20:31:40Z")

</div>

Sooooo! To sum up the **state of the STUN** 😉

- VoIP via **Matrix** already works well after configuring **coTURN with --external-ip**
- After upgrading **ejabberd to 20.4** via backports I activated `mod_stun_disco` with stun(s) and turn(s) on 3478 and 5349
  - ~~and had yet a 90min call with a friend via **PixArt** -Messenger ( **Conversations** -fork)~~  ~~Unfortunately we didn’t realize that we did not use my server for calling. Instead PixArt doesn’t offer to call at all when we use our accounts on my FreedomBox 😢 What do I have to do for that? … @SottishFreedom ?~~
  - Well, I had a strange time with that server … The only thing I altered during my investigation was adding the stun and turn SRV entry in DNS of my domain. I also observed that in our conversation we didn’t receive the avatars. And finally some minutes ago the Call-Symbol appeared in PixArt and we called successfully and received the right avatars. …

- added the stun and the turn incl. secret in **Nextcloud Talk** on another server at my office
  - which **worked fantastic** between different networks, too.

I’m good with this 😁

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [May 26, 2020, 9:11pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/67 "2020-05-26T21:11:10Z")

</div>

Just realized that redirecting the router’s dyndns updates to a secondary IP of the freedombox (router hosts file or routing table entry) might even make the dyndns configuration on the freedomox _entirely_ obsolete.

It should be possible to simply reuse the domain and the specific URL of the router’s request (found in the logs) for forwarding the request to the actual public dyndns service. But the redirection on the router would have to be only in effect for its locally originating request (packages), not for those triggered and originating from the freedombox.

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [May 26, 2020, 9:21pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/68 "2020-05-26T21:21:21Z")

</div>

> [@homer77](#):
>
> adding the stun and turn SRV entry in DNS of my domain. I also observed that in our conversation we didn’t receive the avatars. And finally some minutes ago the Call-Symbol appeared

Your devices will only fetch the new records, after the TTL of the last dns info expired, so that would introduce some lag to expect there.

Does everything continue working?

---

<div class="post-metadata">

### Author: ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)
#### Post date: [May 27, 2020, 3:47pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/69 "2020-05-27T15:47:37Z")

</div>

It seems so. Still everything’s working as far as I observed.

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [May 27, 2020, 6:25pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/70 "2020-05-27T18:25:10Z")

</div>

Did you add the dns records to a second level domain name or to a dyndns subdomain?  
The former often have longer TTLs of several hours or even days.

As everything is still working, I congratulate!  
First to have made it to a really complete setup.

---

<div class="post-metadata">

### Author: ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)
#### Post date: [May 29, 2020, 11:47am UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/71 "2020-05-29T11:47:27Z")

</div>

second level.

Thank you 🙂

I try not to party too soon.  
But as I called my friend on a daily bases for the last week with different device and network setups each I guess I can start to claim this 😄

---

<div class="post-metadata">

### Author: ![MikaelB](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@MikaelB](https://discuss.freedombox.org/u/MikaelB)
#### Post date: [July 29, 2020, 6:04am UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/72 "2020-07-29T06:04:58Z")

</div>

could it be possible to prevent the /etc/matrix-synapse/homeserver.yaml file from being overwritten for updates when using the Coturn server?

---

<div class="post-metadata">

### Author: ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)
#### Post date: [October 13, 2020, 10:12am UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/73 "2020-10-13T10:12:50Z")

</div>

Yeah. Or at least have a way to turn overwriting off for the personal use case.

As I let my FB update/upgrade automatically I am regularly suprised by a non-working VoIP with both Matrix and XMPP when that happens.

---

<div class="post-metadata">

### Author: ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)
#### Post date: [October 13, 2020, 5:10pm UTC](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832/74 "2020-10-13T17:10:26Z")

</div>

FreedomBox no longer touch Matrix Synapse’s homerserver.yaml file. As of previous release, we have reset it to its original state (to allow smooth upgrade) and will never touch again. FreedomBox has a separate file in conf.d where configuration will be edited. Users are also advised to create their own configuration file in conf.d instead of editing homeserver.yaml. Note that only top level configuration keys can be overridden.

[Previous page](https://discuss.freedombox.org/t/building-configuring-a-turn-server/832.md?page=3)
