How to Deploy a Free VPS on Google Cloud Console: A Step-by-Step Guide

Table of Contents

  1. Introduction
  2. What Is a VPS and Why Use Google Cloud?
  3. Understanding the Google Cloud Free Tier
  4. Requirements Before You Start
  5. Step-by-Step: Setting Up Your Free VPS
  6. Installing Essential Software
  7. Keeping Your VPS Within the Free Tier Limits
  8. Managing and Monitoring Your VPS
  9. Common Errors and Fixes
  10. Securing Your VPS
  11. Popular Uses for a Free VPS
  12. Final Thoughts
  13. Useful Links

1. Introduction

Deploying a VPS (Virtual Private Server) is an excellent way to explore cloud computing, host websites, or run backend services. Google Cloud Platform (GCP) offers a generous free tier, which includes enough resources to get started with a VPS at zero cost. In this guide, you’ll learn how to deploy a free VPS on Google Cloud Console—step by step.


2. What Is a VPS and Why Use Google Cloud?

A Virtual Private Server (VPS) is a virtual machine that mimics a physical server. It offers more control than shared hosting and is ideal for developers, hobbyists, and small businesses.

Why Google Cloud?

  • $300 free trial credit
  • Always-Free tier VPS (suitable for light workloads)
  • Reliable infrastructure and scalability
  • Integration with other Google services

3. Understanding the Google Cloud Free Tier

Google Cloud’s Free Tier provides:

  • 1 e2-micro VM instance per month (in select regions)
  • 30 GB HDD storage
  • 1 GB outbound traffic
  • 5 GB snapshot storage

Note: Eligible regions include us-west1, us-central1, and us-east1. Staying within these keeps your VPS free.

🔗 Google Cloud Free Tier Details


4. Requirements Before You Start

To deploy your VPS, you’ll need:

  • A Google account
  • A credit/debit card (for verification)
  • Internet connection
  • Basic command line knowledge (optional but useful)

5. Step-by-Step: Setting Up Your Free VPS

Step 1: Sign Up and Activate Free Trial

  1. Go to https://cloud.google.com
  2. Click Get started for free
  3. Log in with your Google account
  4. Add billing information
  5. Accept terms to get $300 free credit

Step 2: Create a New Project

  1. Visit https://console.cloud.google.com
  2. Click the project dropdown > New Project
  3. Name it (e.g., “MyVPS”) and click Create

Step 3: Enable Billing for the Project

  1. Go to Billing in the menu
  2. Link the billing account to your project

Step 4: Enable Compute Engine

  1. Navigate to Compute Engine > VM Instances
  2. Click Enable (wait for API to initialize)

Step 5: Create Your VPS Instance

  1. Click Create Instance
  2. Configure:
    • Name: my-free-vps
    • Region: us-west1, us-central1, or us-east1
    • Machine type: e2-micro
    • Boot disk: Ubuntu 22.04 LTS, 10 GB Standard Persistent Disk
  3. Check Allow HTTP and HTTPS traffic
  4. Click Create

Step 6: Connect to Your VPS

  1. From the VM list, click SSH to open the terminal
  2. Or use your terminal with: gcloud compute ssh <instance-name> --zone=<zone>

6. Installing Essential Software

Once logged into your VPS:

Update the System

sudo apt update && sudo apt upgrade -y

Install Tools

sudo apt install curl wget git ufw -y

Install a Web Server (Optional)

For Apache:

sudo apt install apache2 -y

For Nginx:

sudo apt install nginx -y

Access your server: http://<external-ip>


7. Keeping Your VPS Within the Free Tier Limits

  • Use only 1 e2-micro instance
  • Keep disk space under 30 GB
  • Choose free-tier regions
  • Monitor bandwidth: Stay below 1 GB/month outbound
  • Use Google’s billing dashboard to set up alerts

8. Managing and Monitoring Your VPS

Basic Commands

  • Reboot: sudo reboot
  • Check memory/CPU: htop or top
  • Check disk space: df -h

Firewall Configuration

sudo ufw allow OpenSSH
sudo ufw allow http
sudo ufw allow https
sudo ufw enable

9. Common Errors and Fixes

ErrorSolution
Quota exceededTry a different region or reduce VM specs
SSH timeoutCheck firewall rules and allow SSH traffic
Billing not enabledEnsure the project is linked to a billing account

10. Securing Your VPS

  • Change default SSH port
  • Use public/private SSH keys
  • Disable root login
  • Set up fail2ban to prevent brute-force attacks
  • Keep your system updated regularly

11. Popular Uses for a Free VPS

  • Host a blog or website
  • Deploy a personal cloud or VPN
  • Run scripts or cron jobs
  • Test backend apps (Node.js, Python, etc.)
  • Experiment with Linux server setups

12. Final Thoughts

With Google Cloud’s Free Tier, deploying a VPS costs nothing and provides a great learning experience. Stay within the usage limits, and your server will remain free indefinitely. Whether for hosting, learning, or experimenting—this is a powerful tool to have in your tech arsenal.


13. Useful Links

Similar Posts