How to Host a Minecraft Server on Google Cloud Free Tier
Guide to running a Minecraft server on Google Cloud Free Tier, covering the e2-micro instance, limitations, and how to stretch free credits for a small server.
What Google Cloud Offers for Free
Google Cloud Platform (GCP) provides two free offerings: a $300 credit for 90 days (for new accounts) and an Always Free tier that includes one e2-micro instance. The e2-micro gives you 0.25 vCPUs (burstable to 2 vCPUs) and 1 GB of RAM. For a google cloud free minecraft server, this is extremely tight, but it can work for 1 to 3 players with careful tuning.
The $300 trial credit is more interesting. During the 90-day trial, you can spin up a larger instance (e2-standard-2 or e2-standard-4) and run a proper server for free. After the trial ends, you either downgrade to the e2-micro or start paying.
Creating a GCP Account and Project
Sign up at cloud.google.com. You will need a Google account and a credit card. During the trial period, you will not be charged even if you exceed the free tier, your instances simply stop when credits run out.
Create a new project (for example, "minecraft-server"). All resources will live inside this project.
Option 1: Using Trial Credits (Recommended)
During your 90-day trial, create an instance that can actually run Minecraft well:
- Machine type: e2-standard-2 (2 vCPUs, 8 GB RAM) or e2-standard-4 (4 vCPUs, 16 GB RAM)
- Region: us-central1, us-east1, or europe-west1 for Always Free eligibility later
- Boot disk: Ubuntu 24.04 LTS, 30 GB SSD
An e2-standard-2 costs roughly $50/month, so your $300 credit lasts about 6 months if you use it exclusively for this instance. That is a solid runway for a google cloud free minecraft server trial.
Option 2: The Always Free e2-micro
If you want a truly permanent free server, use the e2-micro. Navigate to Compute Engine > VM Instances > Create. Configure:
- Machine type: e2-micro (0.25 vCPU, 1 GB RAM)
- Region: us-west1, us-central1, or us-east1 (free tier eligible regions only)
- Boot disk: 30 GB standard persistent disk (free tier includes 30 GB)
With only 1 GB of RAM, you need to allocate carefully. The OS uses about 200 MB, leaving approximately 700 to 800 MB for the JVM. Set -Xms512M -Xmx700M and use Paper with aggressive optimization settings. The view distance should be set to 4 to 6 chunks, and entity limits need to be reduced significantly.
Firewall Configuration
GCP blocks Minecraft traffic by default. Go to VPC Network > Firewall > Create Firewall Rule:
- Name: allow-minecraft
- Direction: Ingress
- Targets: All instances in the network
- Source IP ranges: 0.0.0.0/0
- Protocols and ports: TCP:25565, UDP:19132
Server Installation
SSH into your instance (GCP provides a browser-based SSH client, or use gcloud compute ssh from your terminal):
sudo apt update && sudo apt install -y openjdk-21-jre-headless
mkdir minecraft && cd minecraft
wget https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/LATEST/downloads/paper-1.21.4-LATEST.jar -O paper.jar
echo "eula=true" > eula.txt
For the e2-micro, use a minimal start command:
java -Xms512M -Xmx700M -jar paper.jar nogui
For the trial credit instance with more RAM, allocate generously and add optimized JVM flags. See our JVM flags guide for the recommended configuration.
Swap Space for e2-micro
With only 1 GB of RAM, adding swap is essential to prevent out-of-memory kills:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Swap on GCP's persistent disk is slow, but it prevents crashes. It is not a substitute for RAM, just a safety net.
Performance Reality Check
The e2-micro google cloud free minecraft server is functional but barely. Expect chunk loading delays, occasional TPS drops to 15, and a limit of 2 to 3 concurrent players. World pre-generation with Chunky is mandatory to avoid the CPU spike of on-the-fly chunk generation on a 0.25 vCPU machine.
The trial credit instance (e2-standard-2 or higher) performs well and can handle 10 to 15 players comfortably. If you enjoy the GCP experience during the trial but do not want to pay after, consider migrating to Oracle Cloud Free Tier, which offers significantly more free resources.
Skip the hardware headaches. Astroworld Hosting runs NVMe SSDs, modern CPUs, and optimized configs on every plan.
Cost After Free Tier
When your trial credits expire, GCP charges real money. An e2-standard-2 costs roughly $50/month, an e2-standard-4 roughly $100/month. These prices are 3 to 5x more expensive than dedicated Minecraft hosting providers for equivalent specs. The google cloud free minecraft server is great for learning cloud computing and running a tiny personal server, but it is not cost-effective for long-term serious hosting. Consider shared vs dedicated hosting if you need an affordable permanent solution.