Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Server on AWS EC2

Background

This project automates the setup of a Minecraft server on AWS EC2. Terraform provisions the EC2 instance and security group, and Ansible configures the server by installing Java, downloading Minecraft, and setting up a systemd service so the server auto-starts on reboot.

Requirements

  • Terraform
  • Ansible
  • AWS CLI
  • An AWS key pair .pem
  • AWS credentials in ~/.aws/credentials
  • Your key pair name set in terraform.tfvars:
key_name = "myKeyPair"

Pipeline Diagram

Terraform --> EC2 Instance --> Ansible --> Minecraft Server Running (provision) (boots up) (configure) (port 25565, auto-start)

Commands

Initialize and apply everything with the setup script:

./setup.sh

This runs Terraform to create the instance, waits for it to boot, then runs the Ansible playbook to install and configure the Minecraft server automatically.

Connecting to the Server

Once the script finishes, verify the server is up:

nmap -sV -Pn -p T:25565 <public_ip>

To connect with the Minecraft client, open Minecraft Java Edition, go to Multiplayer, click Add Server, and enter the public IP that the setup script outputs.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages