Starting a teamspeak server after installing firewall

Hey everyone,

I setup my server again today after I was told how dangerous it is to start my teamspeak server as root. I got it working with a dedicated teamspeak user after granting it access to the old file I uploaded with chmod -R 0755. After that I wanted to get a https certificate for the small website I’m running on it and used this tutorial: Use Certbot to Enable HTTPS with Apache on Debian | Linode Docs
But now I can’t reach the server unless I start is as root or as sudo teamspeak. I enabled some iplist, which made it work as root, which didn’t work before, but as the teamspeak user it does not.

I am running this on a small vserver with debian 10.

I assume I need more permissions or enable a firewall rule of some sort, but my linux knowledge is very limited and I’m just happy to get the two things running. Since it isn’t safe to run the server as root, I assume I shouldn’t run it as sudo teamspeak as well?

Thanks reading and I appreciate any help!

Baersaerker

Use the chown command to give full permissions to the new user created earlier. Changing ownership of the folder is essential as the Teamspeak user needs to be able to use it without any errors correctly.

Note: For security reasons, never run the TS3 server as root.

The user should have the required ownership. It was working earlier, before adding the https certificate. In putty all the names light up in green, like I think it should be. Could you give me an example how to use the chown command in this case? After searching around, I’m not sure how to properly use it.

Try this: chown -R teamspeak:teamspeak /home/teamspeak and try server start again. But can you please post your Server log?

And you cant connect to the server with your Client or is the Server not starting?

1 Like

I used your command, but nothing changed.

The following happens:
As root, I can use the startscript and start the server perfectly fine and I can reach it with my teamspeak client.

When I switch the user to my “teamspeak” user and do the same, it says that the server got started, but I can’t reach it with my teamspeak client.

I tried running the minimal script with both accounts, same thing happens. The only difference I can spot is this line:
2022-02-02 23:24:41.564690|ERROR |Accounting | |failed to register local accounting service: File exists

This was written in the two logs I got:
1st:
2022-02-02 23:28:49.945692|INFO |ServerLibPriv | |TeamSpeak 3 Server 3.13.3 (2020-12-16 14:17:05)
2022-02-02 23:28:49.945878|INFO |ServerLibPriv | |SystemInformation: Linux 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 Binary: 64bit
2022-02-02 23:28:49.945921|INFO |ServerLibPriv | |Using hardware aes
2022-02-02 23:28:49.946671|INFO |DatabaseQuery | |dbPlugin name: SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2022-02-02 23:28:49.946704|INFO |DatabaseQuery | |dbPlugin version: 3.11.1
2022-02-02 23:28:49.946967|INFO |DatabaseQuery | |checking database integrity (may take a while)
2022-02-02 23:28:49.994265|WARNING |Accounting | |Unable to open licensekey.dat, falling back to limited functionality
2022-02-02 23:28:49.994499|INFO |Accounting | |Licensing Information
2022-02-02 23:28:49.994520|INFO |Accounting | |licensed to : Anonymous
2022-02-02 23:28:49.994531|INFO |Accounting | |type : No License
2022-02-02 23:28:49.994547|INFO |Accounting | |starting date : Thu Oct 1 00:00:00 2020
2022-02-02 23:28:49.994558|INFO |Accounting | |ending date : Tue Nov 1 00:00:00 2022
2022-02-02 23:28:49.994567|INFO |Accounting | |max virtualservers: 1
2022-02-02 23:28:49.994576|INFO |Accounting | |max slots : 32
2022-02-02 23:28:50.494837|ERROR |Accounting | |failed to register local accounting service: File exists
2022-02-02 23:28:51.573660|INFO | | |Puzzle precompute time: 1553
2022-02-02 23:28:51.574268|INFO |FileManager | |listening on 0.0.0.0:30033, [::]:30033
2022-02-02 23:28:51.579501|INFO |Query | |Using a query thread pool size of 2
2022-02-02 23:28:51.660918|INFO |Query | |listening for query on 0.0.0.0:10011, [::]:10011
2022-02-02 23:28:51.661226|INFO |Query | |listening for ssh query on 0.0.0.0:10022, [::]:10022
2022-02-02 23:28:51.661346|INFO |Query | |listening for http query on 0.0.0.0:10080, [::]:10080
2022-02-02 23:28:51.661441|INFO |CIDRManager | |updated query_ip_allowlist ips: 127.0.0.1/32, ::1/128,

2nd:
2022-02-02 23:28:51.660577|INFO |VirtualServerBase|1 |listening on 0.0.0.0:9987, [::]:9987
2022-02-02 23:28:51.661892|INFO |VirtualServerBase|1 |stopped

Ok, I got it to work. In another thread I read about the same issue (TeamSpeak - Official TeamSpeak Community Forum) and after running ls -al /dev/shm/ I used rm /dev/shm/7gbhujb54g8z9hu43jre8.
After starting the server as teamspeak I can reach it again with my client. I hope I didn’t break anything by doing this?
The previously mentioned line: |failed to register local accounting service: File exists does also not appear anymore.

Thank you very much for your help!

Nice that it works. I wanted to suggest you the same solution that you already found in the old forum. :slight_smile: