How To Install coturn on Debian 11

In this tutorial we learn how to install coturn on Debian 11. coturn is TURN and STUN server for VoIP

Introduction

In this tutorial we learn how to install coturn on Debian 11.

What is coturn

coturn is:

STUN (Session Traversal Utilities for NAT) and TURN (Traversal Using Relays around NAT) are protocols that can be used to provide NAT traversal for VoIP and WebRTC. This package provides a VoIP media traffic NAT traversal server and gateway.

Supported RFCs: TURN specs:

STUN specs:

  • RFC 3489 - obsolete “classic” STUN specs;
  • RFC 5389 - base “new” STUN specs;
  • RFC 5769 - test vectors for STUN protocol testing;
  • RFC 5780 - NAT behavior discovery support.

The implementation fully supports UDP, TCP, TLS, and DTLS as protocols between the TURN client and the TURN server. Both UDP and TCP relaying are supported.

SQLite, MySQL, PostgreSQL and Redis are supported for the user repository (if authentication is required). The long-term credentials mechanism is supported. For WebRTC applications, the TURN server REST API for time-limited secret-based authentication is implemented. The third-party authentication specs (OAuth-based) are supported, too.

Load balancing can be implemented either by DNS round-robin mechanism, or with the external networking tools, or by the built-in ALTERNATE-SERVER mechanism.

The implementation is intended to be simple to install and configure. The project focuses on performance, scalability, and simplicity. The aim is to provide an enterprise-grade TURN solution.

There are three methods to install coturn on Debian 11. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install coturn Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install coturn using apt-get by running the following command:

sudo apt-get -y install coturn

Install coturn Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install coturn using apt by running the following command:

sudo apt -y install coturn

Install coturn Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install coturn using aptitude by running the following command:

sudo aptitude -y install coturn

How To Uninstall coturn on Debian 11

To uninstall only the coturn package we can use the following command:

sudo apt-get remove coturn

Uninstall coturn And Its Dependencies

To uninstall coturn and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove coturn

Remove coturn Configurations and Data

To remove coturn configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge coturn

Remove coturn configuration, data, and all of its dependencies

We can use the following command to remove coturn configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge coturn

Dependencies

coturn have the following dependencies:

References

Summary

In this tutorial we learn how to install coturn package on Debian 11 using different package management tools: apt, apt-get and aptitude.