How to Deploy a Free VPS on Google Cloud Console: A Step-by-Step Guide
Table of Contents
- Introduction
- What Is a VPS and Why Use Google Cloud?
- Understanding the Google Cloud Free Tier
- Requirements Before You Start
- Step-by-Step: Setting Up Your Free VPS
- Installing Essential Software
- Keeping Your VPS Within the Free Tier Limits
- Managing and Monitoring Your VPS
- Common Errors and Fixes
- Securing Your VPS
- Popular Uses for a Free VPS
- Final Thoughts
- 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
, andus-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
- Go to https://cloud.google.com
- Click Get started for free
- Log in with your Google account
- Add billing information
- Accept terms to get $300 free credit
Step 2: Create a New Project
- Visit https://console.cloud.google.com
- Click the project dropdown > New Project
- Name it (e.g., “MyVPS”) and click Create
Step 3: Enable Billing for the Project
- Go to Billing in the menu
- Link the billing account to your project
Step 4: Enable Compute Engine
- Navigate to Compute Engine > VM Instances
- Click Enable (wait for API to initialize)
Step 5: Create Your VPS Instance
- Click Create Instance
- Configure:
- Name: my-free-vps
- Region:
us-west1
,us-central1
, orus-east1
- Machine type:
e2-micro
- Boot disk: Ubuntu 22.04 LTS, 10 GB Standard Persistent Disk
- Check Allow HTTP and HTTPS traffic
- Click Create
Step 6: Connect to Your VPS
- From the VM list, click SSH to open the terminal
- 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
ortop
- 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
Error | Solution |
---|---|
Quota exceeded | Try a different region or reduce VM specs |
SSH timeout | Check firewall rules and allow SSH traffic |
Billing not enabled | Ensure 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.