Disclaimer: This is a copy of How to install Coturn (TURN / STUN Server) in Ubuntu 22.04 via PPA | UbuntuHandbook
Ubuntu 22.04 misses coturn TURN and STUN server package in its system repository. Here’s how to install it via PPA.
Coturn is a free open source implementation of TURN and STUN Server, which can be used as either a VoIP media traffic NAT traversal server and gateway, or general-purpose network traffic TURN server and gateway.
The software package is available in all current Ubuntu releases, exclude Ubuntu 22.04! The reason that the new LTS exclude the package might be a compile issue due to OpenSSL 3.0 does no longer has FIPS 140 mode.
When you try installing the package in terminal, it will output that “E: Package ‘coturn’ has no installation candidate“.
Ubuntu 22.10 development branch has added a patch to fix build the package against OpenSSL 3.0, and here’s an unofficial backport for Ubuntu 22.04 via PPA repository.
NOTE: I’m NOT sure if it’s the real reason that Ubuntu 22.04 exclude the package in its repository. Use the PPA package in your own risk!
1. Add the PPA
The PPA provides the coturn packages for amd64, arm64/armhf, ppc64el, and s390x CPU architectures for Ubuntu 22.04 and its based systems.
To get started, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to add the PPA:
sudo add-apt-repository ppa:ubuntuhandbook1/coturn
Type user password for sudo authentication and hit Enter to continue.
2. Update cache
It should automatically refresh system package cache while adding PPA. If not, run the command below to do it manually:
sudo apt update
3. Install Coturn
Finally, install the software package by running command in terminal:
sudo apt install coturn
How to Uninstall Coturn
For any issue about the TURN server packages, run the command below to remove it from your system:
sudo apt remove --autoremove coturn
And, remove the Ubuntu PPA using command:
sudo add-apt-repository --remove ppa:ubuntuhandbook1/coturn