Skip to content

Installing a TeamSpeak 3 Server on Linux.

This post is machine-translated.

Warning

This is a historical guide from 2010. It is outdated: the TeamSpeak Server versions, download links, init scripts, system commands and configuration recommendations have changed since then. If you need a TeamSpeak Server, find an up-to-date guide for your operating system and the current server version.

Note

Instead of TeamSpeak I recommend using the free software Mumble.

My loose translation of one short manual on setting up your own TeamSpeak server. First you need to add the teamspeak user; to do that, run the following command as the superuser:

adduser --disabled-login teamspeak

Now you need to download the archive with the program (64-bit in my case)

wget http://ftp.4players.de/pub/hosted/ts3/r ... a22.tar.gz

(Check whether a newer version has been released) unpack it

tar xzf teamspeak3-server_linux-amd64-3.0.0-beta22.tar.gz

Move it to the right place

mv teamspeak3-server_linux-amd64 /opt/ts3

And give the teamspeak user permissions on the directory

chown -R teamspeak /opt/ts3

If you look inside /opt/ts3 you will see that start and stop scripts already exist (ts3server_startscript.sh), and those are exactly what we’ll use. Let’s create a file in init.d by entering the following command and typing in this text:

cat > /etc/init.d/teamspeak

The text:

#!/bin/sh
### BEGIN INIT INFO
# Provides: teamspeak
# Required-Start: networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: TeamSpeak Server Daemon
# Description: Starts/Stops/Restarts the TeamSpeak Server Daemon
### END INIT INFO
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="TeamSpeak Server"
NAME=teamspeak
USER=teamspeak
DIR=/opt/ts3
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
cd $DIR
sudo -u teamspeak ./ts3server_startscript.sh $1

Now press ENTER and CTRL-D and the text will be written to the file. Let’s set the permissions on it

chmod 755 /etc/init.d/teamspeak

Everything is ready. Try running the script

/etc/init.d/teamspeak start

Be sure to remember the login, password and token — you will need them to authenticate as the administrator on the server. You can find the logs in /opt/ts3/logs/. All that’s left to do is make sure the script runs at system startup. You can add it there with the command:

update-rc.d teamspeak defaults

If your system has a firewall — make sure the TeamSpeak ports are open. To see which ports Teamspeak uses, run the command:

netstat -lnp | grep ts3
tcp 0 0 0.0.0.0:10011 0.0.0.0: * LISTEN 30232/ts3server_lin
tcp 0 0 0.0.0.0:30033 0.0.0.0: * LISTEN 30232/ts3server_lin
udp 0 0 0.0.0.0:9987 0.0.0.0: * 30232/ts3server_lin

I’ll add on my own behalf that the guide doesn’t quite match the current state of things, and I didn’t follow it exactly myself when installing.

via Original post