On this page
  1. Step 1 — Create the account
  2. Step 2 — Set a budget alert before you build anything
  3. Step 3 — Deploy the backend container to Cloud Run
  4. Step 4 — Add a database with Firestore
  5. Step 5 — Serve static assets from Cloud Storage
  6. Step 6 — Upgrade to a paid billing account before the trial ends
  7. Step 7 — Check free-tier usage monthly
  8. Where AI coding assistants get this wrong
  9. Checklist
  10. FAQ
    1. Is Cloud SQL free on Google Cloud?
    2. What happens when my $300 credit or 90 days run out?
    3. Can I run a VM for free on Google Cloud?
    4. Why is Cloud Run better than a VM for a free-tier app?
    5. Do I need the gcloud CLI, or can I use the console?
  11. Related topics
  12. Sources
tutorial

How to Deploy Your First App on Google Cloud for Free

Deploy a web app on Google Cloud for $0: Cloud Run with scale-to-zero, Firestore for data, and the always-free tier limits that keep the bill at zero.

Quick answer

  • Google Cloud gives new accounts a $300 credit for 90 days plus an always-free tier that never expires.
  • The free stack is Cloud Run (scale-to-zero containers) + Firestore (1 GB) + Cloud Storage (5 GB, US regions).
  • Set a budget alert first, and upgrade to a paid billing account before the 90-day trial ends so your project isn’t deleted.
  • Cloud SQL is not free — plan your database around Firestore for a $0 bill.

Step 1 — Create the account

Go to cloud.google.comGet started for free. You’ll need a payment method — Google places a temporary hold of roughly $0-1 to verify it, not a charge — and you receive a $300 Welcome credit valid for 90 days plus full access to the always-free tier.

How to verify it worked: the Billing page shows your $300 credit balance and the 90-day countdown, and a project named “My First Project” was created for you.

Step 2 — Set a budget alert before you build anything

In the console, open BillingBudgets & alertsCreate budget, set a monthly amount of $10-20, and add email notifications (and a Pub/Sub topic if you want webhooks). Alerts are free and are the only thing that tells you when credit-funded usage is burning through the $300.

How to verify it worked: the budget appears in the list with an Active status.

Step 3 — Deploy the backend container to Cloud Run

Cloud Run runs a Docker container and gives it an HTTPS URL, scaling to zero instances when idle. With the gcloud CLI installed and a Dockerfile at the root of your app:

gcloud run deploy myapp \
  --source . \
  --region us-central1 \
  --allow-unauthenticated \
  --max-instances 2 \
  --min-instances 0 \
  --memory 256Mi \
  --cpu 1

How to verify it worked: the command prints a service URL like https://myapp-xxxx-uc.a.run.app; opening it serves your app. Set --max-instances deliberately low — an AI-defaulted value of 10+ means a traffic spike spins up paid instances. The always-free tier covers 2M requests, 180K vCPU-seconds, and 360K GB-seconds per month, and idle services cost $0 because they scale to zero.

Step 4 — Add a database with Firestore

Firestore is Google’s document (NoSQL) database, and it’s the free-tier data option: 1 GB of storage plus 50K reads, 20K writes, and 20K deletes per day. In the console, go to FirestoreCreate databaseNative mode, pick a location, and start writing documents from your Cloud Run service.

How to verify it worked: a document you write from the app appears in the Firestore console’s Data tab within seconds.

Step 5 — Serve static assets from Cloud Storage

If your app has images, CSS, or other static files, put them in Cloud Storage (5 GB-months free in US regions: us-east1, us-west1, us-central1) and serve them through the bucket’s public URL or your own CDN. Don’t serve assets from Cloud Run — every byte of static content billed through compute costs more than storage egress.

How to verify it worked: opening the bucket’s public object URL returns the file with a 200 status.

Step 6 — Upgrade to a paid billing account before the trial ends

When the 90-day trial ends or the $300 runs out without an upgrade, the trial billing account closes, your resources stop, and after a 30-day grace period they’re permanently deleted. Fix this on day one: in the console’s Welcome page, click Activate to upgrade to a paid billing account. You keep the remaining credit until it expires, keep the always-free tier, and are only billed for usage beyond the credit and free limits.

How to verify it worked: the Billing page shows a Paid billing account type with your remaining credit balance intact.

Step 7 — Check free-tier usage monthly

Open Billing → the free-tier usage report (or Budgets & alerts notifications) monthly. It shows each product’s usage against its always-free limit.

How to verify it worked: every product is under its limit and the month’s projected cost is $0.

Where this bites vibecoders

GCP is the friendliest free tier of the three clouds, and the AI still finds a way to bill you: it defaults to Cloud SQL for the database (not free), sets Cloud Run memory to 2 GB for a 128 MB app (paid per GB-second), forgets max-instances (a spike = dozens of paid instances), and never tells you the $300 credit expires at 90 days. The single most important step in this guide is Step 6 — upgrading to a paid billing account. Miss it and Google deletes your project after a 30-day grace period, with no bill and no warning beyond the emails.

Where AI coding assistants get this wrong

  • Provisioning Cloud SQL by default even though it has no always-free tier.
  • Setting Cloud Run memory/concurrency high and omitting max-instances, so traffic spikes bill real money.
  • Choosing a paid region for the e2-micro VM — free-tier VMs only run in us-west1, us-central1, or us-east1.
  • Forgetting budget alerts in generated setup scripts.
  • Assuming the $300 credit lasts forever — it’s 90 days, then the trial account closes.

Checklist

  • Create the account and note the $300 credit + 90-day clock
  • Set a budget alert ($10-20) before creating resources
  • Deploy the backend on Cloud Run with --max-instances 2 and scale-to-zero
  • Use Firestore (1 GB always free) instead of Cloud SQL
  • Serve static assets from Cloud Storage, not Cloud Run
  • Upgrade to a paid billing account before the trial ends
  • Confirm $0 projected cost in the free-tier usage report
  • Add Cloudflare or Cloud CDN in front to control egress

FAQ

Is Cloud SQL free on Google Cloud?

No. Cloud SQL (managed Postgres/MySQL) has no always-free tier; the smallest instance runs around $8/month. For a $0 stack use Firestore (1 GB free), or spend part of the $300 trial credit on Cloud SQL while it lasts.

What happens when my $300 credit or 90 days run out?

If you haven’t upgraded to a paid billing account, the trial account closes, your resources stop, and data is marked for deletion after a 30-day grace period. Upgrade to a paid billing account to keep everything; the always-free tier continues after the credit is gone.

Can I run a VM for free on Google Cloud?

Yes — one e2-micro instance per month with 30 GB of standard persistent disk, always free, in us-west1 (Oregon), us-central1 (Iowa), or us-east1 (South Carolina). It’s small (2 vCPU, 1 GB RAM shared), so most apps are better off on Cloud Run.

Why is Cloud Run better than a VM for a free-tier app?

Cloud Run scales to zero — you pay nothing when no requests come in, and the always-free tier covers 2M requests, 180K vCPU-seconds, and 360K GB-seconds per month. A VM bills for every hour it exists, free tier or not.

Do I need the gcloud CLI, or can I use the console?

Both work. The console (Cloud Run → Create service) covers every step without installing anything, and it’s fine for a first deploy. The CLI is worth setting up because redeploys become one command instead of a click-through.

Sources

Share: