TeamSpeak3 Server on Debian 6+
There are lots of choices when it comes to VoiP software, I chose TeamSpeak because it was the first one I've ever used. Switched to Skype later on, but when Microsoft acquired it I wasn't really happy about my privacy as they let agencies listen on people's calls and quite intrusive adds started popping up, so I decided to build my own TeamSpeak server, which turns out to be extremely easy. Just download, extract and run. Though I'm still going to put installation details on paper, well, the internet in this case.
Server Setup
Start with creating a user:
- su
- useradd -ms /bin/bash teamspeak
- passwd teamspeak
You want to run the server under teamspeak user for security reasons. Switch to newly created user:
- su teamspeak
- cd
Visit TeamSpeak official site and download server tarball, copy over scp or WinSCP, or copy link address and use wget:
- wget http://teamspeak.gameserver.gamed.de/ts3/releases/rc1/teamspeak3-server_linux-x86-3.0.0-rc1.tar.gz
- tar -xf teamspeak3-server_linux-x86-3.0.0-rc1.tar.gz
- mv teamspeak3-server_linux-x86/ ts3
- cd ts3
- ./ts3server_startscript.sh start
It outputs some private keys. Use them to identify yourself as server administrator, when connecting to your server for the first time via TeamSpeak client. If you lose the token, you can find it in one of the log files, in this case ~/ts3/logs directory.
System Service Script
Switch to root and create a new file:
- nano /etc/init.d/teamspeak
Don't forget to check all the variables in the following script before running it, if you chose different username or paths. If you're using PuTTy to connect to your Linux box, right click on the open window to paste content.
- #!/bin/sh
- ### BEGIN INIT INFO
- # Provides: teamspeak
- # Required-Start: $remote_fs $syslog
- # Required-Stop: $remote_fs $syslog
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Start daemon at boot time
- # Description: Enable service provided by daemon.
- ### END INIT INFO
- DESC="TeamSpeak3 Server Service"
- USER="teamspeak"
- DIR='/home/teamspeak/ts3'
- DAEMON="$DIR/ts3server_startscript.sh"
- [ -x "$DAEMON" ] || exit 0
- cd $DIR
- case "$1" in
- 'start')
- su $USER -c "$DAEMON start"
- ;;
- 'stop')
- su $USER -c "$DAEMON stop"
- ;;
- 'restart')
- su $USER -c "$DAEMON restart"
- ;;
- 'status')
- su $USER -c "$DAEMON status"
- ;;
- *)
- echo "Usage $0 start|stop|restart|status"
- esac
Save and exit (Ctrl+X). Now just set proper permissions:
- chmod 755 /etc/init.d/teamspeak
Install the service:
- insserv teamspeak
If you're running Debian Lenny or older (or other distros) use the following command instead of insserv:
- update-rc.d teamspeak defaults
This pretty much covers it. Server configuration itself is done via TeamSpeak client.
Disable Weblist
If you haven't setup server password and don't want to be listed on public servers' list, you can disable that in just few steps. Firstly, create ServerQuery user by going to Tools -> ServerQuery Login. Enter your username, click 'OK', write down the password. Now, open up PuTTY, enter your server's IP address, set port to 10010 and choose Telnet 'Connection Type'. Enter the following when connected:
- login <username> <password>
- use sid=1
- serveredit virtualserver_weblist_enabled=0
Ignore all the 'error id=0 msg=ok' messages, it's just a confirmation that the command was succesful.