Teamspeak Server Installation

From Scottworld
Jump to navigation Jump to search

First, create a new user with your desired name, we will use the name "teamspeak" for this guide.

adduser --disabled-login teamspeak

Get the latest TeamSpeak 3 server files for 64-bit Linux. Check their website, a new version may be available.


Extract the archive.

tar xvf teamspeak3-server_linux_amd64-3.2.0.tar.bz2

Move the extracted files to the teamspeak install directory then remove the extracted folder and downloaded archive.

cd teamspeak3-server_linux_amd64 && mv * /opt/teamspeak && cd .. && rm teamspeak3*

Change ownership of the TeamSpeak 3 server files.

chown -R teamspeak:teamspeak /opt/teamspeak

Make the TeamSpeak 3 server start on boot. Use your favourite editor to make a new file called teamspeak.service in /etc/systemd/system/.

nano /etc/systemd/system/teamspeak.service
Description=TeamSpeak 3 Server

ExecStart=/opt/teamspeak/ start inifile=ts3server.ini
ExecStop=/opt/teamspeak/ stop


Once 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-reload

Enable the service.

systemctl enable teamspeak.service

Start the TeamSpeak server.

systemctl start teamspeak.service

Once you've started the server, you can check that it's running with this command.

systemctl status teamspeak.service

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 /opt/teamspeak/logs/ts3server_*

A t bottom you'll see something that looks like this:

ServerAdmin privilege key created, please use the line below

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.

If the server fails to start as a non-root user

Run an "ls -al /dev/shm/" and if there's a filename called "7gbhujb54g8z9hu43jre8" with the root user as the owner, then you delete the file, before starting the TeamSpeak server again with your non-root user.

It should then start okay and when you run the "ls" command again you'll see that the file has been re-created with the owner as the non-root user.