How to Install TeamSpeak 3 Server Into A Jail

Status
Not open for further replies.

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
That's great to hear.. For now I'm going to stick with Mumble until 10x is out.. I will still have to wait unless I want to do a clean jail setup.. Which I don't currently.. When 10x comes out I may revisit this.. Or if i decide to fully reinstall my jails someday... Once you have a 10x jail templates it should work for TS3 going forward.. Same install procedure..

If your upgrading from 9.3.1 most likely will be on a 9.x jail platform.. You'll need to force a 10x jail for it to install successfully..

I added a clean 10x template to get this done..
 
Last edited:

SCS

Dabbler
Joined
Sep 10, 2016
Messages
42
I have a question.

I've been running on a Windows XP vm for years and I'd like to keep my current logs and configurations. What and where do I place my old TS3 files to have this server be a continuation of the previous?

The current FreeBSD is a slight incremental version ahead but both are running the latest build for their given OS.
 

-ZAP-

Cadet
Joined
Jan 29, 2017
Messages
1
FIX to FreeBSD11

1.
Download rc.subr in https://svnweb.freebsd.org/base/head/etc/rc.subr?revision=309504&view=markup&pathrev=309504

2. Replace in /etc/rc.subr

3. Edit /usr/ports/audio/teamspeak3-server/Makefile
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100000 && ${OSVERSION} < 1100507
to
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000 && ${OSVERSION} < 1200507

4.
Install teamspeak :)
 
Last edited:

markj2222

Cadet
Joined
Oct 16, 2017
Messages
1
Freenas 11 & FreeBSD notes

I was able to use the instructions on the first post.
Only change i needed to make was i needed to use a 11x standard jail.

Add jail template with this link. And use this template to create your TS3 Jail.
http://download.freenas.org/jails/11/x86/freenas-standard-11.0-RELEASE.tgz

Using this template, everything else was default, easy setup.

Things that didn't work for me.
-10x refused to work.
-11 Jail Plugin didnt work. (Wouldn't set ipv4 address)(needed jail standard)
-ZAP-'s (rc.subr) replacement didnt work for me.
-Editing the Makefile did not work.

Build = FreeNAS-11.0-U4 (54848d13b)
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
FIX to FreeBSD11

1.
Download rc.subr in https://svnweb.freebsd.org/base/head/etc/rc.subr?revision=309504&view=markup&pathrev=309504

2. Replace in /etc/rc.subr

3. Edit /usr/ports/audio/teamspeak3-server/Makefile
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100000 && ${OSVERSION} < 1100507
to
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000 && ${OSVERSION} < 1200507

4.
Install teamspeak :)

This should allow you to update server version if you have older jails etc..

** FOR 2018 INSTALL ON FreeNAS 11X **

Ensure your using newest jail templates. I created a standard jail structure (I use 1 app / jail) however the "plugin" structure may work aswell.. Ensure your jail is updated/upgraded before proceeding. If you get a "Ports Collection Support error see https://forums.freenas.org/index.ph...ort-for-your-freebsd-version-has-ended.59492/ .. Add "ALLOW_UNSUPPORTED_SYSTEM=yes" to /etc/make.conf (inside of your ts3 jail!) and this will allow your installation to proceed. It should be a very quick install as I believe it uses the pkg versus the port again. Enjoy
 
Last edited:

HolyK

Ninja Turtle
Moderator
Joined
May 26, 2011
Messages
653
Thanks for excellent guide!

Few points:
- For those running old 9.10.* FreeNAS -> You can create new Jail template by using Inage URL: http://download.freenas.org/jails/10/x64/freenas-pluginjail-10.3-RELEASE.tgz

- For the "Ports Collection support for your FreeBSD version has ended" -> Just setenv ALLOW_UNSUPPORTED_SYSTEM yes and you're good to go. No need to edit the make.conf.

- Step 4. (admin token) in the OP does not make sense since TS was not started yet. Move this bellow step 6 (start of TS)

- Step 7. (serverquery) - This was actually a fcking madness and took me three hours to figure it out!
-- In TS client -> Tools -> ServerQuery Login -> Generated credentials will NOT WORK for server query ! (Not even for your User which used the admin token - ID2)
-- Default "password" for "serveradmin" user DOES NOT WORK either
-- This is what you need to do:

Stop the TS server
service teamspeak stop

Add "serveradmin_password=<whatever>" to "/usr/local/etc/teamspeak/ts3server.ini" (created if does not exist). So like
echo "serveradmin_password=WhatAfKingMess" >> /usr/local/etc/teamspeak/ts3server.ini

Start TS server again
service teamspeak onestart

Open telnet by using the Jail IP and port 10011 and you can logon to serverquerry like this:
login client_login_name=serveradmin client_login_password=WhatAfKingMess
use sid=1

Now you can generate a new token for ServerQuery Aadmin
tokenadd tokentype=0 tokenid1=2 tokenid2=0

The user who uses the token will now have ServerQuery Admin rights (Red shield with "S" icon).

Copy the generated token and log-in to the TS server via standard client. Then "Permissions" -> "User Privilege Key" and use the key you generated.
Also you need logon credentials to be generated. So in TS client go to "Tools" -> "ServerQuery Login". Pick your username and confirm. It will generate a password for you. Write that down!

Now just stop the TS3 server and remove the "serveradmin_password=..." line from ts3server.ini (i assume you don't want the pwd stored in plaintext there)

Start the TS server again and you can now login to server query via your own user and generated password.
Also o i recommend to use YaTQA which is a nice GUI for TS3 ServerQuerry

// @obsodien : 4 years from your question but better later than never. ^^

- Step 9. (start/stop) - There is no "teamspeak3" service, only "teamspeak".

One more hint... if you want to change the port on which TS is running (get rid of the default one) then follow this:
- You will need sqlite3 so either install that pkg into jail or just use the one in FreeNAS (or at least i have it there - not sure if it is default or i installed it few years back)
So SSH to your FreeNAS and go to /mnt/<path_to_jail_storage>/<jail_name>/var/db/teamspeak
cd /mnt/redpool/jails/tspeak/var/db/teamspeak

Open the sqlite DB file
sqlite3 ts3server.sqlitedb

Change the port as desired (33333 as example)
update servers set server_port=33333 where server_id=1;

Start the TS server and test the new port :]
 
Last edited:

shiphtfour

Dabbler
Joined
Jan 21, 2013
Messages
26
Please excuse me being a complete noob at this with very little knowledge of FreeNAS, FreeBSD, networking, etc...

Anyway, I believe that I have successfully setup the TS3 jail using the instructions from the OP. My question is, how do I now access my TS3 server from my PC? Can anyone elaborate on the very first step "assigned a static IP and provided my gateway IP"? The default IPv4 address assigned does not seem to connect.

Perhaps it is not actually running properly? I checked the TS log and this is what I got:

Code:
2018-11-26 17:30:22.654095|INFO	|ServerLibPriv |   |TeamSpeak 3 Server 3.5.0 (2018-10-26 06:48:07)
2018-11-26 17:30:22.654266|INFO	|ServerLibPriv |   |SystemInformation: FreeBSD 11.1-STABLE FreeBSD 11.1-STABLE #0 r321665+e0c4ca60dfc(freenas/11.1-stable): Wed May 30 14:18:20 EDT 2018	 root@nemesis.tn.ixsystems.com:/freenas-11-releng/freenas/_BE/objs/freenas-11-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64 Binary: 64bit
2018-11-26 17:30:22.654328|WARNING |ServerLibPriv |   |The system locale is set to "C" this can cause unexpected behavior. We advice you to repair your locale!
2018-11-26 17:30:22.654593|INFO	|DatabaseQuery |   |dbPlugin name:	SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2018-11-26 17:30:22.654638|INFO	|DatabaseQuery |   |dbPlugin version: 3.11.1
2018-11-26 17:30:22.657489|ERROR   |DatabaseQuery |   |db_connect() failed unable to open database file
2018-11-26 17:30:22.657544|CRITICAL|ServerLibPriv |   |Server() DatabaseError out of memory


Edit: Editing permissions for the overall jail fixed the issue, so I have the server up and running and am now able to connect. Thank you for the guide!
 
Last edited:

Skro

Contributor
Joined
Jun 26, 2018
Messages
100
Thank you @HolyK for figuring out the server query instructions, that was the one thing keeping me from moving my TS3 server to my NAS.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Code:
FO    |ServerLibPriv |   |TeamSpeak 3 Server 3.3.0 (2018-07-31 16:10:01)       
   |ServerLibPriv |   |SystemInformation: FreeBSD 11.1-STABLE FreeBSD 11.1-STABL
NG |ServerLibPriv |   |The system locale is set to "C" this can cause unexpected
   |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak
   |DatabaseQuery |   |dbPlugin version: 3.11.1                                 
   |DatabaseQuery |   |checking database integrity (may take a while)           
NG |Accounting    |   |Unable to open /usr/local/etc/teamspeak/licensekey.dat, f
CAL|Accounting    |   |Failed loading default license file! 


If anybody gets a random license error its time to upgrade server side.
 

shiphtfour

Dabbler
Joined
Jan 21, 2013
Messages
26
Code:
FO    |ServerLibPriv |   |TeamSpeak 3 Server 3.3.0 (2018-07-31 16:10:01)     
   |ServerLibPriv |   |SystemInformation: FreeBSD 11.1-STABLE FreeBSD 11.1-STABL
NG |ServerLibPriv |   |The system locale is set to "C" this can cause unexpected
   |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak
   |DatabaseQuery |   |dbPlugin version: 3.11.1                               
   |DatabaseQuery |   |checking database integrity (may take a while)         
NG |Accounting    |   |Unable to open /usr/local/etc/teamspeak/licensekey.dat, f
CAL|Accounting    |   |Failed loading default license file! 


If anybody gets a random license error its time to upgrade server side.

Drove me mad last night trying to figure out why I could not connect to my server when literally nothing had changed since the last time I connected. If it helps anyone out at all, here is how I updated:

Code:
cd /usr/ports/ports-mgmt/portmaster
make install clean
cd ..
cd ..
cd ..
cd ..
portsnap fetch update
portmaster teamspeak3-server
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
I also had the same permission issue as shiphtfour. I lost my server side settings on the "upgrade" looks like im going to have to rewrite this guide eventually.. It's important to backup those keyfiles before making changes! The entire licensing fiasco is a good reason to use open source software..

Edit: Now on the client side I see I can't open options on either Windows/Ubuntu.. I did have custom layouts/plugins it might be complaining.. Clients are 3.3.0 series. Server is 3.8.0.. Possible bug to be aware of going forward..
 
Last edited:

youfyouk

Cadet
Joined
Nov 13, 2019
Messages
1
Hello experts,

i hope u can help me. I have install xigmanas -> TheBrig -> Jail -> TS3
All the steps are fine, but when i start
Code:
root@TS3:/usr/ports/audio/teamspeak3-server # service teamspeak start
Starting teamspeak.
root@TS3:/usr/ports/audio/teamspeak3-server # service teamspeak status
teamspeak is not running.
root@TS3:/usr/ports/audio/teamspeak3-server # cd /var/log/teamspeak/
root@TS3:/var/log/teamspeak # ls
ts3server_2019-11-12__14_55_02.840023_0.log
ts3server_2019-11-12__19_49_42.999140_0.log
ts3server_2019-11-13__11_31_18.628721_0.log
ts3server_2019-11-13__11_47_17.508483_0.log
root@TS3:/var/log/teamspeak # cat ts3server_2019-11-13__11_47_17.508483_0.log
2019-11-13 11:47:17.508515|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.9.1 (2019-07-02 13:17:23)
2019-11-13 11:47:17.508742|INFO    |ServerLibPriv |   |SystemInformation: FreeBSD 12.0-RELEASE-p10 FreeBSD 12.0-RELEASE-p10 #0 r352547M: Fri Sep 20 04:56:20 CEST 2019     root@dev.xigmanas.com:/usr/obj/xigmanas/usr/src/amd64.amd64/sys/XIGMANAS-amd64 amd64 Binary: 64bit
2019-11-13 11:47:17.508825|WARNING |ServerLibPriv |   |The system locale is set to "C" this can cause unexpected behavior. We advice you to repair your locale!
2019-11-13 11:47:17.509290|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2019-11-13 11:47:17.509342|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
2019-11-13 11:47:17.509686|INFO    |DatabaseQuery |   |checking database integrity (may take a while)
2019-11-13 11:47:17.570838|WARNING |Accounting    |   |Unable to open /usr/local/etc/teamspeak/licensekey.dat, falling back to limited functionality
2019-11-13 11:47:17.571098|INFO    |Accounting    |   |Licensing Information
2019-11-13 11:47:17.571151|INFO    |Accounting    |   |licensed to       : Anonymous
2019-11-13 11:47:17.571194|INFO    |Accounting    |   |type              : No License
2019-11-13 11:47:17.571361|INFO    |Accounting    |   |starting date     : Tue Jan  1 00:00:00 2019
2019-11-13 11:47:17.571410|INFO    |Accounting    |   |ending date       : Fri Jan 31 00:00:00 2020
2019-11-13 11:47:17.571431|INFO    |Accounting    |   |max virtualservers: 1
2019-11-13 11:47:17.571467|INFO    |Accounting    |   |max slots         : 32
2019-11-13 11:47:18.408172|INFO    |              |   |myTeamSpeak identifier revocation list was downloaded successfully - all related features are activated
2019-11-13 11:47:18.529363|INFO    |              |   |Puzzle precompute time: 896
2019-11-13 11:47:18.530192|ERROR   |FileManager   |   |bind failed on [::]:30033; reason: Protocol not supported
2019-11-13 11:47:18.530269|ERROR   |FileManager   |   |filetransfer bind failed on :::30033; reason: Protocol not supported
2019-11-13 11:47:18.530323|CRITICAL|VirtualSvrMgr |   |Could not start file manager 258 no network port available


im understand the last 3 error lines, what can/should i do?

My System
xigmanas 12.0.0.4 - Reticulus (Revision 6928)
FreeBSD 12.0-RELEASE-p10 #0 r352547M: Fri Sep 20 04:56:20 CEST 2019

thx for help
 

Spencer Myers

Dabbler
Joined
Sep 30, 2016
Messages
20
I ended up getting the same error as youfyouk. I tried everything and couldn't get it to actually start using these instructions. From what I understand, the issue is that the TS install is trying to use ipv6 protocols and can't route the voice or file transfer protocols and thinks those ports just don't exist. I ended up grabbing the FreeBSD download from the Teamspeak site and putting the extracted file into the root of the jail and did the steps below.

chmod 755 ts3server and ts3server_startscript.sh
./ts3server createinifile=1
Copy the admin code for later use

edit ts3server.ini
voice ip=0.0.0.0
filetransfer ip=0.0.0.0

./ts3server_startscript.sh
Copy the server admin code for use in TS

Teamspeak server should start, using port 9987. I still can't figure out how to get a rc.d script running to use the .sh to autoload Teamspeak when the jail restarts. I'm still a noob when it comes to FreeNas, so if anyone out there has a simple rc.d script to point to that .sh it would be much appreciated!
 

HolyK

Ninja Turtle
Moderator
Joined
May 26, 2011
Messages
653
This guide is obsolete. Please see new Resource for actual guide
 
Status
Not open for further replies.
Top