How to Setup a TeamSpeak 3 Server on Ubuntu 16.04

TeamSpeak 3 is a popular VoIP solution that is commonly used in the PC Gaming community but it can also be used for online voice communication outside of gaming. TeamSpeak requires the user to have a client installed on each PC and a central server that all the client connect to. This tutorial will follow take you through a step-by-step process for setting up a Teamspeak server.

Initial Requirements

To follow this guide you will need the following:

  • An Ubuntu 16.04 LTS server
  • Root access or a user account with sudo privileges
  • A system with the TeamSpeak 3 client installed to test the server

Step 1 – Running Updates

To being you should check to see if your Ubuntu 16.04 LTS install is up-to-date by running the following command:

sudo apt update && sudo apt upgrade

Step 2 – User Creation

Now a user account for the TeamSpeak 3 server will be created on your server to run the software and store the files for the software. This is being done because the TeamSpeak server software isn’t released in a way that can be installed via a distributions package manager.

sudo adduser --disabled-login teamspeak

The fields for entering a name and contact information can be left blank and then the server software for TeamSpeak can be installed.

wget http://dl.4players.de/ts/releases/3.0.13.6/teamspeak3-server_linux_amd64-3.0.13.6.tar.bz2
tar xvf teamspeak3-server_linux_amd64-3.0.13.6.tar.bz2
cd teamspeak3-server_linux_amd64
cp * -R /home/teamspeak
cd ..
rm -rf teamspeak3-server_linux_amd64*
chown -R teamspeak:teamspeak /home/teamspeak

Step 3 – Startup Script

By default the TeamSpeak 3 server won’t start by default when the system boots. This can be corrected by creating a startup script. Start by running this command:

sudo nano /lib/systemd/system/teamspeak.service

Then paste the following content into the file.

[Unit]
Description=Team Speak 3 Server
After=network.target

[Service]
WorkingDirectory=/home/teamspeak/
User=teamspeak
Group=teamspeak
Type=forking
ExecStart=/home/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini
ExecStop=/home/teamspeak/ts3server_startscript.sh stop
PIDFile=/home/teamspeak/ts3server.pid
RestartSec=15
Restart=always

[Install]
WantedBy=multi-user.target

Once done, save and close the editor then enable the server and startup script with this command:

systemctl --system daemon-reload
systemctl start teamspeak.service
systemctl enable teamspeak.service

You can check to see if the server is running by using the following command:

sudo systemctl status teamspeak.service

Step 4 – Firewall Rules

Before you can connect to the server, you will need to add firewall rules for the server to be open on the 3 ports a Teamspeak requires to function correctly. These ports are the following:

  • 9987 UDP for TeamSpeak Voice Service
  • 10011 TCP for TeamSpeak ServerQuery
  • 30033 TCP for TeamSpeak FileTransfer

We are going to enable these ports using UFW via the following command:

sudo ufw allow 9987/udp
sudo ufw allow 10011/tcp
sudo ufw allow 3033/tcp

You can check to see if your firewall is configured correctly with the following command:

sudo ufw status

Step 5 – Connecting to the Server

You can now connect to your TeamSpeak 3 server via the client you should already have installed. You can connect via the public IP address of your server. When you first connect, you will be asked to enter the privilege key for your server to get full admin permissions. You can find this in the server logs by running the following command:

sudo cat /home/teamspeak/logs/ts3server_*

The privilege key will be near the top of the logs. Once entered into the client you can then configure the server from the TeamSpeak 3 client.

You now have a TeamSpeak 3 server running on your Ubuntu 16.04 server. If you need to rent an Ubuntu server, you can do so by DigitalOcean (referral link).

Installing the Latest nVidia Graphics Drivers on Linux Mint 18

This was originally posted on my old blog in July 2016.

Linux Mint 18 was released yesterday featuring new and improved versions of the Cinnamon and MATE desktop environments, improvements to HiDPI support, exFAT filesystem support, improvements to the Update Manager as well as various other fixes and improvements.

Depending on your hardware configuration you may already have all the drivers you need to use your system but if you are the owner of a modern nVidia Graphics Card then you will need to install the driver provided by nVidia to make full use of the hardware as the open source driver won’t do much more provide you with a desktop environment.

The installation process is straightforward and will take approximately 10-15 minutes depending on the speed of your storage device and your internet connection. To begin, open the System Settings program and then click Software Sources from the Administration section.

After this, click the PPAs option on the left-side and then click the Add a New PPA button. In the text box, type in ppa:graphics-drivers/ppa. Then click the Ok button followed by Update the cache.

Dialog box to add the nvidia graphics driver ppa

Once this is done, close the Software Sources program and then open the Driver Manager program. This is also found in the Administration section of the System Settings. Once the driver manager is open, you will see an interface that looks like this. The options shown are entirely dependent on the hardware in your system. In the case of my system, this is what was shown.

The addition drivers program can be used to install any extra drivers for your hardware to function correctly.

As the screenshot above shows, the Driver Manager was showing me available drivers for my GTX 970, my TP-Link WiFi Card (uses a Broadcom controller) and then the microcode updates for my Intel CPU.

With the GTX 970 being a modern card, I can install the latest driver (at the time of writing) which is version 367.27. Older cards may not be supported on newer driver versions but the Driver Manager shouldn’t show you a driver version that you card isn’t supported by. You can use the nVidia GeForce website to check the driver version that is right for you but ensure that you install that driver through the Driver Manager.

Dialog box to search for drivers on the nVidia GeForce website

Once you have found the latest version, select that version in the Driver Manager and then press Apply Changes. You can also use this opportunity to install the Intel Microcode updates, if you have an Intel processor, to ensure your system runs without errors. If you would like to read more on microcode updates, the Debian Wiki has a great entry explaining what they do and why they are needed.

After the driver installation is done, which will take around 5 to 10 minutes depending on the speed of your internet connection, restart your computer and then log back into your system. There will now be a program called NVIDIA X Server Settings which can be used to make changes to your display settings. This can be found in the Administration section of the System Menu.

At this stage, everything should now be installed and you will be able to make full use of your nVidia Graphics Card on Linux Mint 18. From here you can install Steam and play games such as F1 2015, Civilization V or PAYDAY 2. There a few things to keep in mind, based on how the updates currently work, when looking for newer drivers in the future. These are all outlined in the bullet points below.

  • The PPA used to provide the drivers is well maintained and unless it becomes part of the main package repositories in the future, your nVidia drivers will be found here.
  • While the driver manager is only intended to show drivers that your card is supported by, you can use the GeForce website to ensure you are installing a supported version.
  • The drivers are split into branches by their version number. While this makes updating to newer versions a tad slower in the long-term, it also allows you to rollback to an older driver much faster if you have any issues.

Thanks for visiting my website. I hope that this guide has allowed you to make full use of your nVidia Graphics Card under Linux Mint. I recommend keeping this guide in your bookmark for future reference or for easier sharing with family and friends.