In the last few days a friend turned me on to www.digitalocean.com who is selling very simple VS (Virtual Servers) for as little as $5 a month. Just to get a feel for what these VS (a droplet in digital ocean parlance) are like to use I decided to setup a TeamSpeak 3 server for a quick trial run.
Update (9/14/2013) : The Teamspeak server running on a 512MB Droplet works great. I’ve only used it with 3 people at a time, so if anyone has some experience pushing the server harder please let me know how it worked out. Also I wanted to make clear that the current pricing for a 512MB Droplet is $5.00/Month OR $0.006/Hour, if you want to keep your price really low you can setup the server, shut down the droplet, take a snapshot and destroy the droplet. You won’t be charged for keeping an image and you can spin up the server based on the image whenever you need to run it. If you had it up and running 20Hours/Week it would cost ~ 80 * $0.07 = $0.50/month! Pretty slick & super cheap Teamspeak server!
Setting Up a Droplet
Setting up a droplet is extremely simple (which is a good thing since that’s the whole point of the service) and starting at $5/month is the most inexpensive virtual server service I have used. Signing up is a snap, just go to https://www.digitalocean.com/ (my referral link) click signup and enter your information.
Once your account is setup, you simply login and:
- Click on the “CREATE” button
- Enter a Hostname
- Select Size, I selected the smallest available droplet for this test run (512MB/1CPU 20GB SSD 1TB Transfer)
- Select Image – Under the “Linux Distribution” tab I selected the latest 64 bit CentOS simply because this is what I’ve been using (CentOS 6.4 x64)
- Click “Create Droplet” button
That’s it! Amazingly simple – in less than a minute the droplet is up and running. Digital Ocean will send you an e-mail with the initial root user name and password for the droplet.
Installing TeamSpeak 3 (3.0.8)
Although this has been covered many times before in other places (http://www.youtube.com/watch?v=xECUS8dEmLQ), I’m covering my process just to be thorough in my review of doing this on a droplet.
Check your mail for the new droplet e-mail which will contain the droplet IP and root credentials. I’ll be using putty to ssh to my newly created droplet.
login as: root root@192.168.1.20's password: [root@Testing ~]#
First things first, change the root password.
[root@Testing teamspeak3-server_linux-amd64]# passwd Changing password for user root. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@Testing teamspeak3-server_linux-amd64]#
Create a user to run the TeamSpeak server.
[root@Testing teamspeak3-server_linux-amd64]# adduser teamspeak [root@Testing teamspeak3-server_linux-amd64]# passwd teamspeak Changing password for user teamspeak. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@Testing teamspeak3-server_linux-amd64]#
Switch to the teamspeak user:
[root@Testing teamspeak3-server_linux-amd64]# su teamspeak
Switch to the teamspeak user’s home directory:
[teamspeak@Testing teamspeak3-server_linux-amd64]$ cd /home/teamspeak
Find the download link for the 64 bit Linux server (see http://www.teamspeak.com/?page=downloads), at the time of this article I see “Server amd64 3.0.8” available at http://files.teamspeak-services.com/releases/3.0.8/teamspeak3-server_linux-amd64-3.0.8.tar.gz.
Armed with this information we can download the file directly onto the droplet using wget:
[teamspeak@Testing ~]$ pwd /home/teamspeak [teamspeak@Testing ~]$ wget http://files.teamspeak-services.com/releases/3.0.8/teamspeak3-server_linux-amd64-3.0.8.tar.gz --2013-09-08 21:32:57-- http://files.teamspeak-services.com/releases/3.0.8/teamspeak3-server_linux-amd64-3.0.8.tar.gz Resolving files.teamspeak-services.com... 108.162.198.192, 108.162.199.192, 2400:cb00:2048:1::6ca2:c6c0, ... Connecting to files.teamspeak-services.com|108.162.198.192|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7156063 (6.8M) [application/x-tar] Saving to: `teamspeak3-server_linux-amd64-3.0.8.tar.gz' 100{80e463235c561985fcb9d065cb7af58becf1df7010d7a45bb4eb7315e5a8b304}[==============================================================================================================================>] 7,156,063 --.-K/s in 0.1s 2013-09-08 21:32:58 (58.2 MB/s) - `teamspeak3-server_linux-amd64-3.0.8.tar.gz' saved [7156063/7156063] [teamspeak@Testing ~]$
I can’t help but notice that the download reached 58.2 MB/s, that’s mighty fast for a $5 VS!
Unpack the downloaded file:
[teamspeak@Testing ~]$ tar -xf teamspeak3-server_linux-amd64-3.0.8.tar.gz [teamspeak@Testing ~]$
Check that the files are there:
[teamspeak@Testing ~]$ ls -la total 7020 drwx------ 3 teamspeak teamspeak 4096 Sep 8 22:27 . drwxr-xr-x 3 root root 4096 Sep 8 17:48 .. -rw------- 1 teamspeak teamspeak 180 Sep 8 21:10 .bash_history -rw-r--r-- 1 teamspeak teamspeak 18 Jul 18 13:19 .bash_logout -rw-r--r-- 1 teamspeak teamspeak 176 Jul 18 13:19 .bash_profile -rw-r--r-- 1 teamspeak teamspeak 124 Jul 18 13:19 .bashrc drwxr-xr-x 7 teamspeak teamspeak 4096 Aug 5 13:06 teamspeak3-server_linux-amd64 -rw-rw-r-- 1 teamspeak teamspeak 7156063 Aug 29 08:57 teamspeak3-server_linux-amd64-3.0.8.tar.gz [teamspeak@Testing ~]$ cd teamspeak3-server_linux-amd64 [teamspeak@Testing teamspeak3-server_linux-amd64]$ ls -la total 15928 drwxr-xr-x 7 teamspeak teamspeak 4096 Aug 5 13:06 . drwx------ 3 teamspeak teamspeak 4096 Sep 8 22:27 .. -rw-r--r-- 1 teamspeak teamspeak 40918 Aug 5 13:06 CHANGELOG -rw-r--r-- 1 teamspeak teamspeak 23854 Aug 5 13:06 LICENSE drwxr-xr-x 2 teamspeak teamspeak 4096 Aug 5 13:06 doc -rwxr-xr-x 1 teamspeak teamspeak 4764140 Aug 5 13:06 libts3db_mysql.so -rwxr-xr-x 1 teamspeak teamspeak 5675839 Aug 5 13:06 libts3db_sqlite3.so drwxr-xr-x 2 teamspeak teamspeak 4096 Aug 5 13:06 redistributables drwxr-xr-x 2 teamspeak teamspeak 4096 Aug 5 13:06 serverquerydocs drwxr-xr-x 4 teamspeak teamspeak 4096 Aug 5 13:06 sql -rwxr-xr-x 1 teamspeak teamspeak 5760128 Aug 5 13:06 ts3server_linux_amd64 -rwxr-xr-x 1 teamspeak teamspeak 1192 Aug 5 13:06 ts3server_minimal_runscript.sh -rwxr-xr-x 1 teamspeak teamspeak 3728 Aug 5 13:06 ts3server_startscript.sh drwxr-xr-x 2 teamspeak teamspeak 4096 Aug 5 13:06 tsdns [teamspeak@Testing teamspeak3-server_linux-amd64]$
Now we will create the TeamSpeak ini file:
[teamspeak@Testing teamspeak3-server_linux-amd64]$ ./ts3server_minimal_runscript.sh createinifile=1 2013-09-09 01:34:54.320374|INFO |ServerLibPriv | | TeamSpeak 3 Server 3.0.8 (2013-08-05 13:00:22) 2013-09-09 01:34:54.320561|INFO |ServerLibPriv | | SystemInformation: Linux 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 Binary: 64bit 2013-09-09 01:34:54.322243|INFO |DatabaseQuery | | dbPlugin name: SQLite3 plugin, Version 2, (c)TeamSpeak Systems GmbH 2013-09-09 01:34:54.322310|INFO |DatabaseQuery | | dbPlugin version: 3.7.3 2013-09-09 01:34:54.323519|INFO |DatabaseQuery | | checking database integrity (may take a while) 2013-09-09 01:34:54.343314|INFO |SQL | | db_CreateTables() tables created ------------------------------------------------------------------ I M P O R T A N T ------------------------------------------------------------------ Server Query Admin Account created loginname= "serveradmin", password= "A356W6de" ------------------------------------------------------------------ 2013-09-09 01:34:54.511849|WARNING |Accounting | | Unable to find valid license key, falling back to limited functionality 2013-09-09 01:34:56.103807|INFO | | | Puzzle precompute time: 1582 2013-09-09 01:34:56.104455|INFO |FileManager | | listening on 0.0.0.0:30033 2013-09-09 01:34:56.108567|INFO |VirtualSvrMgr | | executing monthly interval 2013-09-09 01:34:56.108721|INFO |VirtualSvrMgr | | reset virtualserver traffic statistics 2013-09-09 01:34:56.265592|INFO |VirtualServer | 1| listening on 0.0.0.0:9987 2013-09-09 01:34:56.266005|INFO |VirtualServer | 1| client 'server'(id:0) added privilege key for servergroup 'Server Admin'(id:6) 2013-09-09 01:34:56.266037|WARNING |VirtualServer | 1| -------------------------------------------------------- 2013-09-09 01:34:56.266055|WARNING |VirtualServer | 1| ServerAdmin privilege key created, please use the line below 2013-09-09 01:34:56.266072|WARNING |VirtualServer | 1| token=RIq434weeTtkx8512Uussdf3LjIQYB4zTBcpfsI 2013-09-09 01:34:56.266089|WARNING |VirtualServer | 1| -------------------------------------------------------- ------------------------------------------------------------------ I M P O R T A N T ------------------------------------------------------------------ ServerAdmin privilege key created, please use it to gain serveradmin rights for your virtualserver. please also check the doc/privilegekey_guide.txt for details. token=qwertyQweRTY12345AsSFEWG35!t5n6432535432 ------------------------------------------------------------------ 2013-09-09 01:34:56.275439|INFO |CIDRManager | | updated query_ip_whitelist ips: 127.0.0.1, 2013-09-09 01:34:56.276085|INFO |Query | | listening on 0.0.0.0:10011
Copy and store the token.
Ctrl-c to exit the script
^C2013-09-09 01:38:26.988011|INFO |ServerMain | | Received signal SIGINT, shutting down. 2013-09-09 01:38:27.038525|INFO |VirtualServer | 1| stopped
Edit the ts3server.ini
[teamspeak@Testing teamspeak3-server_linux-amd64]$ pwd /home/teamspeak/teamspeak3-server_linux-amd64 [teamspeak@Testing teamspeak3-server_linux-amd64]$ vi ts3server.ini
ts3server.ini
machine_id=1 default_voice_port=9987 voice_ip=192.168.1.20 licensepath= filetransfer_port=30033 filetransfer_ip=192.168.1.20 query_port=10011 query_ip=192.168.1.20 query_ip_whitelist=query_ip_whitelist.txt query_ip_blacklist=query_ip_blacklist.txt dbplugin=ts3db_sqlite3 dbpluginparameter= dbsqlpath=sql/ dbsqlcreatepath=create_sqlite/ dbconnections=10 logpath=logs logquerycommands=0 dbclientkeepdays=30 logappend=0 query_skipbruteforcecheck=0
Create startup file:
[teamspeak@Testing init.d]$ su root Password: [root@Testing init.d]# vi /etc/rc.d/init.d/teamspeak
The file contents
#!/bin/sh # chkconfig: 2345 99 10 USER="teamspeak" TS3='/home/teamspeak/teamspeak3-server_linux-amd64' STARTSCRIPT="$TS3/ts3server_startscript.sh" cd $TS3 case "$1" in 'start') su $USER -c "$STARTSCRIPT start" ;; 'stop') su $USER -c "$STARTSCRIPT stop" ;; 'restart') su $USER -c "$STARTSCRIPT restart" ;; 'status') su $USER -c "$STARTSCRIPT status" ;; *) echo "Usage $0 start|stop|restart|status" esac
Set permissions:
[root@Testing init.d]# chmod 755 /etc/rc.d/init.d/teamspeak [root@Testing init.d]#
2 commands to setup auto run & reboot the server:
[root@Testing teamspeak3-server_linux-amd64]# chkconfig --add teamspeak [root@Testing teamspeak3-server_linux-amd64]# chkconfig --level 2345 teamspeak on [root@Testing teamspeak3-server_linux-amd64]# reboot [root@Testing teamspeak3-server_linux-amd64]# Broadcast message from root@Testing (/dev/pts/0) at 2:46 ... The system is going down for reboot NOW!
When the server comes back up, log on and check the status:
login as: root root@192.241.221.11's password: Last login: Mon Sep 9 02:47:56 2013 from c-72-145-226-187.hsd4.ga.comcast.net [root@Testing ~]# service teamspeak status Server is running [root@Testing ~]#
That’s it, now you can connect with a TeamSpeak client. Each time you reboot the server the TeamSpeak service will automatically start. I’m currently connected to this one with a Windows 64 3.0.11.1 client and all is well. There was no need to create exceptions for iptables, it is just up and running! After I’ve had a chance to evaluate the performance I will update this post.
I haven’t seen a cheaper way to have a dedicate TeamSpeak server, let alone a generic standalone VS. This appears to be a pretty great service at first glance and I’m guessing I’ll be posting more about this service.
Thanks for putting this guide together. I was having a hard time getting TS3 to work on Centos, but you’re post was super easy to follow and now it is working. It seems like the other guides are cumbersome. So, thanks again!
How many slots you think a standard $5 droplet will host? 50?
I’m unsure, I would like know if anyone does some testing!
I have one $5 running with 100 people online, no problem at all. Only 0.5{80e463235c561985fcb9d065cb7af58becf1df7010d7a45bb4eb7315e5a8b304} packet loss.