Learn how to host your own turn server!

Why do I need this? If you are in China or you only see black screens in monitoring, you may need this.

What is it? A TURN server helps devices communicate over the internet when direct connections are blocked by firewalls or NAT. It relays data between devices, ensuring smooth connections for apps like video calls or messaging.

Example Usage With Luxu Admin (After install)

šŸ“config/api.json

"custom_ice_servers": [
    {
            urls = "turn:37.100.40.100:3478",
            username = "luxu",
            credential = "gg",
     }
  ],

Cloudflare Turn Server (Free Option)

Open account in https://cloudflare.com and create a free turn server.

Documentation: https://developers.cloudflare.com/realtime/turn/

It will create an API KEY, which you must save securely.

Use this key to generate credentials. Add them to api.json

image.png

image.png

Manual self hosting

In this guide we will install Go lang and pion turn server

What is go? Go is a programming language.

Requirements: