BLACKISH DEV BLOG Support
 

 

Host a TNet server on Amazon EC2

Amazon lets you run your own server in the cloud for very little money (for free even, in your first year – later on it will cost you about $15-20 per month for a t2.micro instance). Let me introduce you to the Elasic Compute Cloud, also known as EC2. You just open up a server instance from their website (they call it the AWS Management Console), connect to it via Remote Desktop (on Windows, Mac, Android, iOS, etc.), launch your TNet server and… keep it running. While you disconnect and worry about other things.

Here’s how to do it:

  • Sign up to Amazon Web Services and EC2 if you haven’t (it’s free to sign up, you only pay for what you use)
  • Log into the AWS Mangement Console and navigate to EC2
  • Start a new instance: Windows server 2012 R2 Base > t2.micro instance and make sure you open the TCP and UDP ports you want to use – per default TNet uses tcp 5127 and udp 5128-5129, though you might want to use tcp for the last one. ah, just open both. (Follow the tutorial here, add Rules for TCP/UDP under “6. Configure Security Group” – or you can always change these later on by going to Security Groups, select the group and click edit on the bottom)
  • Follow these steps to connect to your server and transfer your files onto it
  • Open the Server Manager Application and click “Add Roles and Features“, select your server, go to “Features“, select “.NET Framework 3.5” and install it
  • Open the Windows Firewall and add rules for the tcp and udp ports you want to use to Inbound Rules (Right-click on “Inbound Rules”, then select “New Rule…”) – Reminder: Make sure you always open everything in two places, here and in the EC2 security group in the AWS Management Console!
  • Start your headless TNet server by running TNServer.exe (or better yet, write a .bat-file to start it up with your custom ports)

You can now connect to your very own server! (Note down the IP of your server in the AWS Management Console)

Bonus Points:

  • Use an Elastic IP. “Elasic IP” is Amazon-talk for a fixed IP address that you can associate with your instance so it will always have the same IP address instead of getting a new random one each time you shut down and restart your server. To do this, go to Elastic IP in your EC2 Dashboard, click Allocate new Address, select it and click Associate Address, click on the instance field and select your instance. Save and Done!
  • Install Dropbox on your instance for easy file-syncing (best do selective sync with one folder as not to blow your Elastic Block Store Volume)
  • Install a decent browser. Use IE only to download Chrome. Yes you have to click through 20 warnings to get there and enable File Downloads in the Security Settings. Install it and never look at IE ever again.
  • Do more with your instance! Install a XAMPP webserver so you can use PHP/MySQL to store some player data – highscores, whatever (I’ve installed Komodo Edit and do my web-development right there on the server via Remote Desktop, but you could just as well do File > Open > Remote File… in Komodo to edit the files on your server via FTP on your machine – just set up the ftp server included in XAMPP)
  • Go tell your friends you’re now running a t2.micro instance on AWS EC2 with a 30 GiB SSD EBS Volume supporting 90 IOPS.

Google and Microsoft offer similar services with Compute Engine and Azure respectively. If you have tried those, please let me know about your experiences – I’m very interested!

Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>