- Published on
How to Set Up Your First Firebase Project in 10 Minutes
Setting up your first Firebase project takes less than 10 minutes and gives you access to professional-grade tools like databases, user authentication, and file storage. By following a few simple steps in the Firebase Console, you can connect a web or mobile app to a powerful backend without writing complex server-side code.
What is Firebase and why should you use it?
Firebase is a Backend-as-a-Service (BaaS - a platform that handles server-side tasks so you don't have to) owned by Google. It allows developers to build apps faster by providing pre-made tools for logging in users, storing data, and hosting websites.
Instead of setting up your own physical servers or managing complex databases, you interact with Firebase through a simple web interface and a few lines of code. It scales automatically, meaning it handles ten users or ten thousand users without you needing to change your setup.
We've found that Firebase is often the best choice for beginners because it offers a generous free tier called the "Spark Plan." This allows you to experiment and launch small projects at zero cost while learning how modern cloud infrastructure works.
What do you need to get started?
Before you begin the setup process, ensure you have a few basic tools ready on your computer. Having these prepared will prevent errors during the installation phase.
- A Google Account: You need a standard Gmail or Google Workspace account to log into the Firebase Console.
- Node.js (Version 24.0 or higher): This is a JavaScript runtime (a tool that lets you run code outside of a browser). You can download it from the official Node.js website.
- A Code Editor: Most developers use Visual Studio Code (VS Code), which is a free program for writing and editing your project files.
- Basic Terminal Knowledge: You should know how to open your computer's Command Prompt or Terminal to type in simple commands.
How do you create a project in the Firebase Console?
The Firebase Console is your central dashboard for managing everything related to your app. Follow these steps to create your first container for your data.
Step 1: Sign in to the Console Visit the Firebase Console website and sign in with your Google account. You will see a welcoming screen with a large button to start a new project.
Step 2: Name your project Click the "Add project" button. Enter a unique name for your project, such as "my-first-web-app," and accept the Firebase terms.
Step 3: Decide on Google Analytics Firebase will ask if you want to enable Google Analytics (a tool that tracks how people use your app). For a first-time learning project, you can toggle this off to keep things simple, then click "Create project."
Step 4: Wait for initialization Firebase will take about 30 seconds to provision (set up and allocate) your resources. Once the "Your new project is ready" message appears, click "Continue" to enter your project dashboard.
How do you register your app with Firebase?
Now that you have a project, you need to tell Firebase what kind of app you are building. This creates a link between your code and the Google servers.
Step 1: Choose your platform
On the project overview screen, you will see icons for iOS, Android, and Web (the < > icon). Click the Web icon to start the registration.
Step 2: Give your app a nickname Enter a nickname for your app. You don't need to check the box for "Firebase Hosting" right now, as you can add that later. Click "Register app."
Step 3: Copy your configuration object
Firebase will display a block of JavaScript code containing your firebaseConfig. This includes your API Key (a unique string of letters and numbers that identifies your project) and other technical details.
Step 4: Save the credentials Copy this code block and paste it into a temporary text file. You will need these specific details in the next section when you start coding.
How do you install the Firebase SDK in your code?
To make your app talk to Firebase, you must install the SDK (Software Development Kit - a collection of pre-written code that helps you interact with a specific service). We will use the terminal for this part.
Step 1: Initialize your local project
Open your terminal, create a new folder for your project, and move into it. Type npm init -y to create a package file for your project.
Step 2: Install the Firebase package
Run the following command in your terminal:
npm install [email protected] (or the latest stable version).
Step 3: Create your configuration file
Create a file named firebase-config.js in your project folder. Paste the configuration object you copied earlier into this file.
Step 4: Initialize the app in code Add the following lines to the top of your file to start the connection:
// Import the functions you need from the SDKs
import { initializeApp } from "firebase/app";
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "your-project.firebaseapp.com",
projectId: "your-project-id",
storageBucket: "your-project-id.firebasestorage.app", // Modern 2026 format
messagingSenderId: "123456789",
appId: "1:123456789:web:abcdef"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
console.log("Firebase is ready!");
What are the common mistakes beginners make?
It is normal to run into a few bumps when setting up cloud services for the first time. Don't worry if things don't work immediately; usually, it is a small configuration error.
One common issue is forgetting to enable specific services in the dashboard. For example, if you want to store user data, you must manually go to the "Firestore Database" tab in the console and click "Create Database," otherwise your code will receive a "permission denied" error.
Another frequent mistake is "leaking" your API keys by uploading them to public websites like GitHub. While Firebase keys are generally safe to be public because you protect your data with "Security Rules," it is a good habit to use environment variables (hidden files that store sensitive info) to keep your credentials private.
Finally, make sure your Node.js version is up to date. Using an outdated version of Node can cause the Firebase installation to fail with strange error messages that are hard to debug.
How do you set up Security Rules?
Security Rules are instructions that tell Firebase who is allowed to read or write data. By default, Firebase starts in "Locked Mode," which means no one can access your database.
To change this for testing, go to your Firestore or Storage tab in the console and click the "Rules" tab. You can set them to "Test Mode," which allows access for 30 days while you build your prototype.
Just remember that Test Mode is not for real apps with real users. Before you launch, you must write rules that verify if a user is logged in before they can change any information.
Next Steps
Now that your project is connected, you can start adding features. Try setting up "Firebase Authentication" to let users sign in with their email, or "Cloud Firestore" to save text data in real-time.
You might also want to explore Firebase Hosting, which lets you deploy (upload and make live) your website to a global URL for free. The more you experiment with the different tabs in the console, the more comfortable you will become with cloud development.
For detailed guides on every specific feature, check out the official Firebase documentation.