Knowledgebase

How to Install Teamspeak 3 Server on Debian 9 Stretch Print

  • 0

TeamSpeak is the software you need to chat online with multiple people at the same time. It is perfect for those who play on a network and need to transmit live information. With TeamSpeak, it is possible to chat in real time online. Codecs help reduce latency during communication and improve voice quality. It is perfect for online players to send instructions or information to others.

In this guide, I will show you on how to install TeamSpeak 3 Server on your Debian 9 Stretch RCS VPS.

Prerequisites

  • A VPS running Debian 9 Stretch from RCS.

Instructions

First, create a new user with your desired name, we will use the name "teamspeak" for this guide.

adduser --disabled-login teamspeak

Switch to the new user.

su teamspeak

Get the latest TeamSpeak 3 server files for 64-bit Linux.

wget http://dl.4players.de/ts/releases/3.1.1/teamspeak3-server_linux_amd64-3.1.1.tar.bz2

Extract the archive.

tar xvf teamspeak3-server_linux_amd64-3.1.1.tar.bz2

This will create a new folder in the root directory called teamspeak3-server_linux_amd64

Remove the downloaded archive.

rm teamspeak3-server_linux_amd64-3.1.1.tar.bz2

In the extracted folder, we have the conditions for using Teamspeak servers. It will be necessary to accept them by creating a file before starting the server.

cd teamspeak3-server_linux_amd64

# Reading the Terms

nano LICENSE

# Creation of the acceptance file

touch .ts3server_license_accepted

We will now start our server for the first time. At the first start of the server, we will have access to very important information, which will allow you to administer your server. It will therefore be necessary to note the connection information of the Admin Server and the Token.

sh ts3server_startscript.sh start



------------------------------------------------------------------

                      I M P O R T A N T                           

------------------------------------------------------------------

               Server Query Admin Account created                 

         loginname= "serveradmin", password= "xxxxxxxx"

------------------------------------------------------------------



------------------------------------------------------------------

                      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=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

------------------------------------------------------------------

Make the TeamSpeak 3 server start on boot. Use your favorite editor to make a new file called teamspeak in /etc/init.d/.

nano /etc/init.d/teamspeak

Populate it with this content.

#!/bin/sh

### BEGIN INIT INFO

# Provides:         teamspeak

# Required-Start:   $local_fs $network

# Required-Stop:    $local_fs $network

# Default-Start:    2 3 4 5

# Default-Stop:     0 1 6

# Description:      Teamspeak 3 Server

### END INIT INFO



######################################

# Customize values for your needs: "User"; "DIR"



USER="teamspeak"

DIR="/opt/teamspeak3/server"



###### Teamspeak 3 server start/stop script ######



case "$1" in

start)

su $USER -c "${DIR}/ts3server_startscript.sh start"

;;

stop)

su $USER -c "${DIR}/ts3server_startscript.sh stop"

;;

restart)

su $USER -c "${DIR}/ts3server_startscript.sh restart"

;;

status)

su $USER -c "${DIR}/ts3server_startscript.sh status"

;;

*)

echo "Usage: {start|stop|restart|status}" >&2

exit 1

;;

esac

exit 0

Once you are done, save the file and close the editor.

Make it executable and add it to the service.

chmod +x /etc/init.d/teamspeak

update-rc.d teamspeak defaults

List of possible commands:

  • Start the server:

    service teamspeak start
    
  • Stop the server:

    service teamspeak stop
    
  • Restart the server:

    service teamspeak restart
    
  • Server status:

    service teamspeak status
    

Optional: Firewall

Forward the following ports to allow connections to your TeamSpeak 3 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

Was this answer helpful?
Back

Powered by WHMCompleteSolution