A TURN server helps two devices com­mu­ni­cate when they can’t connect directly due to firewalls or NAT routers. It’s commonly used in real-time ap­pli­ca­tions like video calls and online com­mu­ni­ca­tion tools.

VPS Hosting (Virtual Private Servers)
World-class VPS at America’s lowest price
  • Save 50% or more vs leading hosts
  • Unlimited traffic & no setup fees 
  • 99.99% uptime guar­an­teed
  • Free 24/7 premium support 

What is a TURN server?

A TURN server (Traversal Using Relays around NAT) is a network service that relays data between two endpoints when a direct con­nec­tion isn’t possible. This usually happens when strict firewalls or complex NAT setups block peer-to-peer com­mu­ni­ca­tion. In these sit­u­a­tions, the TURN server routes all traffic through itself instead of allowing a direct con­nec­tion. It operates at the ap­pli­ca­tion layer and ensures that data still reaches its des­ti­na­tion reliably.

The server assigns a public relay address and port to a client. Other par­tic­i­pants send their data to this address, and the TURN server forwards it to the intended recipient. TURN works with standard transport protocols like UDP and TCP and is closely tied to real-time com­mu­ni­ca­tion. While TURN requires more resources than direct con­nec­tions, it sig­nif­i­cant­ly improves con­nec­tion re­li­a­bil­i­ty. That’s why it plays a key role in pro­fes­sion­al com­mu­ni­ca­tion systems.

Note

In many setups, a STUN server is used first. It helps devices determine their public IP address and port mapping so they can try to establish a direct peer-to-peer con­nec­tion. If a direct con­nec­tion fails due to re­stric­tive firewalls or certain NAT types, the TURN server steps in and relays all traffic between the endpoints.

How does a TURN server work?

You can think of a TURN server as a relay point that connects two devices when they can’t reach each other directly:

  1. First the client connects to the TURN server and au­then­ti­cates, typically using temporary cre­den­tials.
  2. After logging in, the client requests an al­lo­ca­tion. The TURN server assigns a public relay address and port that can receive incoming data. The client shares this relay address with the other par­tic­i­pant.
  3. Both endpoints send their data to the TURN server instead of com­mu­ni­cat­ing directly. The server acts as an in­ter­me­di­ary, receiving data and for­ward­ing it to the other par­tic­i­pant.

This process works for both incoming and outgoing traffic and bypasses NAT and firewall re­stric­tions. TURN is defined in RFC 8656 and supports multiple transport protocols such as UDP and TCP. If needed, com­mu­ni­ca­tion can also run over TLS, which is useful in re­strict­ed corporate en­vi­ron­ments where encrypted traffic is required.

A TURN server keeps track of sessions, mappings, and timeouts to manage resources ef­fi­cient­ly and prevent misuse. Since all data passes through the TURN server, latency increases and bandwidth usage is higher. However, this trade-off ensures stable com­mu­ni­ca­tion even in chal­leng­ing network con­di­tions.

When do you need a TURN server?

TURN servers are mainly used in real-time com­mu­ni­ca­tion scenarios, including video con­fer­enc­ing tools, VoIP (voice over IP) services, online gaming and WebRTC-based ap­pli­ca­tions.

A TURN server becomes essential when users are behind re­stric­tive firewalls or NAT con­fig­u­ra­tions. Without TURN, con­nec­tions may fail or drop un­ex­pect­ed­ly. This is es­pe­cial­ly common in corporate networks, where strict security rules often block direct com­mu­ni­ca­tion. In these en­vi­ron­ments, TURN helps ensure reliable con­nec­tiv­i­ty. De­vel­op­ers also rely on TURN to improve fault tolerance.

Note

One example use of a TURN server is Nextcloud Talk. Nextcloud Talk’s audio and video features rely on WebRTC and require stable con­nec­tions between par­tic­i­pants. When users are in different networks or behind firewalls, a TURN server ensures calls remain stable.

What hardware do you need for a TURN server?

You don’t need spe­cial­ized hardware to run a TURN server, but you do need the right balance of resources. Many setups use VPS servers (Virtual Private Servers) because they offer strong per­for­mance, pre­dictable costs, and flexible scaling options. A VPS provides dedicated resources such as CPU cores, RAM, and guar­an­teed bandwidth, which are essential for running a TURN server reliably:

  • The CPU handles tasks like for­ward­ing data packets, managing sessions, and, if needed, pro­cess­ing en­cryp­tion.
  • Enough RAM ensures the server can handle multiple con­nec­tions at the same time and keep track of their state.
  • The network interface is critical since all media traffic flows through the TURN server and can quickly add up to high data through­put.

A fast, stable con­nec­tion with low latency has a direct impact on audio and video quality. As your user base grows, you can easily scale a VPS by adding more CPU power, RAM or bandwidth. Another advantage is the freedom to choose your own operating system. In practice, TURN software usually runs on Linux, as it tends to run more ef­fi­cient­ly there.

You also get full control over firewall and network settings, which makes it easier to open specific ports or fine-tune NAT behavior. Compared to shared hosting, VPS solutions offer better per­for­mance, more pre­dictable resources and greater re­li­a­bil­i­ty. For small to medium-sized setups, a well-con­fig­ured VPS is often all you need.

Free VPS Trial
Try a virtual server risk-free for 30 days

Try out your VPS for 30 days. If you're not satisfied, you get your money back.

Reviewer

Go to Main Menu