Setup Teamspeak 3 Server on Linux
A quick guide to setup Teamspeak 3 server on Ubuntu 16.04, Ubuntu 14.04, CentOS 6, CentOS 7, Debian 7 & Debian 8.
Introduction
A Teamspeak server is a piece of VoIP software which allows users to communicate with each other via speech. Teamspeak consists of two applications: a client and a server.
The client application is the program that you use on your computer to log into teamspeak. It can be downloaded from the download page on the official website. Download the client for the operating system that you are using.
The server application is the application that brings each client together. It is in charge of processing the VoIP data and handling messages between you and your friends.
This guide will explain the basics of setting up a TeamSpeak 3 server on Linux (Debian, CentOS & Ubuntu Distributions).
Prerequisites
A VPS running Ubuntu / Debian / CentOS.
Teamspeak client software installed on your computer.
An initial server setup for:
CentOS
Debian
Step 1 - Adding User For Teamspeak 3 Server
First, create a new user with your desired name, we will use the name "teamspeak" for this guide.
Ubuntu / Debian
CentOS
Step 2 - Downloading Latest Version of Teamspeak 3 Server
Get the latest TeamSpeak 3 server files for 64-bit Linux. Check their website, a new version may be available for all the distributions.
Step 3 - Extracting the tar.bz2
Extract the archive for all the distributions.
This will create a new folder in the root directory called: teamspeak3-server_linux_amd64
Step 4 - Moving the Files to Home Directory of Teamspeak
Move the extracted files to the teamspeak
user's home directory then remove the extracted folder and downloaded archive.
Accept the license agreement:
Step 5 - Setting up Ownership for user Teamspeak
Change ownership of the TeamSpeak 3 server files.
Step 6 - Setting up start script
Ubuntu 16.04 / Debian 8 / CentOS 7 or Higher
Make the TeamSpeak 3 server start on boot. Use your favorite editor to make a new file called teamspeak.service
in /lib/systemd/system/
.
Paste this content into it:
Once you are done, save the file and close the editor. Now we will activate the script so that it will start on boot.
This makes to systemd recognize the file we just created.
Enable the service.
Start the TeamSpeak server.
Once you've started the server, you can check that it's running with this command.
Ubuntu 14.04 / Debian 7 or Lower
Make Teamspeak3 start on boot up. For this, we will need to create a symlink to the script which was included in the archive that we downloaded earlier.
Now all that is left to do is to start your Teamspeak server!
On your terminal, you will see a screen with the query username/password and a privilege key - be sure to write this information down as you will need it to administer your server.
CentOS 6 or Lower
Now we need to create the script in the /etc/init.d folder:
Once you are in the file paste the following code into the file by right clicking the mouse.
Click Ctrl + O to save the file then Ctrl + X to exit the file. We can then set the file permission so it will work properly.
Now we need to add the service so it will restart when the server is restarted. Enter the following commands and then restart the server.
Once the server restarts connect to teamspeak and make sure everything restarted. You can also check the status through command line by using the following command.
Step 7 - Retrieving Privilege Key
When you first try to connect to your TeamSpeak server, you may be prompted to use a privilege key. This privilege key allows to administrate your TeamSpeak server. To get this privilege key, use the following command:
At bottom you'll see something that looks like this:
Replace the stars with your unique token, and enter it into your TeamSpeak client. You'll see a prompt telling you that the privilege key was successfully used.
Optional: Firewall
If you are using the built-in firewall that was included with the Ubuntu installation then iptables
is your firewall. You may need to forward the following ports to allow connections to your TeamSpeak 3 Server.
Conclusion
Congratulations! You've successfully created a Teamspeak Server. You can connect to it with the Teamspeak Client.
Have fun!
Last updated