This repository contains the configuration and automation scripts for deploying a Minecraft server on Google Cloud Platform (GCP).
The primary goal was to architect a persistent, automated game server environment using Compute Engine. The setup ensures data durability through dedicated SSD storage and minimizes operational overhead using automated backup and lifecycle scripts.
- IaaS & Resource Provisioning: Configured a Compute Engine instance (e2-medium) with custom machine types and high-performance SSD Persistent Disks.
- Infrastructure Automation: Implemented Startup and Shutdown scripts via GCP Metadata to automate disk mounting and graceful application termination.
- Storage & Backup Management: Developed a robust backup system using Bash scripts and Cron jobs to sync world data to Google Cloud Storage buckets.
- Networking & Security: Orchestrated network access by reserving Static External IPs and configuring specific VPC Firewall rules (TCP 25565) for secure client connectivity.
- install_dependencies.sh — Initial provisioning script to install the JRE, download server binaries, and handle first-time disk formatting.
- backup.sh — Bash script that manages world data consistency and synchronizes files with Google Cloud Storage.
- startup-script.sh — Automated routine to mount the persistent SSD and launch the server session during instance boot.
- shutdown-script.sh — Ensures safe world saving and service termination before the VM instance stops.
To verify the successful configuration of the infrastructure and network rules, a connectivity test was performed:
Minecraft Server status successful.
The server was managed via SSH through the GCP Console, utilizing screen for session persistence:
