Kroni Survival is a Minecraft server deployment solution that provides:
- AWS Lightsail instance (4 vCPU, 4GB RAM) in Singapore region
- Docker-based Minecraft server with cracked client support
- Persistent storage for world data
- Automated backups (S3 and Lightsail snapshots)
- Monitoring via CloudWatch and Grafana
- Discord notifications for server events
- AWS Lightsail Instance with Docker
- Minecraft Server (with cracked client support)
- Persistent Storage with Lightsail Block Storage
- Automated Backups:
- Lightsail snapshots (biweekly)
- S3 backups
- Discord Notifications for backups and monitoring
- Prefect Workflows for server monitoring and backup automation
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ You & Friends โ
โ (Singapore) โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Lightsail Firewall โ
โ - Port 25565 (MC) โ
โ - Port 22 (optional SSH) โ
โ - Port 4200 (Prefect UI) โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Lightsail Instance โ
โ - 2vCPU, 2GB RAM (small_3_0) โ
โ - Docker โ
โ - Minecraft Container โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Lightsail Block Storage โ
โ - Mounted to /data โ
โ - World stored at /data/world โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Automation & Monitoring โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Prefect (DAG) โ โ GitHub Actions (CI/CD) โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Cron Jobs (Snapshots + S3 backup scripts) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ CloudWatch Agent โ Grafana Cloud Dashboard โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Terraform (v1.0.0+)
- AWS CLI configured with appropriate credentials
- SSH key pair registered with AWS Lightsail
- S3 bucket for Terraform state (optional but recommended)
prefect/ โ โโโ snapshot_flow.py # Prefect workflow for backups โโโ .github/ โ โโโ workflows/ โ โโโ terraform.yml # GitHub Actions workflow โโโ README.md # Project documentation โโโ .env.example # Example environment variables
- Discord webhook URL (for notification)
This repository contains a Prefect-based monitoring system for Minecraft servers running on AWS EC2. The system:
- Checks if the Minecraft server is running
- Collects system metrics (CPU, memory, disk usage)
- Measures world size growth
- Sends notifications to Discord
For detailed setup and usage instructions, see prefect/README.md.
For a guided setup process, use the quick setup script:
cd prefect
./quick_setup.shOr for manual setup:
# Set up SSH authentication
cd prefect/bin
./setup_ec2_auth.sh <path_to_key.pem> <ec2_ip> ec2-user
# Deploy the monitoring flow
./deploy_monitoring.sh-
Clone this repository:
git clone https://github.com/yourusername/minecraft-server-on-aws.git cd minecraft-server-on-aws -
Create a copy of
.env.exampleas.envand fill in your settings:cp .env.example .env # Edit .env with your preferred text editor -
Initialize Terraform:
cd terraform terraform init
-
Review the Terraform plan:
terraform plan
-
Apply the configuration:
terraform apply
-
Once deployed, Terraform will output the server IP address and other important information.
Connect to the server using the IP address from the Terraform output and port 25565.
Two types of backups are configured:
- S3 Backups: Daily tar-compressed world data
- Lightsail Snapshots: Biweekly snapshots of both instance and data volume
To manually trigger a backup:
ssh ec2-user@<server-ip>
sudo /opt/kroni-survival/scripts/backup-to-s3.shTo restore from an S3 backup:
# Instructions for restoration will be added๐ Monitoring The system includes a Prefect dashboard for monitoring server status and scheduled tasks:
Prefect UI: Access at http://your-server-ip:4200 CloudWatch Metrics: View in AWS Console or Grafana dashboard Discord Notifications: Regular updates on server health and backups
ssh ec2-user@<server-ip>
sudo docker stop minecraft-serverssh ec2-user@<server-ip>
sudo docker start minecraft-serverssh ec2-user@<server-ip>
sudo docker logs minecraft-server- AWS Lightsail micro_2_0: ~$5/month
- Block Storage (20GB): ~$2/month
- S3 Storage for backups: Varies based on world size
- Data Transfer: Varies based on player count
This project is licensed under the MIT License - see the LICENSE file for details.
- itzg/minecraft-server Docker image
- Prefect for workflow automation
- Terraform for infrastructure as code
