How to Install Teamspeak 3 Server on Ubuntu 16.04 64-bit
Overview
Section titled “Overview”Sick of using Discord/Skype? Tired of not having complete control of your server? Or maybe it’s because of the lack of customizable settings? Too much bandwidth usage? Well look no further! Teamspeak is here to help!
In this guide, I will show you on how to install TeamSpeak 3 Server on your Ubuntu 16.04 64-bit AleForge VPS.
Requirements
Section titled “Requirements”- A VPS running Ubuntu 16.04 from AleForge.
Instructions
Section titled “Instructions”Step 1.
Section titled “Step 1.”First, create a new user with your desired name, we will use the name “teamspeak” for this guide.
adduser --disabled-login teamspeakStep 2.
Section titled “Step 2.”Get the latest TeamSpeak 3 server files for 64-bit Linux. Check their website, a new version may be available.
wget http://dl.4players.de/ts/releases/3.1.1/teamspeak3-server_linux_amd64-3.1.1.tar.bz2Step 3.
Section titled “Step 3.”Extract the archive.
tar xvf teamspeak3-server_linux_amd64-3.1.1.tar.bz2This will create a new folder in the root directory called:
teamspeak3-server_linux_amd64
Step 4.
Section titled “Step 4.”Move the extracted files to the teamspeak user’s home directory then remove
the extracted folder and downloaded archive.
cd teamspeak3-server_linux_amd64 && mv * /home/teamspeak && cd .. && rm -rf teamspeak3*Accept the license agreement:
touch /home/teamspeak/.ts3server_license_acceptedStep 5.
Section titled “Step 5.”Change ownership of the TeamSpeak 3 server files.
chown -R teamspeak:teamspeak /home/teamspeakStep 6.
Section titled “Step 6.”Make the TeamSpeak 3 server start on boot. Use your favorite editor to make a
new file called teamspeak.service in /lib/systemd/system/ .
nano /lib/systemd/system/teamspeak.servicePaste this content into it:
[Unit]Description=TeamSpeak 3 ServerAfter=network.target
[Service]WorkingDirectory=/home/teamspeak/User=teamspeakGroup=teamspeakType=forkingExecStart=/home/teamspeak/ts3server_startscript.sh start inifile=ts3server.iniExecStop=/home/teamspeak/ts3server_startscript.sh stopPIDFile=/home/teamspeak/ts3server.pidRestartSec=15Restart=always
[Install]WantedBy=multi-user.targetOnce you are done, save the file and close the editor. Now we will activate the script so that it will start on boot.
This makes to systemd recognize the file we just created.
systemctl --system daemon-reloadEnable the service.
systemctl enable teamspeak.serviceStart the TeamSpeak server.
systemctl start teamspeak.serviceOnce you’ve started the server, you can check that it’s running with this command.
systemctl status teamspeak.serviceStep 7.
Section titled “Step 7.”When you first try to connect to your TeamSpeak server, you may be prompted to use a privilege key. This privilege key allows to administrate your TeamSpeak server. To get this privilege key, use the following command:
cat /home/teamspeak/logs/ts3server_*At bottom you’ll see something that looks like this:
--------------------------------------------------------ServerAdmin privilege key created, please use the line belowtoken=****************************************--------------------------------------------------------Replace the stars with your unique token, and enter it into your TeamSpeak client. You’ll see a prompt telling you that the privilege key was successfully used.
Optional: Firewall
Section titled “Optional: Firewall”If you are using the built-in firewall that was included with the Ubuntu
installation then iptables is your firewall. You may need to forward the
following ports to allow connections to your TeamSpeak 3 Server.
iptables -A INPUT -p udp --dport 9987 -j ACCEPTiptables -A INPUT -p udp --sport 9987 -j ACCEPTiptables -A INPUT -p tcp --dport 30033 -j ACCEPTiptables -A INPUT -p tcp --sport 30033 -j ACCEPTiptables -A INPUT -p tcp --dport 10011 -j ACCEPTiptables -A INPUT -p tcp --sport 10011 -j ACCEPT