Back to Blog

Friends and Family Minecraft Server Terraform Recipe

Now is a great time to setup a virtual space for you and your family to play together digitally. I created this Terraform recipe to make it super easy to get a sanely configured Minecraft server up an running. It's secure and shuts down automatically within 24 hours. Game state is preserved across sessions. Left unattended it will cost less than $2 a month to host.

I always wanted a Minecraft server but they always seemed a bit expensive to run. So I created this configuration that shuts down automatically but persists the world between sessions. Its perfect for me and my family to play on occasionally.

Find the Terraform recipe on Github (MIT license).

If you need help setting it up I am experimenting with supporting the software through an living Google doc. If you are looking for a zero effort solution, this recipe has also been deployed as a fully managed service


  • Runs itzg/minecraft-server Docker image
  • Preemptible VM shuts down automatically within 24h if you forget to stop the VM
  • Reserves a stable public IP, so the minecraft clients do not need to be reconfigured
  • Reserves the disk, so game data is remembered across sessions
  • Restricted service account, VM has no ability to consume GCP resources
  • 2$ per month
    • Reserved IP address costs: $1.46 per month
    • Reserved 10Gb disk costs: $0.40
    • VM cost: $0.01 per hour, max session cost $0.24


  • Tom Larkworthy
    Senior Cloud Architect