In this tutorial we will show you how to install TeamSpeak Server on Ubuntu 16.04. We will also install and configure its prerequisites. TeamSpeak is a voice over internet protocol (VoIP) software that allows users to communicate with one another over the internet. It is often utilized in computer gaming, but it is also utilized in the company and for overall communication between family and friends.
I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 16.04 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.
Install TeamSpeak Server on Ubuntu 16.04
Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:
apt-get update -y apt-get upgrade -y
Step 2. Create a new system user.
Create a new user with your desired name, we will use the name “chedelics” for this guide:
adduser --disabled-login chedelics Adding new group `teamspeak' (1000) ... Adding new user `teamspeak' (1000) with group `teamspeak' ... Creating home directory `/home/teamspeak' ... Copying files from `/etc/skel' ... Changing the user information for teamspeak Enter the new value, or press ENTER for the default Full Name : Room Number : Work Phone : Home Phone : Other : Is the information correct? [Y/n]
Step 3. Installing TeamSpeak.
First, download the latest TeamSpeak 3 server files for 64-bit Linux. Check their website, a new version may be available:
Once it is downloaded, unpack the archive:
tar xvf teamspeak3-server_linux_amd64-126.96.36.199.tar.bz2 cd teamspeak3-server_linux_amd64 cp * -R /home/teamspeak cd .. rm -rf teamspeak3-server_linux_amd64*
Change ownership of the TeamSpeak server files:
chown -R teamspeak:teamspeak /home/teamspeak
Make the TeamSpeak server start on boot:
Copy the following content into the startup script file:
[Unit] Description=Team Speak 3 Server After=network.target
[Service] WorkingDirectory=/home/teamspeak/ User=teamspeak Group=teamspeak Type=forking ExecStart=/home/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini ExecStop=/home/teamspeak/ts3server_startscript.sh stop PIDFile=/home/teamspeak/ts3server.pid RestartSec=15 Restart=always
Once you are done, save the file and close the editor. Now we will activate the script so that it will start on boot:
systemctl --system daemon-reload systemctl start teamspeak.service systemctl enable teamspeak.service
Step 4. Configure Firewall for TeamSpeak.
You may need to forward the following ports to allow connections to your TeamSpeak Server:
iptables -A INPUT -p udp --dport 9987 -j ACCEPT iptables -A INPUT -p udp --sport 9987 -j ACCEPT iptables -A INPUT -p tcp --dport 30033 -j ACCEPT iptables -A INPUT -p tcp --sport 30033 -j ACCEPT iptables -A INPUT -p tcp --dport 10011 -j ACCEPT iptables -A INPUT -p tcp --sport 10011 -j ACCEPT
Congratulation’s! You have successfully install and configured TeamSpeak Server on your Ubuntu 16.04 server. Thanks for using this tutorial installing TeamSpeak VoIP on Ubuntu 16.04 LTS (Xenial Xerus) system.