Clicky

Welcome to the Thought Palace of Rahul Rajeev

How to set up a free google cloud server easily (step by step)

Technology Aug 27, 2021

This is a quick step by step guide to help you create your first Cloud Server using the Google Cloud Platform. There are many reasons why you should choose a cloud server over traditional web servers. I will write more on that in a future post.

Right now we will focus on creating a cloud server using the free tier option available in GCP.

Step 1: Sign up for a GCP account

Create a google account if you don't have one already (which seems unlikely given how most people are using at least one Google service today by default).

Go to Google Cloud Console. Since this is probably the first time you are using the services you will have to sign up for it using a google account.

When you sign up, it will ask you to set up some billing information (your name, organisation and credit card details). You need to fill these up to start using GCP.

When you sign-up google gives you $300 free credits to test their offerings for 3 months. The credits are useful for you to play around with other premium service tiers and features. We will be sticking our attention to the free tier option so that it costs you next to nothing even after the 3 month period.

Step 3: Create a new project

After signing up you have to create a "new project" to manage your cloud servers.
Since I already have multiple projects running in my account here is how I create a new project :

Navigate to the projects button in the top-left section.

How to set up a free google cloud server
Navigate to your projects section

Select the"New Project" button.

How to set up a free google cloud server
Then select the "New Project" option

Give your project a name and press "Create".

How to set up a free google cloud server
Choose a name for your project and click create

Your project is now ready.


Step 4: Add a VM instance to your project

Now you have to add a new VM (virtual machine) instance to your project. There are various VM options for you to chose from differing in their processing power and feature sets.
Since we are setting up an instance that is free we have to use what is available in the  Free tier of GCP.

Starting July 2021 Google announced that they are switching to "E2-Micro" as the available option for VM instance in the free tier section. This is good as this shared core will gives us twice the ram when compared to the previous "F1-micro" instance.

To create your VM instance, go to the Navigation Menu at the top-left corner.

How to set up a free google cloud server
Enter the Navigation Menu

Go to Compute Engine section and click on VM instances

How to set up a free google cloud server
VM instances is where you can create a new instance for your project

Select the "Create Instance" option

How to set up a free google cloud server
Click here to create your new instance

Then give a suitable name to your instance. Make sure to choose a region that is from the free tier section (Oregon: us-west1; Iowa: us-central1; South Carolina: us-east1).  Set the machine configuration to Series E2 and Machine type as e2-micro.

How to set up a free google cloud server
Select your instance name and choose your machine configuration

Leave the other options as it is and note that GCP doesn't provide any GPUs as part of the free tier.

Next, you have to set up the boot disk for your server. By default, it is set to 10 GB Balanced Persistent Disk running Debian.  

How to set up a free google cloud server
The default option in the boot disk section

Since I will be using this server to host a ghost blog, here I am switching the OS to Ubuntu 20.04 LTS. Make sure you set the disc type to "Standard Persistent Disk" for availing the free tier benefits.

As one last thing, set your server firewall rules. Check only the "allow HTTPS traffic" option to make sure all the traffic to your site comes secured.

How to set up a free google cloud server
You can check both HTTP and HTTPS if you're not planning to use an SSL

You are now ready to create and deploy your VM instance. Just press the "Create" button.

How to set up a free google cloud server
Click create to deploy your VM instance

Be patient as it might take a few minutes for the deployment to be live. When the setup is completed you will have the server listed in the VM instances page. You can now SSH into the server to start setting up.

How to set up a free google cloud server
Once deployed your instance will appear here


Step 5: Set a static-ip for the server


By default you will have an ephemeral IP set for your server. You need to make it static so that you can redirect it to a custom domain later.

Click on the settings dropdown for the instance and select “View Network Details”:

How to set up a free google cloud server
Select "View network details"


This will open up the network configuration for your project and here you can select the "External IP Addresses" option to "Reserve a Static Address".

How to set up a free google cloud server
Go to external IP addresses and click on reserve static address 


Give the IP a name and set it to "Standard Service Tier"

How to set up a free google cloud server
Set the service tier to standard


For the regional addresses, select the same region as you have chosen for the VM instance

How to set up a free google cloud server
Select the same region as your VM instance


With that your free cloud server with a static IP is ready.


Do not that the free tier option of GCP remains free as long your usages doesn't exceed the free limit. There are some minor charges you will incur for reserving the static IP, but that will also depend on your incoming traffic.

So GCP is ideal when you are starting out, testing your blog or other web development projects without almost zero charges. The best part is if you ever need to start using more resources or enhance the server, you can do it by editing the existing VM instance.  

Next steps

Congratulations on creating your first cloud server using GCP. If you looking for ways to make good use of it, I have written on how to use this server to set up your own Ghost Blog. You might wanna check that out or try some projects of your own.

I hope this helped you. Feel free to contact me if you have any doubts or suggestions.

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.