I have a few personal VPS servers which I run and have purchased through DigitalOcean, one of my VPS servers act as a mail server at present, it runs Ubuntu Server 12.04 with Postfix, Dovecot, ViMbAdmin and some SPAM busting tools, I’ve decided that as I frequently work on projects with others online and normally generates a whole load of emails when all you really need to do is jump on Skype… However, Skype is great but sometimes its nice to have your own VOIP solution which you personally host and means that you can have multiple chat participants without much hassle!
As my mail server VPS has more than enough system resources I decided to turn it into a unified communications server (running both Emails and VOIP) so for my VOIP solution I’ll be hosting Teamspeak 3 server of which I can then not only use to communicate and hold ‘group meetings’ with guys that I work on open-source projects with but also can use with my brother and friends when we get online and hit up some Battlefield 3!
So this is a very quick guide that assumes you are using Ubuntu Server 12.04 LTS (this should work fine on other versions of Ubuntu too though), lets begin…
First of all you’ll need to login to your server, now lets begin by downloading the latest version of the Linux Teamspeak server:-
Ok, so now lets extract the contents of the downloaded archive like so:-
tar xzf teamspeak3-server_linux-amd64-18.104.22.168.tar.gz
Next we’ll create a user account of which Teamspeak will run under on our server, we’ll simply use ‘teamspeak3’ as the username and disable the ability for a user to login to the server with this account (in effect making it a ‘local daemon account’ only)
sudo adduser --disabled-login teamspeak3
Perfect! – Lets now move the Teamspeak binaries and configuration files into it’s new home, we’ll place these under /usr/local/teamspeak3…
sudo mv teamspeak3-server_linux-amd64 /usr/local/teamspeak3
…and change the ownership to our ‘teamspeak3’ user that we set up a few minutes ago…
sudo chown -R teamspeak3 /usr/local/teamspeak3
Fantastic, we are now very nearly done! – The last thing that we should do is to get Teamspeak to start on ‘boot up’ so first we will create a symlink (symbolic link) to the default init script that is included in the download archive:-
sudo ln -s /usr/local/teamspeak3/ts3server_startscript.sh /etc/init.d/teamspeak3
and now we set it to start on system boot up like so…
sudo update-rc.d teamspeak3 defaults
Here we go… we will now start the Teamspeak 3 server for the first time…
sudo service teamspeak3 start
Woohoo, you now have a Teamspeak 3 server up and running and as long as you’ve not got a firewall running you should now be able to connect to this server using your server’s hostname or IP address! (If you are running IPTables see my extended instructions below!)
Just before you get carried away though, you should be shown a screen as follows:-
This screen is very important, the screen text makes is obviously as to why you need these details so I won’t go into too much depth but make sure you make a note of the settings so you can administer your TS3 server from your TS3 client!
Adding firewall rules for IPTables
If you have a firewall installed you’ll need to enable a few ports, if you are running IPtables on your server the rules required are as follows:-
-A INPUT -p udp --dport 9987 -j ACCEPT -A INPUT -p udp --sport 9987 -j ACCEPT -A INPUT -p tcp --dport 30033 -j ACCEPT -A INPUT -p tcp --sport 30033 -j ACCEPT -A INPUT -p tcp --dport 10011 -j ACCEPT -A INPUT -p tcp --sport 10011 -j ACCEPT
So anyway, this is a great solution if you want to run your own hosted VOIP solution for gaming or group chats etc, I hope you have found this post useful!