Proper way to install ts3 server on ubuntu? getting errors

hi, I know there are tons of unofficial guides, I’m already able to install and make it works, but I’m 200% sure I’m doing it in the wrong way, I mean, I always use root account and sudo commands, and I always grant full permission to all folders and files for avoid problems, and also, I surely put the teamspeak folder in a random wrong place.

this morning I decided to start from scratch by install ts3 server on a clean ubuntu server machine, then I downloaded last version of the server, and making few searches, I found out I have to create a dedicated user, then I created it, giving him “teamspeak” name and folder under “otp”.

finally, I also created a service in order to avoid having start it manually every time.

now, I don’t know if is that the proper and safest way to do it, if yes, I want say I’m getting error

“|Unable to open licensekey.dat, falling back to limited functionality”

and this not happen if I run the .sh script with “sudo”, I don’t know where this file is located, but I just followed online guides, so I have no idea why am I getting this error.

I’m using free version with 32 slots for now, so, no, I didn’t put any “licensekey.dat” file in the wrong place since I don’t have.

if that way is wrong too, I would just ask you how should I install ts3 server properly?

I want make something clean, respecting max safe rules.

last question, but I already know answers I could get, is ubuntu good distro for teamspeak server? if not which one should I use?

thanks to all in advance.

Ok, so I see a few questions here.

Probably the most pressing: The Unable to open licensekey.dat [...] log line is normal and expected, you most likely just missed it when running as root.

Running as root is absolutely discouraged and the way it sounds like what you are doing now is a better way. Whether it’s perfect is debatable, but it is definitely fine.

When you are talking about Ubuntu I guess you mean Ubuntu server. This is also perfectly fine, I always uninstall snap, but that’s just personal preference :P.

Another few ideas for even more security:

  • Implement a proper firewall with restrictive rules (e.g. ufw / iptables)
  • containerize the TeamSpeak server (e.g. docker / podman)
1 Like

about the licensekey.dat error I really have no idea on how to fix it.

it comes only when I run as normal user.

and forgot to say, the only file I had to create, was the blank file for accept the license.
I’m using ubuntu server, yeah.

I thought ovh firewall was already enough, but btw y, I’d like to set max security, I know a bit iptables, is it enough to just install it, and decide ports to unlock, or I’ll have to add much other rules?

about docker, yeah, I know tons of people use it, but in my case, I’m having to host only 1 ts3 server, not multiples, is still recommended to use docker? if y, why?

finally, consider the final place will be a vps, so an already virtualized environment.

The line about the licensekey is just a warning. It tells you that the server is using the built-in 32 slot license. As long as you don’t provide your own licensekey.dat file the line ALWAYS shows.

Yeah, it should definitely be. Nested firewalls don’t practically have any benefit. So you should be fine.

The main benefit of containerization is the encapsulation of the service. Thus if there is e.g. an RCE in a service an attack can only access things (files / processes) in the container and not on the host. But if TeamSpeak is the only service the security benefit is negligible. From a sysadmin perspective docker container are easier to update (as long as there is a prebuilt image) than bare-metal installs.

if I execute as normal user it says that, and ts3 server istantly die
if I run as root with sudo log file does not show errors and ts3 server stay up
edit: I think the real error is that one

ERROR |Accounting | |failed to register local accounting service: File exists

ts3server has crashed. A crashdump has been generated at “/opt/teamspeak/crashdumps/ts3server_3_13_7_linux_amd64_5659-fa9f-f9b3-7a1a.dmp”
Aborted (core dumped)

so you’ll recommend me to use docker even for a single instance of ts3, or in my case I can just skip it?

I see. The license is still not the problem though.

Yes, the error is with an existing file. I’m not too sure, but I guess that the offending file belongs to the root user and can not be deleted by the other user.

And I don’t think you need docker in your case.

I noticed at the end of the log it says:

ts3server has crashed. A crashdump has been generated at “/opt/teamspeak/crashdumps/ts3server_3_13_7_linux_amd64_5659-fa9f-f9b3-7a1a.dmp”
Aborted (core dumped)

Im gonna try open this .dmp hoping it will be readable

Looking through the forum there seems to be a file created in /dev/shm with a random ID. Removing that should allow the server to start as non root.

yeah, there was a blank file in, named 7gbhujb54g8z9hu43jre8
removed it and it works
for the rest, you think I installed it in the right way and folder?
did I miss some best practice?