Skip to main content

Command Palette

Search for a command to run...

How to Host a Website on Google Cloud Platform using Firebase 🌤️

Published
3 min read
How to Host a Website on Google Cloud Platform using Firebase 🌤️
R

Hey, this is Roshan. You can explore my professional background and vision below.✌🏻 With a following of over 90k+, I talk about startups, technology, and business on social media. I've worked with Edtech companies like Unstop, Coding Ninjas, Coding Blocks, UpGrad, Heycoach, Hubspot, and more on their social media marketing campaigns, leading to exceptional results in the sales of the companies.

I also co-founded a remote AI-driven IT Firm based out of the UAE called "Volans Aquilae" with my fellow mate Vishal Singh, where we help startups, small & medium-sized businesses, and individuals with AI-driven Software Solutions and IT services, along with revamping their business through digital transformation.

I mentored 30+ professionals/undergrads on Platforms like Topmate.io, helping them with career mentorship, public learning, opportunity hunting, and LinkedIn profile optimization, resulting in getting a 5/5 rating on Topmate.io, along with being categorized in the Top 1% on the platform.

My expertise in Sales, Marketing & Client Acquisition, along with my partner Vishal Singh, helped us form a successful company powered by Top MNCs like Meta, Microsoft, Zoho, and Semrush, with over 50+ NDA partnerships all over the globe in Thailand, Indonesia, Vietnam, Malaysia, and India. And successfully serving in the US, UK, and European markets.

My technical expertise spans cloud-native and AI-driven systems across AWS, Azure, and GCP. I specialize in Docker, Kubernetes, Terraform, and Python-based microservices with robust CI/CD pipelines. My focus includes serverless solutions, cloud security, and Agentic AI development featuring autonomous agents and multi-agent orchestration.

I've delivered webinars at 3+ colleges nationwide, covering cloud computing, startups, online opportunities, and productivity strategies. Additionally, I've taught DevOps and Cloud Computing in college communities like GDSC and Scalent LPU, mentoring students in Google Cloud-powered events.

Feel free to reach out for project discussions, business consultations, or professional opportunities.

You can contact me at roshansharma171020@gmail.com.

Hosting a website on the cloud is a cost-effective and scalable solution for businesses and individuals alike. Google Cloud Platform (GCP) and Firebase are two popular platforms that offer a range of services for hosting and building web applications.

In this article, we will guide you through the process of hosting a website on GCP using Firebase, a serverless platform for building web and mobile applications. By the end of this article, you will have a fully-functional website hosted on the Google Cloud.

Prerequisites:

  • A Google account. If you don’t have one, you can create one for free.

  • A basic understanding of Firebase and GCP.

Step 1: Set up Firebase

  • Go to the Firebase website (https://firebase.google.com/) and sign in with your Google account.

  • Click on the “Get Started” button and select “Create a project”.

  • Give your project a name, select your country, and click on the “Create Project” button.

Step 2: Deploy your website

  • Go to the Firebase Hosting section and click on the “Get started” button.

  • Follow the instructions to set up a new site. You will need to install the Firebase CLI (Command Line Interface) on your computer. The instructions for doing so are provided on the Firebase website.

  • Once you have installed the CLI, open a terminal window and navigate to the root directory of your website.

  • Run the following command: “firebase init”. This will initialize a Firebase project in your current directory.

  • When prompted, select the Firebase Hosting option and then choose the project you created earlier.

  • Follow the instructions to configure your website. You will be asked to specify the public directory, which is the directory that contains your website files.

  • Once the configuration is complete, run the following command to deploy your website: “firebase deploy”. This will upload your website files to Firebase and make them available to the public.

Step 3: Connect your website to GCP

  • Go to the Google Cloud Console (https://console.cloud.google.com/).

  • Click on the “Select a project” drop-down menu and select the project you created earlier.

  • Go to the Firebase Hosting section and click on the “Connect to GCP” button.

  • Follow the instructions to connect your Firebase project to GCP. This will give you access to additional services and resources on GCP.

Step 4: Verify your website

  • Go to the Firebase Hosting section and click on the “Visit Website” button.

  • Your website should now be live and accessible to the public.

Congratulations! You have successfully hosted your website on Google Cloud using Firebase. Firebase provides a serverless platform for building and hosting web applications, making it a great choice for developers who want to focus on building their applications without having to worry about managing servers.

GCP provides a range of additional services and resources for building and hosting web applications, making it a powerful platform for hosting your website. With the help of this guide in the form of an article, you should be able to get your website up and running in Google Cloud in no time.

If you have any questions or need additional help, feel free to reach out to the comments section & follow for more! 😇

More from this blog

Roshan Sharma Blogs 🚀

30 posts

Hi, I’m Roshan 👋. I have an underrated love for technical writing. I love to across a wide spectrum of technical topics.