MineCraft and Amazon EC2 - 2 flavours that taste great together.
Me and the Kids love MineCraft but until recently have only ever played it in Single Player mode. I recently setup a multiplayer server on one of our machines but thought it would be nice to have a dedicated MineCraft server. I'm not going to put it on my walterhiggins.net server because I don't have Java installed on the server and MineCraft is a bit of a CPU hog. EC2 to the rescue.
Get yourself an Amazon Web Services account if you haven't already done so. If you're already an amazon customer this should be straightforward. Just go to aws.amazon.com
Go to the web-based EC2 admin console
Click the Launch Instance button.
Follow the instructions to create the Instance Basic 32-bit Amazon Linux AMI 2011.02.1 Beta and create a new Key-pair.
Connect to the instance using putty or ssh (It's a bit convoluted fro Windows users but easier on Linux) - You need to use the .pem file you downloaded when you created the key-pair in step 4.
At the instance's command prompt...
mkdir minecraft then
cd minecraft then
create a script called minecraft.sh with the following content...
#!/bin/sh cd /home/ec2-user/minecraft java -Xmx512m -Xms512m -jar minecraft_server.jar nogui
chmod a+x minecraft.sh
To have minecraft server process automatically start when the server is started or rebooted, add the following to /etc/rc.d/rc.local...
Make your server peaceful (don't spawn mobs) and give yourself ops (admin) privileges. Edit /home/ec2-user/minecraft/server.properties (if this file isn't present yet, then just start the minecraft server by executing minecraft.sh). Set
Reboot the instance and you're done. You now have a dedicated minecraft server you can turn off and on using Amazon's web-based EC2 console (you probably don't want it running constantly if it's for a small group - EC2 costs $0.085/hour).
I'm thinking of working this into something like an introduction to cloud computing for kids.
footnote 1: Amazon EC2 has come a long way since it first launched 5 years ago with just a handful of command-line tools. The web console is fantastic.
footnote 2 from Kyle Maxwell : you'll need to add a firewall rule (look under Network & Security > Security Groups) for Custom TCP Rule, entering 25565 for the Port Range so that the server will allow connections on the port the Minecraft server application users.