So the clan wanted a TS3 server and given that I have a server set up at home I SSH’d into it and the magic began.
To Install TS3 on Ubuntu Server you will need:
The latest version of TS3 server edition for your architecture (ie x86 or amd64) here.
thats about it ๐
I performed the install as root, but if you are not root, you will need to sudo most of these commands.
first download the package. ย I downloaded it to /home/myuser/downloads using wget:
wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.1/teamspeak3-server_linux-x86-3.0.1.tar.gz
Dont forget to check for the latest version. The above link may have changed!
Extract the archive.
Create the directory ts3 in /opt
mkdir /opt/ts3
move the contents of the extracted directory to /opt/ts3
mv /home/myuser/downloads/teamspeak3-server_linux-x86/* /opt/ts3/
Now we need a user, with no login privileges, for the Teamspeak service to run as.
adduser --disabled-login teamspeak
The directory teamspeak will need be given to the user teamspeak in order to run
chown -R teamspeak /opt/ts3
In order to let us use the command
service teamspeak start
we need an init script.
Go to /etc/init.d and create the file there.
nano teamspeak
paste the below code into it
#! /bin/sh ### BEGIN INIT INFO # Provides: teamspeak # Required-Start: networking # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: TeamSpeak Server Daemon # Description: Starts/Stops/Restarts the TeamSpeak Server Daemon ### END INIT INFO set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="TeamSpeak Server" NAME=teamspeak USER=teamspeak DIR=/opt/ts3 DAEMON=$DIR/ts3server_startscript.sh #PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 cd $DIR sudo -u teamspeak ./ts3server_startscript.sh $1
save and exit
The permissions for that file now need to be changed
chmod 755 /etc/init.d/teamspeak
test it out:
service start teamspeak
this will list your login and token (you need these) don’t worry too much about it if you close that screen, you can find that info in the logs.
to make the service run at boot
update-rc.d teamspeak defaults
FINALLY: you will need to open the ports on your firewall/router to allow outside traffice to speak to your server.
To find out which ports TS is running on use
nestat -lnp | grep ts3
you should get something like this:
tcp 0 0 0.0.0.0:30033 0.0.0.0:* LISTEN 31739/ts3server_lin tcp 0 0 0.0.0.0:10011 0.0.0.0:* LISTEN 31739/ts3server_lin udp 0 0 0.0.0.0:9987 0.0.0.0:* 31739/ts3server_lin
So I have forwarded tcp ports 30033 and 10011 and udp port 9987 to the internal LAN IP of my server.
HEY PRESTO!
TS3 is now up and running ๐
Leave a Reply