Creating a 2$/mo Family Minecraft Server

I always wanted a Minecraft server but they always seemed a bit expensive. So I created this Terraform recipe to allow my kids and neighbors to play together economically but without compromising performance. The key was using Google Cloud pre-emptible VM that shutdown automatically within 24 hours.

So I never forget to switch it off after use, which saves me a ton of money as we don’t play that often. The disk attached to the VM sticks around, so we never lose our world.

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. Help me, help you and help others by asking.

Features

  • 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 Minecraft clients are configured once
  • Reserves the disk, so game data is remembered across sessions
  • Restricted service account, VM has no ability to consume GCP resources
  • Restricted Network, the server itself isolated
  • 2$ per month. Reserved IP address: $1.46, reserved 10Gb disk: $0.40, VM: $0.01 per hour, so max single session cost $0.24

Originally published at https://futurice.com.

Cloud consultant at Futurice GmbH. Ex-Firebase, Ex-Google Cloud.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store