Google Cloud (A) – Host website on the Google Cloud Platform

  1. Register Google Cloud Account and create an VM
  2. Install and Running LAMP (Linux, Apache, Mysql, PHP)
  3. Google Cloud FTP Setup with FileZilla
  4. Change Your Domain Name to Google Cloud

1. Register Google Cloud Account and create an VM

Go to and register an account for it.

Go to Console

  • Compute Engine -> VM Instance
  • Create an new Instance (select what you need for your machine)

To get free machine, choose: micro 1 share vCPU and 0.6GB Memory, this is free provide by Google Cloud

For Boot Disk: I choose Ubuntu 16.04 LTS with SPD 30GB.

Make sure allow Http and https traffic.

2. Install and Running LAMP (Linux, Apache, Mysql, PHP)

Connect your server by SSH, open with Brower.

Depends on which Boot Disk you chose:

Please check this

Follow the instruction from above link and it will get you done for the installation.

My procedure will be on below, pretty much just follow above link.

A. Get the root permission and update server first

sudo passwd create your own password
su login to your root user
apt-get update update server
apt-get upgrade  

B. Install the Apache Web Server

apt-get install apache2  
systemctl start apache2  
systemctl enable apache2  
systemctl status apache2 if you see active (running) then good to go

C. Install the MySQL Database Server

apt-get install mysql-server  
mysql_secure_installation   answer those questions
for the installation:
Mine: remove anonymous,
disallow root login remotely,
remove the test database, and
reload privilege tables now.
systemctl start mysql start mysql
systemctl enable mysql  

D. Install PHP

apt-get install php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-mbstring php7.0-gd php7.0-xml php7.0-xmlrpc php7.0-intl php7.0-soap php7.0-zip
nano /var/www/html/info.php <?phpphpinfo();?>   create php info.
systemctl restart apache2 start apache

3. Google Cloud FTP Setup with FileZilla

Below link will walk you through, it’s very detail.

  1. download and Install Putty and Filezilla
  2. generate SSH key (will take long time)
  3. Copy and save the keys
  4. Paste public key in google cloudCompute engine -> metadata -> ssh key-> edit-> add item
  5. Upload private key in fileZilla, Edit -> setting ->  sftp-> add  key file -> upload key
  6. Connect to google cloud
  7. Copy vm instance’s external ip to filezilla, input as sftp://[external ip], username:

4. Change Your Domain Name to Google Cloud

This YouTube video will walk you through

Here is brief step:

  1. Go to API Manager -> Library : Search for ‘DNS’, you will see ‘google cloud DNS API’, enable it
  2. Go to Networking -> Cloud DNS, create Zone name and DNS name (for example: domain and
  3. Add record-> A record, put your external IP address to IPv4 Address
  4. Add another Record -> A Record,, link with external IP
  5. Go to your domain name provider, change DNS server name to google. Ns-cloud-…allow days to update.

About: Raymond