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

VPS Hosting
VPS hosting at un­beat­able prices on Dell En­ter­prise Servers
  • 1 Gbit/s bandwidth & unlimited traffic
  • Minimum 99.99% uptime & ISO-certified data centres
  • 24/7 premium support with a personal con­sult­ant

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­nic­a­tion. In these situ­ations, the TURN server routes all traffic through itself instead of allowing a direct con­nec­tion. It operates at the ap­plic­a­tion layer and ensures that data still reaches its des­tin­a­tion reliably.

The server assigns a public relay address and port to a client. Other par­ti­cipants 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­nic­a­tion. While TURN requires more resources than direct con­nec­tions, it sig­ni­fic­antly improves con­nec­tion re­li­ab­il­ity. That’s why it plays a key role in pro­fes­sion­al com­mu­nic­a­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­strict­ive 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­tic­ates, typically using temporary cre­den­tials.
  2. After logging in, the client requests an al­loc­a­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­ti­cipant.
  3. Both endpoints send their data to the TURN server instead of com­mu­nic­at­ing directly. The server acts as an in­ter­me­di­ary, receiving data and for­ward­ing it to the other par­ti­cipant.

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­nic­a­tion can also run over TLS, which is useful in re­stric­ted corporate en­vir­on­ments where encrypted traffic is required.

A TURN server keeps track of sessions, mappings, and timeouts to manage resources ef­fi­ciently 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­nic­a­tion even in chal­len­ging network con­di­tions.

When do you need a TURN server?

TURN servers are mainly used in real-time com­mu­nic­a­tion scenarios, including video con­fer­en­cing tools, VoIP (voice over IP) services, online gaming and WebRTC-based ap­plic­a­tions.

A TURN server becomes essential when users are behind re­strict­ive firewalls or NAT con­fig­ur­a­tions. Without TURN, con­nec­tions may fail or drop un­ex­pec­tedly. This is es­pe­cially common in corporate networks, where strict security rules often block direct com­mu­nic­a­tion. In these en­vir­on­ments, TURN helps ensure reliable con­nectiv­ity. De­velopers 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­ti­cipants. 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­ised 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­form­ance, pre­dict­able 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­cessing 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­ciently there.

You also get full control over firewall and network settings, which makes it easier to open specific ports or fine-tune NAT behaviour. Compared to shared hosting, VPS solutions offer better per­form­ance, more pre­dict­able resources and greater re­li­ab­il­ity. For small to medium-sized setups, a well-con­figured 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, we'll fully reimburse you.

Reviewer

Go to Main Menu