How to Setup Google Cloud Server with RunCloud in 10 minutes (Video Tutorial)

How to Setup Google Cloud Server with RunCloud in 10 minutes (Video Tutorial)

When we talk about Google, we think of its network. Google’s backbone network is one of the biggest and fastest in the world. Google even laid their own fiber optic cable under the Pacific Ocean!

Imagine your server running on the same network as Google Search and YouTube… That’s a cool thought, isn’t it? And it is now possible with the Google Cloud Platform (GCP). The Google Cloud Platform offers an accessible suite of cloud computing services that runs on the same incredble infrastructure that Google uses.

But it must be complicated, right?

Worry not!

You do not need a Google Cloud certification to launch your web application server on the GCP.

By using the RunCloud cloud server management panel, you can launch and manage your web application server on Google’s backbone network in under 10 minutes.

In this tutorial, we will show you how to create, connect, deploy a Google Cloud server with RunCloud (Video tutorial included).

Prerequisites

  • RunCloud account (sign up here) to manage your Google Cloud servers
  • Google Cloud Platform (GCP) account to create instances (servers)

Tip: You can get free GCP credit worth USD300 to use within 12 months, and access to the Always Free tier to try GCP with no charge.

0. Video Tutorial: Setup Google Cloud Server with RunCloud

1. Create your Google Cloud server for RunCloud

Login to your Google Cloud Platform account. From the left sidebar, go to “Compute Engine” > “VM instances”.

If you do not have an existing VM instance, click on the “Create” button on the VM instances page to create your first GCP instance. Else, click the “Create Instance” button at the top menu bar to create another new instance.

GCP create vm instance

Give your instance an awesome name and select a zone (location) for the instance. I recommend you to use a zone that is nearest to your target users/visitors to benefit from the lowest latency possible.

Machine Type

Under Machine type, select one of the predefined GCP machine types for your instance. Each machine type gives you a certain number of vCPUs (virtual Central Processing Unit) and amount of memory.

If none of the predefined machine types match your needs, you can create your own custom machine type by specifying the number of CPUs and the amount of memory for your instance.

Boot Disk

GCP create instance boot disk

Next, you need to attach an Ubuntu 16.04 LTS boot disk to your instance because RunCloud only supports Ubuntu 16.04 at the moment. Click the “Change” button under Boot disk, then select “Ubuntu 16.04 LTS”.

For Boot Disk Type, use “SSD persistent disk” for better performance. Or, use “Standard Persistent Disk” if you want to reduce your storage costs. The boot disk size is customisable from 10 GB to 65,536 GB.

Allow HTTP/S traffic

GCP allow HTTPS traffic

Finally, make sure you tick both “Allow HTTP traffic” and “Allow HTTPS traffic” under Firewall section. This is important so that your Google Cloud server is accessible on the internet.

Click the “Create” button to build your Google Cloud server (instance). Now you have a server on the Google Cloud Platform!

2. Assign an static IP address to your server

By default, Google Cloud instances are assigned an ephemeral external IP address. This means a new ephemeral IP address will be assigned to your instance whenever it is stopped and started again.

If an instance is stopped, any ephemeral external IP addresses assigned to the instance are released back into the general Compute Engine pool and become available for use by other projects. (GCP Documentation)

RunCloud is not able to manage your server if its IP address changes without reconfiguring the connection on every change (see the tip below). We need to assign a static IP address to our GCP instance to connect it to the RunCloud platform.

It is easy to “upgrade” an ephemeral external IP address to a static IP address:

gcp-static-ip-address

  1. Goto “VPC network” > “External IP addresses”
  2. Find your instance’s External Address.
  3. Click “Ephemeral” under Type, then select “Static” from the dropdown menu to reserve the current (ephemeral) IP address to your instance (static IP address).
  4. The IP address type will be updated to “Static”. Now your GCP instance has a static IP address.

Tip: In case your RunCloud managed server’s IP address does change, you can use RunCloud’s Change IP Address feature to update its IP address and reconnect it to RunCloud.

3. Allow RunCloud to access Google Cloud server

In order to allow RunCloud to communicate with your Google Cloud server, we need to open the RunCloud port (TCP port 34210) at your GCP Firewall.

From the left hand sidebar, goto “VPC network” > “Firewall rules”. Click on “Create Firewall Rule” from the top menu then use the following settings to create a new firewall rule:

Name: runcloud-port
Description: Required by RunCloud to access Google Cloud server
Network: default
Priority: 1000
Direction of traffic: Ingress
Action on match: allow
Targets: All instances in the network
Source filter: IP ranges
Source IP ranges: 0.0.0.0/0
Protocols and ports: specified protocols and ports: tcp:34210

It will allow all incoming traffic from any IP address to your server’s TCP port 34210. You can read more about the firewall rules at Google Cloud documentation.

The opened TCP port 34210 at GCP firewall will be protected by RunCloud’s firewall at your server.

4. Connect GCP server to RunCloud

RunCloud connect new server

Now your Google Cloud server is ready. RunCloud can connect to it and add some magic.

Login to your RunCloud panel and connect a new server using the GCP instance’s external IP address. Copy the RunCloud installer script command provided.

Back to GCP console and find your server under VM instances. Click on the “SSH” under Connect to launch GCP web-based terminal and run commands on your server.

We need to run the RunCloud installer script command as “root” user but GCP does not provide “root” password.

No worries!

We can use command sudo -s to start a “root” shell. Then, paste and run the RunCloud installer script command. Sit back and enjoy the magic show!

The RunCloud installation will take a few minutes to complete. You can check the installer progress at the RunCloud panel too.

Once it is completed, write down the MySQL root password, username, and password. This is important!

Back to the RunCloud panel and you will see your Google Cloud server’ summary. Now you can deploy your web applications on GCP with a few clicks!

Summary

In this tutorial, you learned how to create a custom Google Cloud server that matches your needs and assign a static IP address to it. You also learned how to add a custom GCP firewall rule to open a port for RunCloud.

Now you can use RunCloud panel to manage your Google Cloud server and web applications.

The Google Cloud Platform offers an amazing PaaS solution for cloud hosting, but it is only one of many amazing solutions, and RunCloud works with them all. Sign up today for a free trial to manage a Cloud server from any provider with RunCloud.

Ready to get started?

Start your free trial today.

Start My 5-Days Free Trial no credit card required

4 responses to “How to Setup Google Cloud Server with RunCloud in 10 minutes (Video Tutorial)”

  1. Rig says:

    It doesn’t work. When you follow the steps and copy script. It shows:

    Acquire::ForceIPv4 “true”;
    Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
    Hit:2 http://europe-west3-a.gce.clouds.archive.ubuntu.com/ubuntu xenial InRelease
    Hit:3 http://europe-west3-a.gce.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease
    Hit:4 http://europe-west3-a.gce.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease
    Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
    Reading package lists… Done
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    curl is already the newest version (7.47.0-1ubuntu2.8).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Calculating upgrade… Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    bash: line 1: syntax error near unexpected token `newline’
    bash: line 1: `’
    (23) Failed writing body

    • admin says:

      The registered server IP address isn’t same as the GCP server. run curl -s ipinfo.io | grep ip inside your GCP server to check the ip

  2. Bred says:

    Port 34210 issue.
    Port is opened in the firewall, however, I always get this message:
    Unable to connect through port 34210 inside #
    # this server. Please disable firewall for this #
    # port and rerun the installation script again!

    It is just annoying. Is Ubuntu 18.04 supported? Maybe I should try with 16.04?

  3. […] add a LetsEncrypt certificate and install WordPress on a Google Cloud in 15 minutes thanks to this handy guide. With the extra benefit that it’s either free if you want to do the SSL part yourself, or […]

Leave a Reply

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