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
- First step is to download the teamspeak server files. https://www.teamspeak.com/downloads.html#serverI am using the Linux Server 64-bit 18.104.22.168 for this.
- Now we need to make a teamspeak user for the server to run under.
sudo useradd -m -s /bin/bash teamspeak
- 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.
- 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
- Save and make the file executable
sudo chmod 700 /etc/init.d/teamspeak
- Set teamspeak to start on boot.
sudo update-rc.d teamspeak defaults
- 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.
- Now we make sure the teamspeak user has rights to the teamspeak server files.
chown -R teamspeak:teamspeak /home/teamspeak/teamspeak
- 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
- 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.
- Now start the service or just reboot and you should be able to connect with a teamspeak client.
service teamspeak start