How to Create a Google Cloud Server with Ubuntu Linux

laptop 5822575 640

This post shows students and new users steps to create a Google Cloud server with Ubuntu Linux to run their own websites online. Our first post in the series showed you how to create and register your own domain name with Google Domains.

This post series will help you with a step-by-step process in registering for a domain, setting up a cloud server and installing all the software and apps needed to run your own websites online.

When you create a domain, it does nothing until you point or forward the domains name to a server. The server hosts your content. The content you want your audience to view and use online. Since we already have a registered domain, let’s go and get a Google Cloud server that we will use to host our content.

If you haven’t read our previous post, go and read it before going forward with series. The post can be found at the link below.

How to create your website domain

Google Cloud Platform is HUGE! It’s just not for running cloud servers. Google Cloud Platform is a suite of cloud computing services and infrastructure that can be used to power IT services and business operations.

For this series, we’re going only going to be using Google Cloud server resources to run our website.

With Google Cloud Platform (GCP), we can spin up a cloud server which is a virtual machine running on Google Computing infrastructure. With it, run our websites.

How to sign up for Google Cloud

By this time you should have a Gmail account. Having a Gmail account which makes it easy to use Google’s services.

Head over to Google Cloud Platform (GCP) and register for an account if you don’t already have one.

Sign up for  Google Cloud

Click the blue button: “Get started for free” located in the upper-right corner of the page.

google cloud get started for free

Next, sign in with your Gmail account and register. You may be able to get a $300 credit for registering.

google email account login

Once registration is complete, you should have a Google Cloud Platform account. At this point, you won’t be charged anything because you are not using any of Google’s Cloud services yet.

How to create a Google Cloud server

Now that you have created a Google Cloud Platform account, let’s go and create a Google Cloud server resource.

We will forward our domain we created in our previous post to point to this Google server which is going to be our host for hosting our content online.

To create a new Google Cloud Server, go to the menu on the top left and navigate to Compute Engine ==> VM instances as shown in the image below.

google cloud ompute engine vm instances updated

If you haven’t created a project, you’ll be prompted to create a new project before creating a VM instance.

Next, from the Compute Engine ==> VM instances page, click the CREATE INSTANCE button as shown below.

Doing this will create a new virtual machine in Google Cloud infrastructure so we can use to host our content.

This may take a few minutes for Compute Engine to prepare a VM instance. When ready, you should see a page to see VM setup details. 

google cloud server net instance

On the VM creating page, choose to Create a new VM from scratch.

Then use the bullet points below to select and provide other details for the new server.

Name: Give your server a name which starts with a lowercase letter. If a new is not compatible with Google Cloud server name, it will prompt you to change it.

Region: A region is a specific geographical location where you can run your Google Cloud resources. You’ll typically want to select the region that your server will primarily be accessed.

Zone: A zone is an isolated location within a region that determines where your data are stored. A zone is typically closer to a region.

Machine configuration: Google Cloud offers different virtual machine configurations. Choose the one the fits your needs and budget.

Machine family – General purpose

CPU Series – CPU generation

Machine Type – CPU and Memory allocation.

Boot disk: This is where you choose the operating system for your Google Cloud server. Linux Debian is selected by default. There are other types of operating systems you can choose from. For this tutorial, we’re going to be using Ubuntu Linux.

Click Change, these choose Ubuntu Linux.

ubuntu linux boot disk

Firewall: If you want to connect to the web from your Google Cloud server, make sure to allow both HTTP and HTTPS traffic. Add tags and firewall rules to allow specific network traffic from the Internet

  • Allow HTTP traffic
  • Allow HTTPS traffic
google create new vm instance

Once you’re done selecting the VM instance details, click the Create button to create your first VM.

After a few moment, the first VM server should be created and ready.

google cloud server instance

Under External IP, you’ll find your server public or external IP address.

This is the IP address we will forward or point our domain we created earlier to. Take notes of the External IP address.

How to point a domain name to server

Now that you have created a Google Cloud server and you have an external IP address, go back to your domain registrar website.

For us, it’s Google Domains.

Once you login to Google Domains, click in the domain name, then select DNS.

google domains dns edit

On the DNS page, scroll down to Custom records in the middle. Then expand Custom records tile, and add your first record.

  • Host name field, leave blank
  • Type = A
  • TTL 3600
  • Data: IP address of host

When you’re done, click the Save button.

google domains add dns a record

When you’re done, a new record will show up when website domain pointing to the server’s IP address.

google domains custom records a records updated

Now the domain name is pointing to a server or host IP address. At this time, the server is live but there are not content created yet.

In our next post, we will show you how to create a web server and content on our Google Cloud server we created above.

That should do it!

Conclusion:

This post showed you how to create a Google Cloud server. It also showed you how to point or forward an domain name to a server IP address.

If you find any error above or have something to add, please use the comment form below.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.