How to Install Teamspeak Server in Ubuntu

To Install Teamspeak Server in Ubuntu

TeamSpeak is a voice over internet protocol (VoIP) software used in Linux systems. It allows the users to communicate with each others via internet. It is mainly designed for computer gaming, business and for general communications. This tutorial describes how to set up a TeamSpeak server in Ubuntu server system.


Installation of TeamSpeak Server

Initially, update the system packages with the following command.

root@linuxhelp:~# apt-get update
Hit:1 xenial InRelease
Get:2 xenial-updates InRelease [102 kB]
Get:3 xenial-security InRelease [102 kB]        
Get:4 xenial-backports InRelease [102 kB]                                     
Get:5 xenial-updates/main amd64 Packages [427 kB]    
Get:6 xenial-updates/main i386 Packages [421 kB]
Get:7 xenial-updates/main Translation-en [165 kB]
Get:8 xenial-updates/universe amd64 Packages [366 kB]                         
Get:9 xenial-updates/universe i386 Packages [362 kB]                          
Get:10 xenial-updates/universe Translation-en [132 kB]                        
Fetched 2,180 kB in 1min 23s (26.2 kB/s)                                                                          
Reading package lists... Done

Now create a new user to install and run the application.

root@linuxhelp:~# adduser --disabled-login teamspeak
Adding user `teamspeak' ...
Adding new group `teamspeak' (1001) ...
Adding new user `teamspeak' (1001) 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] y

Download the TeamSpeak server with the following command.

root@linuxhelp:~# wget
--2016-11-29 05:48:20--
Resolving (,,
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6670947 (6.4M) [application/x-bzip2]
Saving to: ‘teamspeak3-server_linux_amd64-’

teamspeak3-server_linux_amd6 100%[=============================================>]   6.36M   237KB/s    in 31s     

2016-11-29 05:48:52 (210 KB/s) - ‘teamspeak3-server_linux_amd64-’ saved [6670947/6670947]

Once the TeamSpeak is downloaded, extract it.

root@linuxhelp:~# tar xvf teamspeak3-server_linux_amd64- 
Immediately change directory as follows,

root@linuxhelp:~# cd teamspeak3-server_linux_amd64

Copy all the current working directory and then send it to the /home/teamspeak user.

root@linuxhelp:~/teamspeak3-server_linux_amd64# cp * -R /home/teamspeak

Then change the directory to /root.

root@linuxhelp:~/teamspeak3-server_linux_amd64# cd ..

Remove the extracted teamspeak3 directory.

root@linuxhelp:~# rm -rf teamspeak3-server_linux_amd64*

Change the ownership of /home/teamserver.

root@linuxhelp:~# chown -R teamspeak:teamspeak /home/teamspeak

Here you need to create a startup script to start the TeamSpeak server software automatically on boot. Create and open the file in your text editor.

root@linuxhelp:~# vim /lib/systemd/system/teamspeak.service
Copy the following content into the startup script file :
Description=Team Speak 3 Server
ExecStart=/home/teamspeak/ start inifile=ts3server.ini
ExecStop=/home/teamspeak/ stop

Start and enable the TeamSpeak server.

root@linuxhelp:~# systemctl --system daemon-reload
root@linuxhelp:~# systemctl start teamspeak.service
root@linuxhelp:~# systemctl enable teamspeak.service
Created symlink from /etc/systemd/system/ to /lib/systemd/system/teamspeak.service.

Execute the following command to configure the firewall for the following ports 9987 UDP, 10011 TCP and 30033 TCP.

root@linuxhelp:~# iptables -A INPUT -p udp --dport 9987 -j ACCEPT
root@linuxhelp:~# iptables -A INPUT -p udp --sport 9987 -j ACCEPT
root@linuxhelp:~# iptables -A INPUT -p tcp --dport 30033 -j ACCEPT
root@linuxhelp:~# iptables -A INPUT -p tcp --sport 30033 -j ACCEPT
root@linuxhelp:~# iptables -A INPUT -p tcp --dport 10011 -j ACCEPT
root@linuxhelp:~# iptables -A INPUT -p tcp --sport 10011 -j ACCEPT


To Manage TeamSpeak Server

Connect TeamSpeak server with the client software then you will be prompted to enter a privilege key for administrative access.

Note that this key can only be used one time.

root@linuxhelp:~# cat /home/teamspeak/logs/ts3server_*
2016-11-29 00:34:43.408194|INFO    |ServerLibPriv |   |TeamSpeak 3 Server (2016-04-25 15:16:45)
2016-11-29 00:34:43.408346|INFO    |ServerLibPriv |   |SystemInformation: Linux 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 Binary: 64bit
2016-11-29 00:34:43.408422|INFO    |ServerLibPriv |   |Using hardware aes
2016-11-29 00:34:43.438479|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 2, (c)TeamSpeak Systems GmbH
2016-11-29 00:34:43.438581|INFO    |DatabaseQuery |   |dbPlugin version: 3.8.6
2016-11-29 00:34:43.509640|INFO    |DatabaseQuery |   |checking database integrity (may take a while)
2016-11-29 00:34:43.599370|INFO    |SQL           |   |db_CreateTables() tables created
2016-11-29 00:34:43.806363|WARNING |Accounting    |   |Unable to find valid license key, falling back to limited functionality
2016-11-29 00:34:45.724291|INFO    |              |   |Puzzle precompute time: 1821
2016-11-29 00:34:45.736628|INFO    |FileManager   |   |listening on
2016-11-29 00:34:45.737717|INFO    |VirtualSvrMgr |   |executing monthly interval
2016-11-29 00:34:45.738312|INFO    |VirtualSvrMgr |   |reset virtualserver traffic statistics
2016-11-29 00:34:45.913675|INFO    |CIDRManager   |   |updated query_ip_whitelist ips:, 
2016-11-29 00:34:45.914196|INFO    |Query         |   |listening on
2016-11-29 00:34:45.909461|INFO    |VirtualServer |1  |listening on
2016-11-29 00:34:45.910329|INFO    |VirtualServer |1  |client 'server'(id:0) added privilege key for servergroup 'Server Admin'(id:6)
2016-11-29 00:34:45.910364|WARNING |VirtualServer |1  |--------------------------------------------------------
2016-11-29 00:34:45.910380|WARNING |VirtualServer |1  |ServerAdmin privilege key created, please use the line below
2016-11-29 00:34:45.910394|WARNING |VirtualServer |1  |token=mwrxLf4OOHRLbwV0RiENaXqsBc3nRdvU4UfgxU4c
2016-11-29 00:34:45.910408|WARNING |VirtualServer |1  |--------------------------------------------------------

What you are looking for here is the token. Copy and paste it into your TeamSpeak client. If everything is successful, you will get this message:

ServerAdmin privilege key created

Your newly-connected user will then be granted full administrative rights over your TeamSpeak server.

Thank you! for using Linux Help.

You find this tutorial helpful? Share with your friends to keep it alive.
For more help topics browse our website
Be the first to comment, we value your suggestions. For further queries please comment below.

Tags: Teamspeak
user image Author :  Mason