Setup Teamspeak 3 server on Linux

I set up a Teamspeak server for me and some friends a few weeks ago. I did not want to pay for anything and I am not a big fan of discord so I decided to throw one on my already existing SVN server. This is the steps I used on my Debian server so the process may not match up 100% for other distros.

Setting Up The Teamspeak Server

  1. First step is to download the teamspeak server files. am using the Linux Server 64-bit 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.
  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.
    # 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
    ###### Teamspeak 3 server start/stop script ######
    case "$1" in
    su $USER -c "$DIR/ start"
    su $USER -c "$DIR/ stop"
    su $USER -c "$DIR/ restart"
    su $USER -c "$DIR/ status"
    echo "Usage: " >&2
    exit 1
    exit 0
  1. Save and make the file executable
    sudo chmod 700 /etc/init.d/teamspeak
  2. Set teamspeak to start on boot.
    sudo update-rc.d teamspeak defaults
  3. 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/ start
  4. Now we make sure the teamspeak user has rights to the teamspeak server files.
    chown -R teamspeak:teamspeak /home/teamspeak/teamspeak
  5. Open up 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
  1. Make sure you port forward the same ports in your router. I cannot give you a guide on this because every router has a difference process for doing this.
  2. Now start the service or just reboot and you should be able to connect with a teamspeak client.
    service teamspeak start

Leave a Reply

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