How to Install TeamSpeak 3 Server Into A Jail

Status
Not open for further replies.

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
//MOD EDIT: This guide is obsolete. Please see new Resource for actual guide

Hello everybody, (See Page 6 for 2018 Instructions)

I was playing Age Of Empires with some friends and thought it would be nice to have a dedicated TeamSpeak server so we could all chat. This is a quick run down. It will require you understand the basics of jails & jail creation from GUI. Installation & compilation without pkgng as their is no package avail due to the nature of the software. References can be found in the FreeNAS documentation http://doc.freenas.org/ It will also require you understand computer networking such as opening ports if you desire the outside world get in. I did the following to install TeamSpeak 3 Server inside of a port jail and to allow friends to connect.

NOTE: JAIL MUST BE ON 10X TEMPLATE TO WORK!! SEE JAIL & TEMPLATE GUI PAGES!!

1. Created “TS3” Jail 10X (port jail if applicable) and assigned a static IP and provided my gateway IP. Leave VIMAGE and standard jail options enabled as applicable.

2. Open a shell window (or SSH equivalent) access the "TS3" jail that was just created and perform the following:
Code:
#Update the pkg management system first
1. pkg update
2. pkg upgrade
#Then proceed with standard port directory setup
3. portsnap fetch
4. portsnap extract
5. portsnap fetch update  #[Should Be] Optional for an existing jail


This will download all the port directories.

3. From FreeNAS Documentation (Amended Example) - http://doc.freenas.org/index.php/Installing_non-PBI_Software#Compiling_FreeBSD_Ports_with_make

** You will still want to perform this inside of the TS3 Server Jail! SEE TEMPLATES & JAILS GUI PAGES!! **

To compile a port, you will cd into a sub-directory of /usr/ports/. Freshports provides the location to cd into and the make command to run. This example will compile the teamspeak3-server port:
Code:
cd /usr/ports/audio/teamspeak3-server
make install clean
Freshports - TS3 http://www.freshports.org/audio/teamspeak3-server/

This will start the compilation/installation! You will see a configuration build page (http://doc.freenas.org/index.php/File:Audiotag3.png) for TS3 & and afterwards it's associated dependencies. I proceeded with the default settings/documentation for all options.

4. ** NOTE ** When TS3 finishes installing, it will place one time use keys for admin login within the second TS3 log. (See /var/log/teamspeak after initial run)
Code:
ts3server_2016-02-19__11_26_23.145368_0.log << FIRST TS3 STANDARD LOG
ts3server_2016-02-19__11_26_23.145368_1.log <<ADMIN TOKEN


If not written down copied you will have to dig through TS3 initial log files to locate them. These keys are required in order to setup an initial user for administration of server. If you lose or otherwise use this token (or key) and get locked out you will have to then reset teamspeak server password to make administrative changes.

5. NOTE: FreeNAS 9.3.1 & TS3 Server 3.0.11.4 installed perfectly!! No modifications or permission overrides required!! The following section is now considered outdated!! FYI ONLY! Skip to #6!!
Code:
** FIXES (9.2.1.5/9.2.1.6 Install) **
#The following directories need to be created in order for the precmd start routine to run!!
#Run mkdir & chmod 777 as root..
/var/db/teamspeak
/var/log/teamspeak

6. Still within the TS3 Server Jail - Start TS3 Server once for testing purposes.
Code:
service teamspeak onestart


7. For administration and/or maintenance of the server I use the standard Windows TS3 client. I believe you may also use a telnet/ssh client with serverquery ( ** See This Post **)

Manually copy initial one time use keys / info from the TS3 log into your preferred client to obtain administrative privileges. (See /var/log/teamspeak after intial run)

8. To enable TS3 automatically on jail start-up add the appropriate entry to the TS3 Server Jail rc.conf.
Code:
#Add the following to autostart Teamspeak 3 Server
teamspeak_enable="YES"


9. You may now stop the teamspeak service started earlier and restart the TS3 Server Jail. The teamspeak server should now boot on start-up of the jail. Verify with "top" from shell.
Code:
top
service teamspeak3 stop
top
service teamspeak3 start
top


10. In order for people outside your LAN to access your TS3 server you will want to forward the following ports to the IP address of your FreeNAS *JAIL*!! See router documentation/guides on port forwarding for your specific hardware!! Note: Other ports may be required depending on your TS3 setup with licenses etc.

Note: UPNP enabled routers will allow a lot of auto configuration (can even be a security risk)!! Sometimes forwarding ports isn't even required.
Code:
TCP
10011,30033
UDP
9987


11. There are various re-directions and shortcuts one can use for inviting people!!!
Enjoy your new TS3 server!!

See yal,
 
Last edited by a moderator:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Of course, the only problem with this, is that Teamspeak blows chunks, and Mumble is vastly superior to it.

:)
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Mumble is open source.. Definitely worth looking into... TS was the only name I knew of.. Was quick and painless at least.. Not sure how to pull 1 specific port versus them all.. TS3 is atleast painless and relatively clean and simple..
 

Attachments

  • TS3.png
    TS3.png
    176.1 KB · Views: 1,696

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Mumble is in the FreeBSD ports, as well. The server, though, is called "murmur", not "mumble".

It's truly about a thousand times better than Teamspeak or Ventrilo.
 

chris pucknell

Explorer
Joined
Dec 9, 2013
Messages
51
i'd love to setup a mumble server on mine!

I'm guessing a lot of this guide could still be utilized... has anyone actually done this?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I compiled from ports, and set up, a mumble server (murmur) in FreeNAS about two months ago, just screwing around, and didn't have any problem with it, using 9.1.1.

But, I deleted it, since I already run a 24/7 Mumble server on a Windows box.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Let's keep this thread on topic with Teamspeak 3 please.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Most other software I looked at via freshports had a package that could be used.. TS3 was restricted it's why i grabbed all the ports and installed that way..
 

TheSmoker

Patron
Joined
Sep 19, 2012
Messages
225
If you dont want really complex stuff you can use umurmur from ports. Its the "micro" variant of murmurd and more lighter on resources.

Sent from my iPad using Tapatalk HD
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I already said it once.. this is a how-to guide for teamspeak. The next person that mentions Mumble will have a problem with me... If you want to discuss mumble please take it elsewhere.

Thank you.

Mgmt.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Teamspeak3-server has been updated as of March 14.. This should bring the server portion up to date fixing any security issues etc.. http://www.freshports.org/audio/teamspeak3-server/

3.0.10.1 on FreeBSD >> 3.0.10.3

** Enter TS3 Jail **

Code:
portsnap fetch update
 
cd /usr/ports/audio/teamspeak3-server/
 
make deinstall
make reinstall


Code:
root@tspeakjail:/ # pkg_info teamspeak3-server-3.0.10.3,1
Information for teamspeak3-server-3.0.10.3,1:
 
Comment:
Server side of the TeamSpeak group voice chat system
 
 
Description:
A proprietary software which allows groups of people to speak over
the Internet.  This port contains the TeamSpeak 3 server part.
 
No tsdns support available (yet). If you need it, extract & install yourself.
 
WWW: http://www.teamspeak.com


Edit - Thanks TS3 Port Maintainer! :)
 

Attachments

  • ts3up.png
    ts3up.png
    3.6 KB · Views: 1,402

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Code:
To enable the TeamSpeak server, set
 
  teamspeak_enable="YES"
 
in your /etc/rc.conf and then use it like any other service.
 
If you have a license file (licensekey.dat) and/or ts3server.ini,
put it into /usr/local/etc/teamspeak
 
To see the admin token after the first start, have a look
into the logs in /var/log/teamspeak
 
TeamSpeak DNS server (tsdns) is not handled by this port. If you
need id, please download and install it manually.
===> Correct pkg-plist sequence to create group(s) and user(s)
===>  Running ldconfig
/sbin/ldconfig -m /usr/local/lib/teamspeak/server
===>  Installing ldconfig configuration file
===>  Registering installation for teamspeak3-server-3.0.10.3,1
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/teamspeak_server
 
      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
/usr/local/etc/rc.d/teamspeak
 
      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
 
      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.teamspeak.com
 

Scareh

Contributor
Joined
Jul 31, 2012
Messages
182
i notice you do a deinstall/install.
Isn't there a way to update the port without uninstalling it? I presume you lose all the custom settings you have on the server this way?
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Settings should remain.. I tried to do it another way and it instructed to do the
Code:
make deinstall
make reinstall
 

obsodien

Dabbler
Joined
May 4, 2014
Messages
41
I've been able to install TeamSpeak without a hitch on my FreeNAS server. the only real issue i am running up against is in using YaTQA in order to manage the server itself. Something to do with access to run queries on the server. Now this may have to do with logging in under serveradmin, which i could not see where a password was provided..... Any ideas?
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
You will probably need serverquery I don't cover that as I use the standard windows client.. You may want to look at teamspeak forums or YaTQA resources for instructions..
 

obsodien

Dabbler
Joined
May 4, 2014
Messages
41
Had to remove and start the jail build process over, but now when i get the starting the teamspeak server command, i get the following:

root@teamspeak_1:/usr/ports/audio/teamspeak3-server # service teamspeak onestart
/usr/local/etc/rc.d/teamspeak: WARNING: /var/db/teamspeak is not a directory.
/usr/local/etc/rc.d/teamspeak: WARNING: failed precmd routine for teamspeak
root@teamspeak_1:/usr/ports/audio/teamspeak3-server #
I've been through the additional commands of make deinstall and make reinstall with the same results. and I get the same no matter how many times i try to create the jail....
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Well, what appears to be happening, is that teamspeak expects to find its database file in /var/db/teamspeak. And it's not. I would expect it to CREATE that directory and new database file if it needed it. Perhaps it has failed in doing so. Are any of the following wrong:

1) The proper "user" account (more than likely called 'teamspeak') doesn't exist?
2) There is some reason the teamspeak server daemon can't create those files (space or permissions issue)?

If you continue to have a problem, I'll try to install one myself and see if I see any gotchas.
 

obsodien

Dabbler
Joined
May 4, 2014
Messages
41
If i am understanding how Jails work, the user would be created within the jail itself rather than the main freenas user's? As far as space is concerned, i am down to 180GB left on the server, which is currently configured with 3 1TB hardrives, giving me 2TB for the system. I am looking at adding a final 1 TB in the near future....
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
The relationship of users to the FreeNAS appliance vs. users in the jails is somewhat convoluted and nuanced. But, yes, we would be talking about a user "in the jail". Now as I have never installed a TeamSpeak before on a FreeBSD, I'm just assuming it would do that (other similar programs certainly do that), and it would maintain a database file under that user (other similar programs certainly do that), and that there could/would be some permissions problems writing to the appropriate /var/db directory that you may have to manually set (other similar programs certainly have that issue).

I think what's going to happen is I'm going to have to install TeamSpeak, aren't I, to answer your question definitively. Lol.
 
Status
Not open for further replies.
Top