Categories
CentOS Linux Server Teamspeak 3

Teamspeak 3 Server on CentOS 7

You’ll be surprised when you see how easy it is to setup a Teamspeak 3 server.

Table of contents

  1. Creating a specific user
  2. Downloading Teamspeak 3 server
  3. Setting up the server
  4. Configuring the firewall
  5. Finishing

1 Creating a specific user

First we will create a user for the Teamspeak 3 server. Of course this is just a recommendation, you can use any user you would like to.

2 Downloading Teamspeak 3 server

After creating and logging in as the user we will download Teamspeak 3.

Go to Teamspeak and download the latest server for Linux, preferably 64-bit. At the time of writing the latest version was 3.0.11.3, so you might want to replace those values for future releases. I additionally rename the folder so I can always see which one is my current installation.

3 Setting up the server

Go to the Teamspeak 3 directory and initialize the server.

You will get to see some server output which is partially very important!

——————————————————————
I M P O R T A N T
——————————————————————
Server Query Admin Account created
loginname= “serveradmin”, password= “DRGE1uHG”
——————————————————————

——————————————————————
I M P O R T A N T
——————————————————————
ServerAdmin privilege key created, please use it to gain
serveradmin rights for your virtualserver. please
also check the doc/privilegekey_guide.txt for details.

token=w+cyh2W4JcA2n7nuIIH2xVpA5JZb17BtuiouxRmr
——————————————————————

You can stop the server by pressing CTRL + c.

I replaced the not so important parts with three dots.

On the one hand you have the server query admin account details and on the other hand a token you have to use to gain serveradmin rights when you – later – logged onto the server.

Additionally we will create an inifile to store some settings for the server.

The content of the ts3server.ini is as follows.

Here you can also adjust the ports to your specific needs but I will stick to the essential settings, namely the IPs the server is meant to listen on.

We will change voice_ip, filetransfer_ip and query_ip to the actual IP of the interface.

Next step is to tell the server to actually include the inifile. We do this by changing the ts3server_startscript.sh. Comment out line 5 and add the following, so that the first few lines look like this.

You can now start, stop or restart the server with the folloing commands.

4 Configuring the firewall

To be able to connect to the server we need to allow some ports on the firewall. For maximum flexibility I do recommend creating a new firewall configuration file for voice, filetransfer and query each.

  1. Firewall configuration file for voice

  2. Firewall configuration file for filetransfer

  3. Firewall configuration file for query

Now that we created the configuration files we need to add them to the firewall.

5 Finishing

When you connect to your brand new server you will be asked to enter the token which was display when we initialized the server. As you do so you will be the Server Admin.

This is now a working Teamspeak 3 server. But to make it more secure you do need to add some groups and give them the required or specifig rights.

6 replies on “Teamspeak 3 Server on CentOS 7”

Hello, I apologize in advance for my English.
I installed TS3 according to directions, but can not connect from another PC besides lokalu.
Please advice what was repeated.

# firewall-cmd –list-all
public (default, active)
interfaces: enp0s3
sources:
services: dhcpv6-client ssh ts3voice
ports: 9830/tcp 389/tcp 636/tcp
masquerade: no
forward-ports:
icmp-blocks:
rich rules:

# nano /etc/firewalld/services/ts3voice.xml

ts3voice
Teamspeak 3 is a software that allows users to talk with each ot$

#nano /home/ts3/teamspeak3-server/ts3server.ini
machine_id=
default_voice_port=9999
voice_ip=0.0.0.0
licensepath=
filetransfer_port=30033
filetransfer_ip=0.0.0.0
query_port=10011
query_ip=0.0.0.0
query_ip_whitelist=query_ip_whitelist.txt
query_ip_blacklist=query_ip_blacklist.txt
dbplugin=ts3db_sqlite3
dbpluginparameter=
dbsqlpath=sql/
dbsqlcreatepath=create_sqlite/
dbconnections=10
logpath=logs
logquerycommands=0
dbclientkeepdays=30
logappend=0

# service teamspeak status
Server is running

Unfortunately some of your details seem to be incomplete. It looks like you changed the default voice port of Teamspeak to 9999 – did you also change your firewall rule? Please bear in mind that after changing the firewall rules file you might have to run
sudo firewall-cmd --reload

Yes, I set the port 9999, because I will migrate from Windows to Linux. So on ports 9987-9989 runs the other TS.
I rebooted the firewall
PS .: Thanks for the quick reply

i should insert my public ip, after i get static ip right?
i need port fordwarding on router?

Hi Bluburro7

Assuming you are running the server behind NAT (most likely at home) yes you do need portforwarding.
In this case you should insert the private IP address.
You will then have to forward all connections destined to your public ip with port A to the private IP address of your Teamspeak server and port B (where A and B can be just the same).

If you are not using NAT you have to enter the public IP address.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.