This post shows students and new users the steps to create a Google Cloud server with Ubuntu Linux to run their own online websites. Our first post in the series showed you how to create and register your own domain name with Google Domains.
When you create a domain, you do nothing until you point the domain name to a server. The server hosts your content. The content you want your audience to see and use online. Since we have a domain that’s already registered, let’s go and get a Google Cloud server that we’ll use to host our content.
If you haven’t read our previous post, please read it before proceeding with the series. Our previous post can be found at the link below.
Google Cloud Platform is HUGE! It just isn’t for running servers. Google Cloud Platform is a set of cloud computing infrastructure and services that can be used to power IT services and business operations.
For this series, we will only use Google Cloud server resources to run our website.
With Google Cloud, we can launch a server in the cloud which is a virtual machine that runs on the Google Computing infrastructure. With it, run our website.
How to sign up for Google Cloud
By this time, you should have a Gmail account that makes it easy to use Google services.
Go to Google Cloud Platform (GCP) and sign up for an account if you don’t already have one.
Click on the blue button: «Get started for free”Located in the upper right corner of the page.
Login with your Gmail account and sign up. You may be able to get a $ 300 credit for signing up.
Once registration is complete, you will have a Google Cloud Platform account. At this point, you will not 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, we are going to create a Google Cloud server resource.
We will forward our domain that we created in our previous post to point to this Google server that will be our host.
To create a new Google Cloud server, go to the menu at the top left and navigate to Compute Engine ==> VM instances as shown in the picture below.
If you have not created a project, you will be prompted to create a new project before creating a VM instance.
Then from the Compute Engine ==> VM instances page, click the CREATE INSTANCE button as shown below.
Doing this will create a new virtual machine on the Google Cloud infrastructure that we can use to host our content.
Compute Engine might take a few minutes to prepare a VM instance. When you’re ready, you should see a page to view the virtual machine configuration details.
On the VM creation page, choose Create a new VM from scratch.
Then use the bullets below to select and provide other details for the new server.
Name: Give your server a name that begins with a lowercase letter. If a new one is not compatible with the Google Cloud server name, it will ask you to change it.
Region: A region is a specific geographic location where you can run your Google Cloud resources. Typically, you’ll want to select the region that your server will primarily access.
Zone: A zone is an isolated location within a region that determines where your data is stored. A zone is usually closer to a region.
Machine setting: Google Cloud offers different virtual machine configurations. Choose the one that suits 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 that you can choose from. For this tutorial, we will use Ubuntu Linux.
Click Change, they choose Ubuntu Linux.
Firewall: If you want to connect to the web from your Google Cloud server, make sure to allow HTTP and HTTPS traffic. Add firewall rules and tags to allow specific network traffic from the Internet
- Allow HTTP traffic
- Allow HTTPS traffic
After you have finished selecting the VM instance details, click the Create to create your first virtual machine.
After a few moments, the first VM server should be created and ready.
Under External IP, you will find the public or external IP address of your server.
This is the IP address that we will forward or point to our domain that we created earlier. Make 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 you have an external IP address, go back to your domain registrar’s website.
For us it is Google domains.
Once you log into Google Domains, click on the domain name and then select DNS.
On the DNS page, scroll down to Custom Records in the middle. Then expand the Custom Records tile and add your first record.
- Hostname field, leave blank
- Type = A
- TTL 3600
- Data: IP address of the host
When you’re done, click the Save button.
When done, a new record will appear when the website domain points to the server’s IP address.
Now the domain name points to a server or host IP address. Right now, the server is up, but there is no content created yet.
In our next post, we will show you how to create a web server and content on our Google Cloud server that we created earlier.
You should do that!
In this tutorial we have seen how to create a Google Cloud server. It also showed you how to point or forward a domain name to the IP address of a server.
If you find any errors above or have something to add, use the comment form below.