Table of Contents

Howto setup a Teamspeak server (linux)

1. Requirements

2. Preparation

3. Setup

3.1 Create directory & Unpack

I have the nack of creating an “install” directory in my homedir.
After downloading both the above files, mentioned in '2. preparation' we start with unpacking.
Seeing the file we downloaded is a .tar.bz2 file we unpack it using 'tar' with the commands 'xvjf <file>'
(x for extract, v for verbose, j for bzip2 and f for file)

After unpacking the directory structure should look like: (with ls)

httpdocs       LICENSE      README        tcpquerydocs
INSTALL        Manual       server_linux  teamspeak2-server_startscript
INSTALL.mysql  manual.html  sqlite.so
libsqlmy.so    mysql_sql    sqlite_sql

3.2 Running it for a brief while

Why are we running it when we haven't configured it yet, you might ask?
Well the answer is just as simple: “We need to, because the configuration files and the log do not ship with the install”.
Running it for a brief while initializes Teamspeak to create you a few files and accounts which we need to have to continue the install.

When running 'server_linux' for a first time it will notice something back to your shell: “TeamSpeak Server Daemon started with PID XXXXX ”. Immediately after starting it we will now kill it by typing 'kill -9 <pid>', where <pid> is the number the server started with.

After this marvellous adventure we now have a few more files in our directory:

server.log (holds the logging for the server)
server.ini (the configuration file for the server)
server.pid (keeps the PID number stored)
server.dbs (sqlite file which holds all channel and user records)

3.3 Configuring

Time for the fun part now! Remember the creation of the files above? Well we're going to edit those files now. First up is the server.ini file which we'll have a look at now. The text between '(' and ')' are comments and aren't needed when filling the server.ini file.

[Main Config]
BoundToIp1=

Fill in the IP of your machine.

ExternalIPDectection=1 
HTTPServer Port=14534

Http port we'll need later when configuring the server(s).

HTTPServer Enabled=1 

0 = disable, 1 = enable. Enable it for now.

DateTimeFormat=dd-mm-yyyy hh:nn:ss

Can be changed if you wish, though the default will do fine.

TCPQueryPort=51234

Some scripts need this port when they want to query it to recall stats like amount of people connected.

AllowedClientNameChars=

Empty means all characters are allowed.

DisAllowedClientNameChars=()[]{}

Characters that aren't allowed in a nickname.

[debug]
MessageTypes=LMTALL
MessageDepths=LMDALL

[WebPost]
AdminEmail=na

Your email address.

ISPLinkURL=na

The URL of your ISP.

ISPName=Private

Shows people your TS server (public) or hides it from everyone else (private).

ISPCountryNumber=0
Enabled=1
PostURL=
ListPublic=1
UserAgent=teamspeak

[log] 
access_r=0
access_u=0
channel_registerred=0
channel_unregisterred=0
sa=0
chat=0
kick_server=0
kick_channel=0

0 = disabled, 1 = enabled. Use at your pleasure.

[Spam]
max_commands=10
in_seconds=2

3.4 Logins

Time to start the server again! Start it by calling 'server_linux'. It will give you the usual PID number back and it should be running.
This time we're going to login and alter some server configurations via the web.

Go to http://IP:14534. Click on the link in the bottom saying “Superadmin login”. Now log in with username “superadmin” and it's password. The password can be found in server.log, look for a string saying “WARNING,Info,SERVER, superadmin account info: username: superadmin password: xxxxxx”.

After logging in click on the link saying “SuperAdmin manager”. Create a new account for yourself with a nickname and password. After this, delete the superadmin account! Now logout, click on the superadmin login part again and use your own credentials to login. Time for you to fill in all the information about your server.

Now click on the 'servers' link. Afterwards click on “select”. A few more options should pop up now. Scroll to the bottom and select “user manager”. Add yourself to the list again and don't forget to check the box saying 'server admin'. If you wish you could also create more servers, which run on different UDPports, don't forget to open the firewall on that port! Also after creating them, be sure to “select” the server and create an 'server admin' account for yourself on them, or you won't be able to manage the server via the TS client.

We're done with this part of the configuration for now.

Several TIPS:

3.5 Teamspeak client

Now that we're done with configuring the server-side of the Teamspeak server, lets have a look at the client side.
Start your client up and hit 'connect'. Add your server as a favorite and use the login credentials you created above.

You should now be in a channel called 'default'. Noticed the 'D' being next to it? This means this is the channel new users will be coming into. You can rightclick this channel and edit it. Editing a channel has a few options to it, which I'll try to explain below:

Name  Topic  Password  Codec  Description

Name: The name of the channel.
Topic: The topic of the channel.
Password: The password required to join the channel.
Codec: The chat codec used in the channel, when talking. A lower chat codec uses less bandwidth (and has a lesser sound quality).
Description: A channel description.

Flags:  Registered  Moderated  Sub-channels  Default

Registered: Means the channel will not dissapear when noone is in it anymore.
Moderated: Only people with O(perator) or V(oice) status can chat. New people need to be granted this before they can open up their mouth.
Sub-channels: Channel allows the creation of sub-channels.
Default: Default channel people join when entering the server.

4. Extra

4.1 ts2perlmod

4.1.1 Requirements
4.1.2 Setup

First part will be adding a user to your teamspeak server that has superadmin rights. You could use your own account to get this to run, thought I prefer to create a dedicated account for it myself. Remember that if you disabled the http part of teamspeak earlier, you will need to edit the server.ini file again and restart the TS server, in order to activate the http part. After logging in under your own superadmin account be sure to add a 'new' superaccount. Just a server's admin account won't do and the script won't run!

Next we go to work on ts2perlmod itself.
Download ts2perlmod from here: Ts2perlmod download. I'd like to put the unpacked directory in the same dir as the teamspeak server but that's entirely up to you!
Unpack it with unrar and change to the unpacked directory.
Locate the “config” directory and edit the 'default.ini' file there to your liking. Remember that most settings can be found in your teamspeak servers configuration file, if you can't remember all the details!

Third thing we do is edit the 'ts2perlmod.pl' file. This only concerns the first sentence, since we are going to run this file!
The first sentence might be saying something like “#!/usr/bin/perl”. Be sure that your perl is in this directory. If it is then you can simply leave the file like this. If your perl command is stored some place else, edit that first line and put that path in. Be sure to start the sentence with “#!/” as it's the command for the script to run the file with!

4.1.3 Running

It's time to run the script now. I'd like to run the script with the parameter “&”. This will put the script in the background when it was started. You are free how to do it yourself however. Can put it in a screen or use the startscripts provided.

I start it with “./ts2perlmod.pl &”. If you wait a bit it shows you all checks before really running. You can see what goes wrong there, if any will. It also stores the logs into the logdir so you could check for errors there further.