How to Create a Google Cloud Server with Ubuntu Linux

This post shows students and new users steps to create a Google Cloud server with Ubuntu Linux to run their websites online.

Our first post in the series showed you how to create and register your domain name with Google Domains.

This post series will help you register for a domain, set up a cloud server, and install all the software and apps needed to run your websites online.

Creating a domain does nothing until you point or forward the domain’s 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, read it before proceeding with the 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 power IT services and business operations.

We will only use Google Cloud server resources for this series to run our website.

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

How to sign up for Google Cloud

By this time, you should have a Gmail account. You have a Gmail account, making it easy to use Google’s services.

Head 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” in the page’s upper-right corner.

Google Cloud free trial sign-up page

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

Google account login screen for cloud services

Once registration is complete, you should have a Google Cloud Platform account. 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 create a Google Cloud server resource.

We will forward the domain we created in our previous post to point to this Google server, which will 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 Compute Engine VM instances overview

If you haven’t created a project, you’ll be prompted to create a new project before making 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 that we can use to host our content.

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

Google Cloud server network instance configuration

Choose to Create a new VM from scratch on the VM creating page.

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

Name: Give your server a name that starts with a lowercase letter. If a new one is incompatible with the Google Cloud server name, it will prompt you to change it.

Region: A region is a specific 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 that 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; choose Ubuntu Linux.

Ubuntu Linux boot disk setup in Google Cloud

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

  • Allow HTTP traffic
  • Allow HTTPS traffic
Creating a new VM instance in Google Cloud

Once you select the VM instance details, click the Create button to create your first VM.

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

Google Cloud server instance details page

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

We will forward this IP address or point to the domain we created earlier. Take notes of the External IP address.

How to point a domain name to the server

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

For us, it’s Google Domains.

Once you log in to Google Domains, click the domain name and select DNS.

Editing DNS settings in Google Domains

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

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

When you’re done, click the Save button.

Adding DNS A record in Google Domains

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

Custom DNS records setup in Google Domains

The domain name is pointing to a server or host’s IP address. The server is live, but no content has been created yet.

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

That should do it!

Conclusion:

  • Setting up a Google Cloud server with Ubuntu Linux is a straightforward process.
  • You successfully created a Google Cloud account and a virtual machine (VM) instance.
  • Pointing your domain name to the server makes your website accessible online.
  • The server is live, but you must create web content to establish your online presence.
  • In our next post, we will guide you through creating a web server and adding content to your new Google Cloud server.

Frequently Asked Questions

How do I sign up for Google Cloud?

To sign up for Google Cloud, visit the Google Cloud Platform website and click on 'Get started for free.' Sign in with your Gmail account, and you may receive a $300 credit for your new account.

What is a Google Cloud server?

A Google Cloud server is a virtual machine hosted on Google's cloud infrastructure. It allows you to run applications and websites online, utilizing Google's computing resources.

How do I create a VM instance in Google Cloud?

To create a VM instance, navigate to Compute Engine and select VM instances. Click the 'CREATE INSTANCE' button, and follow the prompts to set up your virtual machine.

Can I use my own domain with Google Cloud?

Yes, you can use your own domain with Google Cloud. After creating your Google Cloud server, you can point your registered domain to the server to host your content online.

What software do I need to run on my Google Cloud server?

The software you need depends on your website's requirements. Commonly, you may need a web server like Apache or Nginx, along with any necessary programming languages and database systems.

Categories:

,

Leave a Reply

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