How to Install Teamspeak 3 Server on Debian 9 Stretch
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 AleForge VPS.
Prerequisites
Section titled “Prerequisites”- A VPS running Debian 9 Stretch from AleForge.
Instructions
Section titled “Instructions”First, create a new user with your desired name, we will use the name “teamspeak” for this guide.
adduser --disabled-login teamspeakSwitch to the new user.
su teamspeakGet 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.bz2Extract the archive.
tar xvf teamspeak3-server_linux_amd64-3.1.1.tar.bz2This 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.bz2In 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 Termsnano LICENSE# Creation of the acceptance filetouch .ts3server_license_acceptedWe 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/teamspeakPopulate 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" instart)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}" >&2exit 1;;esacexit 0Once you are done, save the file and close the editor.
Make it executable and add it to the service.
chmod +x /etc/init.d/teamspeakupdate-rc.d teamspeak defaultsList 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
Section titled “Optional: Firewall”Forward the following ports to allow connections to your TeamSpeak 3 Server.
iptables -A INPUT -p udp --dport 9987 -j ACCEPTiptables -A INPUT -p udp --sport 9987 -j ACCEPTiptables -A INPUT -p tcp --dport 30033 -j ACCEPTiptables -A INPUT -p tcp --sport 30033 -j ACCEPTiptables -A INPUT -p tcp --dport 10011 -j ACCEPTiptables -A INPUT -p tcp --sport 10011 -j ACCEPT