[GUIDE(1/1)] Host your website for free on Google Cloud

Discussion in 'Web Hosting' started by aka_ab, Mar 9, 2018.

  1. aka_ab

    aka_ab Regular Member

    Joined:
    Dec 1, 2017
    Messages:
    255
    Likes Received:
    77
    Gender:
    Male
    I have come across many people asking for questions about free/cheap reliable hosting. But unfortunately the ones that are free are not reliable.
    Beginners can always start with free shared hosting but if you are someone like me who likes to customize their sites to give their customers the best experience Shared hosting is not for you. I have lot of plugins installed and shared hosting cannot even manage the load even with very little traffic.
    If you are a beginner who is afraid to shell out some cash to see how things work or if you are some one on a tight budget and looking to reduce costs wherever possible, then this guide is for you guys.

    I decided to write a guide on how to host Wordpress websites on google cloud for free. I do want to make this guide difficult to follow by vomiting all the steps in a single guide. So, I have decided to split the guides into parts. I will keep writing successive guides whenever I find time or based on the response for this one.

    First things first, sign up on Google Cloud. Add your card. They wont bill you unless you enable billing.

    Code:
    https://cloud.google.com/ (non-affiliate link)
    After you have signed up, you will have $300 worth credits for one year.

    Navigate to Cloud Resource Manager by accessing this link

    Code:
    https://console.cloud.google.com/cloud-resource-manager
    Now click on create project
    Code:
    https://imgur.com/a/FSmWE
    Give a name for your project.

    Now go to your cloud manager.

    Code:
    https://console.cloud.google.com/
    Now select the project you just created.
    It's now time to create a VM instance.

    Give it a name in the name column.

    Select the zone that is nearest to target country.

    You can play with machine types.

    I would recommend a 1 vCPU and min of 1gb of ram for a Wordpress installation. So you select 'small' as your machine type. Again, you can set it to whatever you want. Click on customize to customize your configuration.

    When you select 'micro' as your machine type, it is free forever.

    Your cost would be displayed realtime on the right side. This is how much you will be charged from your $300 credit every month.

    Code:
    https://imgur.com/a/QCUld
    Now, you have to select a boot disk and persistence disk.

    Boot disk is basically your operating system. And persistence disk is for your data. You are free to choose the size and the type of disk you require. I recommend 10GB SSD for single Wordpress installation.

    Now you have to choose an operating system for your server. It can be done by clicking the ' Change' button on the right side. Again you can choose from the list or you can even deploy a custom image. I would recommend choosing either Ubuntu 16.04 LTS or Cent OS 7. I will stick to
    Cent OS 7 for the rest of the this guide. If you choose Ubuntu you will have to replace yum -y install with apt-get install and certain other commands with their ubuntu equivalents.

    Under the firewall option select both 'http' and 'https' traffic.

    Code:
    https://imgur.com/a/jUbd5
    Now click on create instance.

    You can now access your machine by clicking on the SSH button.

    Code:
    https://imgur.com/a/tBcoC
    You will now have a pop window with a SSH tunnel to connect to your machine. This is the only way you can access your machine. If you want to access your machine from your local machine or any other machine you will have to enable OS Login and generate public and private SSH keys.

    I am comfortable using the Google Cloud SSH console so I will not be covering how to access your virtual machine from your local machine in this guide. But, if you guys want me to cover that too, post in the thread and I will make a separate guide on it.

    The first thing to do after you have enabled a SSH connection to your virtual machine is to change the root password.

    To change the root password, copy and paste this code in the SSH Console.

    Code:
    sudo passwd
    You will be asked to enter a new password and confirm it once again. Upon completing the process successfully you will get this message.

    Code:
    passwd: all authentication tokens updated successfully.
    Now if you have enabled OS Login, you have to disable root login, create a new user, grant the user root privileges to safeguard your machine from basic security threats. I am not covering it in this guide, as I said above I would make a guide separately if you guys want.

    That's all for now. In the successive guides I will compare different webservers and installing your desired server on your machine with a control panel of your choice, pointing your domain to your machine, installing wordpress, hosting site, caching, etc.

    I hope atleast one of you will find this guide useful.
     
    • Thanks Thanks x 7
  2. ryzen

    ryzen BANNED BANNED

    Joined:
    Feb 27, 2018
    Messages:
    64
    Likes Received:
    15
    Gender:
    Male
    I'll try this later on today. This is just what I need for running my site.
     
  3. aka_ab

    aka_ab Regular Member

    Joined:
    Dec 1, 2017
    Messages:
    255
    Likes Received:
    77
    Gender:
    Male
    Sure, Feel free to PM me if you got stuck up somewhere.
     
  4. artoxzehz

    artoxzehz Registered Member

    Joined:
    Nov 25, 2015
    Messages:
    63
    Likes Received:
    7
    Location:
    On a cloud
    This is going to save me money. Thanks! :)
     
  5. ryzen

    ryzen BANNED BANNED

    Joined:
    Feb 27, 2018
    Messages:
    64
    Likes Received:
    15
    Gender:
    Male
    Thanks alot mate. Appreciate it
     
  6. BassTrackerBoats

    BassTrackerBoats Super Moderator Staff Member Moderator Jr. VIP

    Joined:
    Mar 10, 2010
    Messages:
    20,095
    Likes Received:
    37,060
    Occupation:
    Linkpushing, A New Era - Now Live!
    Location:
    As Close to Heaven as One Can Get!
    Home Page:
    It would be tons better if he posted any issues here in the thread so that many would benefit as opposed to just one.
     
    • Thanks Thanks x 1
  7. aka_ab

    aka_ab Regular Member

    Joined:
    Dec 1, 2017
    Messages:
    255
    Likes Received:
    77
    Gender:
    Male
    Glad that it helped you!

    Sure. Post here on the thread and I will reply..!
     
    • Thanks Thanks x 1
  8. TheDisruptor

    TheDisruptor Registered Member

    Joined:
    Mar 4, 2018
    Messages:
    75
    Likes Received:
    25
    Gender:
    Male
    Nice guide OP. Definitely will be useful for newbies like me
     
  9. aka_ab

    aka_ab Regular Member

    Joined:
    Dec 1, 2017
    Messages:
    255
    Likes Received:
    77
    Gender:
    Male
    Thanks. Glad that it helped you!
     
  10. PLR

    PLR Newbie

    Joined:
    Dec 23, 2017
    Messages:
    25
    Likes Received:
    2
    Gender:
    Male
    Is there any videos about it on YouTube that is simple to follow ?
     
  11. pasdoy

    pasdoy Senior Member

    Joined:
    Jul 17, 2008
    Messages:
    861
    Likes Received:
    274
    same thing can be one with AWS 12 month free tier if you need another one.
     
  12. aka_ab

    aka_ab Regular Member

    Joined:
    Dec 1, 2017
    Messages:
    255
    Likes Received:
    77
    Gender:
    Male
    Sorry I don't know. You can search!

    Yes. AWS can also be used. But in AWS we get only lower configuration but in GCP we can choose our configuration and pay for it from the credits.
     
  13. 99anhadi

    99anhadi Newbie

    Joined:
    Feb 5, 2018
    Messages:
    10
    Likes Received:
    0
    Gender:
    Male
    Location:
    Indonesia
    Home Page:
    Thanks;)
     
  14. pasdoy

    pasdoy Senior Member

    Joined:
    Jul 17, 2008
    Messages:
    861
    Likes Received:
    274
    True, personally I burned way more than 300$ in my AWS 12 month trial because I also used other services.
     
  15. Zenithcion

    Zenithcion Newbie

    Joined:
    Mar 13, 2018
    Messages:
    7
    Likes Received:
    0
    Please how can I active Roberts.txt in other to allowed Google to crawl my website
     
  16. Rains

    Rains Junior Member

    Joined:
    Apr 8, 2015
    Messages:
    111
    Likes Received:
    30
    Gender:
    Male
    Occupation:
    home-work
    Location:
    Asia
    Home Page:
    im using it for a few month now, Google cloud+Serverpilot :D (panel makes life easier :3 ). i also try the windows RDP from Google cloud but its suck for download/upload
     
  17. Zenithcion

    Zenithcion Newbie

    Joined:
    Mar 13, 2018
    Messages:
    7
    Likes Received:
    0
    Thanks for the replied but Google cloud+Serverpilot don't have free trial
     
  18. Local SEO CA

    Local SEO CA Newbie

    Joined:
    Mar 13, 2018
    Messages:
    8
    Likes Received:
    3
    Gender:
    Female
    Occupation:
    Local SEO Services
    Location:
    Califonia
    it is not free. I need credit card.