DEV Community

Cover image for ☁️ How to Host Your Side Projects for $0: The Ultimate GCP Free Tier Guide
Jeannie
Jeannie

Posted on

☁️ How to Host Your Side Projects for $0: The Ultimate GCP Free Tier Guide

How-to guide for configuring regions, disk types, and network tiers to build a forever-free Linux server.

GCP Official Doc on Free Tier Specifications


Hello, Dev Community! 👋

I'm excited to kick off a new series where I’ll be building an AI-Powered News & Insight App. But before we dive into "Vibe Coding," LLMs, and Python scripts, we need a home for our application.

While tools like Vercel and Replit are fantastic, sometimes you just need a raw Linux server (VM) to have full control over your environment—whether it's for hosting a Docker container, running a cron job, or just experimenting with Linux.

In this article, I’ll walk you through how to provision a Google Cloud Platform (GCP) Compute Engine instance that stays within the "Always Free" tier limits. I'll share exactly which settings to tweak to avoid those surprise bills! 💸


🛠️ Step-by-Step Setup

Prerequisites

  • A Google Cloud Platform account with billing enabled, but it won't incurred cost because it's covered by free tier quota.

Step 1: Machine Configuration

Navigate to Compute Engine > Create an instance.

The "Always Free" tier has strict requirements regarding location and hardware.

  1. Region: Select us-west1, us-east1, or us-central1.
    • My Choice: I picked us-west1 (Oregon) because it is physically nearer to my location in Asia compared to the other free options, offering slightly better latency. VM Region
  2. Machine Type: Select e2-micro (2 vCPU, 1 core, 1 GB memory).
    • Note: This is a shared-core machine, perfect for low-traffic apps or development environments. VM Machine Type

Step 2: OS and Storage (Crucial!)

This is where many people accidentally incur costs. By default, GCP might select a "Balanced" disk, which is not free.

  1. Click Change under "Boot disk".
  2. Boot disk type: Change this to Standard persistent disk.
  3. Size: Set this to 30 GB.
    • Why? You get 30GB of Standard persistent disk usage per month for free. VM Boot Disk Type

Step 3: Data Protection & Observability

We need to strip away the paid add-ons.

  1. Backups: In the "Data protection" section, select No backups. Backups and snapshots cost extra. VM No Backup
  2. Observability: In the "Observability" section, uncheck "Install Ops Agent".
    • Reason: The Ops Agent consumes precious RAM. On a 1GB e2-micro instance, we need every megabyte for our application. VM No Observability

Step 4: Networking

Finally, let's configure traffic and network pricing.

  1. Firewall: Check Allow HTTP traffic and Allow HTTPS traffic so we can access our web apps later. VM Networking Allow Traffic
  2. Network Interface: Expand the "Network interfaces" section and click on nic0. VM Networking Interface 1
  3. Network Service Tier: Change this from Premium to Standard.
    • Pro Tip: Premium tier routes traffic over Google's global backbone (faster but costlier). Standard tier uses the public internet (free/cheaper for low usage). VM Networking Interface 2

📊 Quick Reference: The "Golden Config" Decision Table

Here is a summary of the choices I made versus the defaults, to help you understand why we configured it this way.

Configuration Default GCP Setting (Costly 💸) Our Free Tier Choice (Free 🆓) Reason
Region Often defaults to local region us-west1 (or us-east1/central1) Only specific US regions are Free Tier eligible.
Machine Type e2-medium e2-micro The specific instance type covered by the program.
Disk Type Balanced Persistent Disk Standard Persistent Disk Only "Standard" is covered by the 30GB free allowance.
Network Tier Premium Standard Premium costs extra per GB; Standard is budget-friendly.
Observability Ops Agent Enabled Disabled Saves RAM resources on the small e2-micro instance.

✅ Verification

Before hitting "Create," look at the Monthly Estimate on the right side of the screen (highlighted in green rectangle).
Final check

It should look remarkably clean, listing only:

  1. 2 vCPU + 1 GB memory
  2. 30 GB standard persistent disk

If you see anything else (like "Snapshot schedule" or "Ops Agent"), go back and double-check the steps above.

Once verified, click Create! 🚀


🔮 What's Next?

Congratulations! You now have a running Linux server in the cloud for $0/month.

I will be using this VM as the foundation for my upcoming side projects, specifically the AI News & Insight App I mentioned earlier. In the next few posts, I'll be sharing how I:

  1. Set up the environment on this VM.
  2. Use "Vibe Coding" tools to generate the application code.
  3. Deploy the app to this very server.

Stay tuned for the next part of this series! If you have any tips for optimizing free-tier VMs, let me know in the comments below! 👇

Top comments (0)