Setup Teamspeak 3 server on Linux

A few weeks ago I set up a Teamspeak server for me and some friends. I did not want to pay for anything so I decided to throw one on my already existing SVN server. Then I thought I would share the process. My server is running Debian so the process may not match up 100% for other distros. But it should be close.

Setting Up The Teamspeak Server

1. First step is to download the teamspeak server files. https://www.teamspeak.com/en/downloads/ I am using the Linux Server 64-bit 3.0.13.6 for this.

2. Now we need to make a teamspeak user for the server to run under.

sudo useradd -m -s /bin/bash teamspeak

3. Now we unpack the server files and put them in the teamspeak user folder. Make sure they are inside their own folder to keep things neat.

home/teamspeak/teamspeak

4. Make and put this file in /etc/init.d so we can make teamviewer into a service that starts automatically. I used nano to make the file. Use whatever text editor works for you.

#!/bin/sh ### BEGIN INIT INFO # Provides: teamspeak # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Teamspeak 3 Server ### END INIT INFO USER="teamspeak" DIR="/home/teamspeak/teamspeak-server" ###### Teamspeak 3 server start/stop script ###### case "$1" in start) su $USER -c "$DIR/ts3server_startscript.sh start" ;; stop) su $USER -c "$DIR/ts3server_startscript.sh stop" ;; restart) su $USER -c "$DIR/ts3server_startscript.sh restart" ;; status) su $USER -c "$DIR/ts3server_startscript.sh status" ;; *) echo "Usage: " >&2 exit 1 ;; esac exit 0

5. Save and make the file executable

sudo chmod 700 /etc/init.d/teamspeak

6. Set teamspeak to start on boot.

sudo update-rc.d teamspeak defaults

7. Now before you do anything else make sure you start the server the first time from the command line so that you can get the random admin password it prints out.

./home/teamspeak/teamspeak-server/ts3server_startscriot.sh start

8. Now we make sure the teamspeak user has rights to the teamspeak server files.

chown -R teamspeak:teamspeak /home/teamspeak/teamspeak

9. Open up the firewall in Linux so people can connect to the teamspeak server.

iptables -A INPUT -p udp --dport 9987 -j ACCEPT iptables -A INPUT -p udp --sport 9987 -j ACCEPT iptables -A INPUT -p tcp --dport 30033 -j ACCEPT iptables -A INPUT -p tcp --sport 30033 -j ACCEPT iptables -A INPUT -p tcp --dport 10011 -j ACCEPT iptables -A INPUT -p tcp --sport 10011 -j ACCEPT

10. Make sure you port forward the same ports in your router. I cannot give you a guide on this because every router has a different process for doing this.

11. Now start the service or just reboot and you should be able to connect with the client.

service teamspeak start


Join The Community

I hope you enjoyed this article! I am always posting new and helpful things! If you like what you see then I would love to be able to send you more! Please subscribe to my newsletter for the latest information and exclusive content!

* indicates required

Leave a Reply

Your email address will not be published. Required fields are marked *