Here is a quick guide for setting up a Teamspeak 3 server on Ubuntu 14.04.

First you need to obtain the latest version of the Teamspeak 3 server software. You can see what they have available on the Teamspeak downloads page. At the time of this writing, the server software is found on a "server" tab. You'll want to pick either the 32 or 64-bit version depending on your Ubuntu installation. You can either download the package to your local computer and copy it to your server, or get it directly from your server. I used this command on my server:

$ wget

You can poke around on the downloads page using a web browser to find the URL for the latest verison by visiting

Next, unpack the archive file:

$ tar xvfz teamspeak3-server_linux-amd64-

A good place to install it is /usr/local/, so let's do that:

$ sudo mv teamspeak3-server_linux-amd64 /usr/local/teamspeak

It's a very good idea to create a new user to run the Teamspeak service. We'll create a system user called teamspeak that can't login with this command:

$ sudo adduser --system --group --disabled-login --no-create-home teamspeak

Now we'll ensure this new user owns all the files:

$ sudo chown -R teamspeak:teamspeak /usr/local/teamspeak

Next we'll create the infrastructure needed to launch the Teamspeak service on server startup. The server files we downloaded include a suitable startup script already. We'll just have to make sure our new teamspeak user runs this script. Use your favorite editor to create a new file:

$ sudo vi /etc/init.d/teamspeak

This new file will simply sudo to the new teamspeak user and then run the startup script. Your new /etc/init.d/teamspeak file should contain the following:

sudo --user=teamspeak /usr/local/teamspeak/ $@

Notice the trailing $@. This is important for forwarding the usual arguments like stop, start, and restart to the Teamspeak script.

Now we'll finish the process of ensuring our script can be run at server startup and shutdown:

$ sudo chmod u+x /etc/init.d/teamspeak
$ sudo update-rc.d teamspeak defaults

Now we can run the Teamspeak service for the very first time:

$ sudo service teamspeak start

You should see some console output, including a long string of the form token=blahblahblah. Make sure you copy the text after the token= part. This magic string will allow you to obtain server admin privileges the first time you connect to your server with a Teamspeak client. See this article for more information.

Finally, if you are running a firewall, you'll have to open some ports before you can connect with your client. You should refer to the Teamspeak article "Which ports does the Teamspeak 3 server use?". At the time of this writing, I used the following rules for iptables:

# Allow ports for Teamspeak3
-A INPUT -p udp --dport 9987 -j ACCEPT
-A INPUT -p tcp --dport 30033 -j ACCEPT
-A INPUT -p tcp --dport 10011 -j ACCEPT
-A INPUT -p tcp --dport 41144 -j ACCEPT

If you use ufw to manage your firewall, I think the following commands will suffice:

$ sudo ufw allow 9987/udp
$ sudo ufw allow 30033/tcp
$ sudo ufw allow 10011/tcp
$ sudo ufw allow 41144/tcp

Enjoy your new Teamspeak 3 server!


comments powered by Disqus