TeamSpeak 3 Server

Why is TeamSpeak 3 not listed in Pakfire as an available addon?

Unfortunately the TeamSpeak 3 License does not enable us to offer TeamSpeak 3 as an Addon. However, it is free for any user to install TeamSpeak 3, as long as the license is not violated by doing so!

Installation

TeamSpeak 3 Binary

First, you have to download the TeamSpeak 3 server binary with the following command lines.

cd /tmp
wget http://ftp.4players.de/pub/hosted/ts3/releases/3.0.7.2/teamspeak3-server_linux-x86-3.0.7.2.tar.gz


This URL can become outdated causing a 404 ERROR at this step. To find the latest URL visit teamspeak.com brows to downloads find the 32 Bit linux server and hit download. A link should appear after their survey and then it will start downloading. Stop the download and just substitute the link in the above code.

Unzip the package as follows:

tar xfvz teamspeak3-server_linux-x86-3.0.7.2.tar.gz

and move it to the right place.

mv teamspeak3-server_linux-x86 /opt/teamspeak3

The package can then be deleted.

rm teamspeak3-server_linux-x86-3.0.7.2.tar.gz

TeamSpeak 3 users

TeamSpeak 3 should not be run as root, so you must create an extra TeamSpeak 3 user and a user password will be awarded.

groupadd teamspeak3
useradd teamspeak3 -g teamspeak3 -d /opt/teamspeak3 -s /bin/bash
passwd teamspeak3

File permissions

To allow the user teamspeak3" to use the files of the TeamSpeak 3 server, the file permissions must be adjusted.

chown -R teamspeak3:teamspeak3 /opt/teamspeak3

When a license is not being used, Teamspeak has implemented a process that checks a shared space in memory. If more than one server running on that machine or in this case that space does not exist it stops and kicks the ERROR. To Fix this we simply mount the needed space

mount -t tmpfs tmpfs /dev/shm

Unfortunately, after each restart the file permissions fordev/shm are set incorrectly.

Edit

/etc/fstab

and append the following line.

shm /dev/shm tmpfs defaults,size=256M 0 0

First start of the TeamSpeak 3 server

Now the TeamSpeak 3 server needs to be started once by hand, log in to the user teamspeak3".

login teamspeak3

To start the TeamSpeak 3 server type

./ts3server_startscript.sh start


The output from this will contain IMPORTANT information.

If all goes well, two messages will be displayed.

`------------------------------------------------------------------`
`                      I M P O R T A N T`
`------------------------------------------------------------------`
`             Server Query Admin Acccount created`
`         loginname= "serveradmin", password= "fDprQFjv"`
`------------------------------------------------------------------`


`------------------------------------------------------------------`
`                      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/token_guide.txt for details.`

`       token=Drp5gFCr80GGFUfWrDSnun8Ugfq9+lblZ6x1aMHW`
`------------------------------------------------------------------`

The password and the token should be stored someplace safe.

The TeamSpeak 3 server will be stopped with

./ts3server_startscript.sh stop

and with a

exit

the user will log out again.

Integration in IPFire

The TeamSpeak 3 server can also be integrated into IPFire like an Addon. First, a init script must be created

touch /etc/init.d/teamspeak3
vi /etc/init.d/teamspeak3

and add the following to the script.

!/bin/sh

Begin $rc_base/init.d/teamspeak3

. /etc/sysconfig/rc
. $rc_functions

case "$1" in
start)
cd /opt/teamspeak3 && sudo -u teamspeak3 ./ts3server_startscript.sh start
;;

stop)

cd /opt/teamspeak3 && sudo -u teamspeak3 ./ts3server_startscript.sh stop
;;

restart)

cd /opt/teamspeak3 && sudo -u teamspeak3 ./ts3server_startscript.sh restart
;;

status)

cd /opt/teamspeak3 && sudo -u teamspeak3 ./ts3server_startscript.sh status
;;

*)

echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac

End $rc_base/init.d/teamspeak3

Now the permissions need to be adjusted for the init script.

chmod 754 teamspeak3

So that the TeamSpeak 3 server can start during the boot process, a few links have to be set.

ln -s ../init.d/teamspeak3 /etc/rc.d/rc3.d/S65teamspeak3
ln -s ../init.d/teamspeak3 /etc/rc.d/rc0.d/K35teamspeak3
ln -s ../init.d/teamspeak3 /etc/rc.d/rc6.d/K35teamspeak3

In the last step a meta-file have to be created, this will identify TeamSpeak 3 for the IPFire as an Addon.

touch /opt/pakfire/db/installed/meta-teamspeak3

After this step it is possible to control the TeamSpeak 3 server under status ->Services via the webinterface.

Since the TeamSpeak 3 server owns multiple processes and thus he has several PIDs, the columns "PID" and "memory" is unfortunately empty.

Port-releases

For the pure operation you need to open, only port UDP 9987 (Voice), under External Access via the webinterface.

All server-ports used by TeamSpeak 3 are

UDP 9987 (Voice)
TCP 10011 (Serverquery)
TCP 30033 (File transfer)
TCP 2008 (Only by use of a licence.dat)

If the server is running you should be able to open the teamspeak 3 client and enter the lan IP address of IPfire using the default port and whatever nickname you prefer. Click connect and use the previously captured token to gain administrative privileges. Once you have set up the server to your liking simply give out your public ip to your friends and enjoy. =)

If giving out your IP address is not something you want to do try setting up dynamic DNS or just get your own domain.

Edit Page ‐ Yes, you can edit!

Older Revisions • August 19, 2018 at 2:51 am • Jon