Requirements

  • Linux operating system (In this case Ubuntu 15.04)
  • SSH client (e.g. https://www.putty.org/ 4)

Installation

Update your system:

apt-get update && apt-get upgrade

After that we create a user for Teamspeak and put the directory in /opt/

sudo useradd -d /opt/teamspeak3-server -m teamspeak3-user

If the command fails because sudo is not installed, run the following command:

apt-get install sudo

Now we download the current Teamspeak 3 version (https://teamspeak.com/en/downloads/ 4) at the time of this tutorial this is version 3.10.2 for 64 bit.

wget https://files.teamspeak-services.com/releases/server/3.10.2/teamspeak3-server_linux_amd64-3.10.2.tar.bz2

If the command fails because wget is not installed, execute the following command:

apt-get install wget

Now unpack the files:

sudo tar -zxvf teamspeak3-server_linux_amd64-3.10.2.tar.bz2

Now move the files to the right directory:

sudo mv teamspeak3-server_linux-amd64/* /opt/teamspeak3-server

Now set the correct permissions:

sudo chown teamspeak3-user:teamspeak3-user /opt/teamspeak3-server -R

Now delete the files you don't need anymore

sudo rm -fr teamspeak3-server_linux_amd64-3.10.2.tar.bz2 teamspeak3-server_linux-amd64

Now we create a Teamspeak 3 startup script. To do this, enter the following command:

sudo nano /etc/init.d/ts3

There you have to insert the following content:

#! /bin/sh
### BEGIN INIT INFO
# Provides: ts3
# default-start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TeamSpeak3 Server Agent
# Description: Start/Stop/Restart Ts3
### END INIT INFO

set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin
DESC="TeamSpeak3 Server"
NAME=teamspeak3-server
USER=teamspeak3-user
DIR=/opt/teamspeak3-server
OPTIONS=inifile=ts3server.ini
DAEMON=$DIR/ts3server_startscript.sh
#PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

sleep 2
sudo -u $USER $DAEMON $1 $OPTIONS


Now we set the permissions correctly again:

sudo chmod a+x /etc/init.d/ts3
sudo chmod a+x /opt/teamspeak3-server/ts3server_startscript.sh
sudo chmod a+x /opt/teamspeak3-server/ts3server_minimal_runscript.sh
sudo update-rc.d ts3 defaults

Now you can start your server using the following command:

sudo /etc/init.d/ts3 start