How to Host a FREE Website on Google Cloud (Step-by-Step)

Learn how to host a website on the Google Cloud Free Tier for $0. I’ll show you exactly how to set up a Google Compute Engine VM (the e2-micro instance) and how to install Docker on your Compute Engine instance to run a Caddy web server. We will go through the entire process, from creating the VM to connecting a custom domain name to your Google Cloud VM and getting a free SSL certificate with automatic HTTPS using Caddy’s built-in automation.
Most importantly, I’ll show you exactly how to stay within the Google Cloud Always Free tier limits so you never get a surprise bill or hidden charges.

➡️ Link to blog post with all commands: https://tonyteaches.tech/google-cloud-free-tier-hosting/
➡️ Recommended Domain Registrar: https://ttt.do/NetimDomains-GCP

What You’ll Learn
✅ How to set up a VM in the Google Cloud Free Tier
✅ Point your custom domain to the VM’s IP address
✅ Design and configure a simple public website
✅ How to stay within the free tier limits

What You’ll Get
✅ A free e2-micro VM running on Google Cloud
✅ 1 GB RAM and 2 vCPUs
✅ 30GB of free disk storage
✅ Ubuntu 24.04 LTS as your server’s operating system
✅ Docker and Docker Compose installed
✅ A Caddy web server running in a container
✅ A live website on your custom domain
✅ A free SSL certificate with automatic HTTPS

⏱️ Chapters
00:00 Intro
00:31 Google Cloud Platform Sign Up
00:47 Create a Compute Engine VM
01:09 Google Cloud Free Program Limits
01:32 e2-micro Machine Type
01:52 Choose OS and 30GB Free Storage
02:38 Allow HTTP/HTTPS Firewall Rules
02:51 Google Cloud Free Tier Bandwidth Limit
03:30 Disable Extra Features
04:00 Deploy the Virtual Machine
04:54 Connect to VM with SSH in Browser
05:22 Install Docker
06:38 Set Up Caddy Web Server
07:48 Test Website with External IP Address
08:22 Connect Domain Name to Google Cloud IP (DNS A Records)
09:28 Make Caddyfile with Domain to Enable SSL
10:18 Design a public index.html
10:49 Add Docker Volumes
11:18 Test Website with Domain and HTTPS
12:11 Google Cloud Free Tier 1GB Bandwidth Limit
12:43 How a Free Cloudflare CDN Can Help
12:57 More Free Hosting Platforms

By admin

Leave a Reply