Skip to content

Instantly share code, notes, and snippets.

@johnnyjung
Created May 21, 2012 02:05
Show Gist options
  • Save johnnyjung/2760268 to your computer and use it in GitHub Desktop.
Save johnnyjung/2760268 to your computer and use it in GitHub Desktop.
Minecraft EC2 Server Setup
Instructions to setup a Minecraft server on an Amazon EC2 Micro instance
1. Go to instances, launch instance.
2. Select classic wizard, 32-bit Amazon Linux AMI, Micro instance type.
3. Set up key pair
4. Create new TCP rule and add 22, 25565
5. Launch instance
6. Go to elastic ips, and allocate/associate a new address
7. ssh ec2-user@[ip address]
8. sudo yum update
9. mkdir minecraft
10. cd minecraft
11. wget http://www.minecraft.net/download/minecraft_server.jar
sudo java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
- use larger values for larger server
java -Xmx2G -Xms2G -jar minecraft_server.jar
12. create login script
#!/bin/sh
cd /home/ec2-user/minecraft
java -Xmx512m -Xms512m -jar minecraft_server.jar nogui
13. chmod a+x minecraft.sh
14. add the following to /etc/rc.local
sh /home/ec2-user/minecraft/minecraft.sh
15. reboot and enjoy
16. login using elastic ip address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment