Teamspeak Server Installation 24.04LTS: Difference between revisions
(Created page with "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. https://teamspeak.com/en/downloads/#server wget http://dl.4players.de/ts/releases/3.2.0/teamspeak3-server_linux_amd64-3.2.0.tar.bz2 Extract the archive. tar xvf teamspeak3-server_linux_amd64-3.2.0.tar.bz2 Move the extrac...") |
No edit summary |
||
Line 5: | Line 5: | ||
Get the latest TeamSpeak 3 server files for 64-bit Linux. Check their website, a new version may be available. https://teamspeak.com/en/downloads/#server | Get the latest TeamSpeak 3 server files for 64-bit Linux. Check their website, a new version may be available. https://teamspeak.com/en/downloads/#server | ||
wget | wget https://files.teamspeak-services.com/releases/server/3.13.7/teamspeak3-server_linux_amd64-3.13.7.tar.bz2 | ||
Extract the archive. | Extract the archive. (with a strip level of 1 so we remove the redundant directory) | ||
tar xvf teamspeak3-server_linux_amd64-3.2.0.tar.bz2 | tar --strip-components=1 -xvf teamspeak3-server_linux_amd64-3.2.0.tar.bz2 | ||
Change ownership of the TeamSpeak 3 server files. | |||
chown -R teamspeak:teamspeak /opt/teamspeakserver | |||
Create a license file | |||
touch /opt/teamspeakserver/.ts3server_license_accepted | |||
Make the TeamSpeak 3 server start on boot. Use your favourite editor to make a new file called teamspeak.service in /etc/systemd/system/. | Make the TeamSpeak 3 server start on boot. Use your favourite editor to make a new file called teamspeak.service in /etc/systemd/system/. | ||
Line 33: | Line 34: | ||
Group=teamspeak | Group=teamspeak | ||
Type=forking | Type=forking | ||
ExecStart=/opt/ | ExecStart=/opt/teamspeakserver/ts3server_startscript.sh start inifile=ts3server.ini | ||
ExecStop=/opt/ | ExecStop=/opt/teamspeakserver/ts3server_startscript.sh stop | ||
PIDFile=/opt/ | PIDFile=/opt/teamspeakserver/ts3server.pid | ||
RestartSec=15 | RestartSec=15 | ||
Restart=always | Restart=always | ||
Line 66: | Line 67: | ||
cat /opt/teamspeak/logs/ts3server_* | cat /opt/teamspeak/logs/ts3server_* | ||
At bottom you'll see something that looks like this: | |||
<pre> | <pre> |
Latest revision as of 14:37, 19 March 2024
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. https://teamspeak.com/en/downloads/#server
wget https://files.teamspeak-services.com/releases/server/3.13.7/teamspeak3-server_linux_amd64-3.13.7.tar.bz2
Extract the archive. (with a strip level of 1 so we remove the redundant directory)
tar --strip-components=1 -xvf teamspeak3-server_linux_amd64-3.2.0.tar.bz2
Change ownership of the TeamSpeak 3 server files.
chown -R teamspeak:teamspeak /opt/teamspeakserver
Create a license file
touch /opt/teamspeakserver/.ts3server_license_accepted
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
[Unit] Description=TeamSpeak 3 Server After=network.target [Service] WorkingDirectory=/home/teamspeak/ User=teamspeak Group=teamspeak Type=forking ExecStart=/opt/teamspeakserver/ts3server_startscript.sh start inifile=ts3server.ini ExecStop=/opt/teamspeakserver/ts3server_startscript.sh stop PIDFile=/opt/teamspeakserver/ts3server.pid RestartSec=15 Restart=always [Install] WantedBy=multi-user.target
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_*
At bottom you'll see something that looks like this:
-------------------------------------------------------- ServerAdmin privilege key created, please use the line below token=**************************************** --------------------------------------------------------
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.