A Paper 1.20.4 Minecraft server paired with Terraform infrastructure-as-code for fully automated provisioning on Google Cloud Platform (GCP).
terra-minecraft/
├── ci/
│ └── scripts/
│ └── start.sh # Server start script (Aikar's JVM flags)
├── docs/ # Additional documentation
├── plugins/ # Bukkit/Paper plugin JARs
├── terraform/ # GCP infrastructure (compute, networking, storage)
├── eula.txt # Minecraft EULA acceptance
└── paper-1.20.4-499.jar # Paper server JAR
| Tool | Version |
|---|---|
| Java | 17+ |
| Terraform | 1.5+ |
| gcloud CLI | latest |
cd terraform
terraform init
terraform plan
terraform applyAll GCP resources are tagged with
project = "terra-minecraft".
Remote state is stored in a GCS bucket — never commit.tfstatelocally.
bash ci/scripts/start.shThe start script uses Aikar's JVM flags tuned for G1GC with 2 GB minimum and 4 GB maximum heap.
- Port:
25565(default) - EULA: Accepted in
eula.txt - Plugins: Drop JARs into
plugins/ - Server config:
server.properties,bukkit.yml,spigot.yml,paper-global.yml(generated at runtime, not tracked in git)
The terraform/ directory manages:
- Compute — GCP Compute Engine VM instance
- Networking — VPC, firewall rules (port 25565 TCP/UDP)
- Storage — GCS bucket for Terraform remote state and world backups
⚠️ Do not modify GCP resources manually. All changes must go throughterraform plan/terraform apply.
Sensitive values (GCP service account keys, RCON passwords, etc.) are never committed. Use:
.gitignoreto exclude local credential files- GCP Secret Manager for runtime secrets
- Environment variables for CI/CD pipelines
MIT © Simon Villafane