Deploy Your Site

Firebase Hosting gives you a fast, secure, and reliable way to host your app's static assets such as HTML, CSS, JavaScript, and media files. Our production-grade hosting is backed by a global CDN, serves content over SSL by default, and is available either on your own custom domain or on a subdomain of firebaseapp.com.

Get started

To get started with Firebase Hosting, go to your project's Firebase Hosting page, then click Get Started.

Next, install the Firebase CLI (a command line tool) so that you can initialize and deploy your site.

Install the Firebase CLI

The Firebase CLI (Command Line Interface) requires Node.js and npm, which can both be installed by following the instructions on https://nodejs.org/. Installing Node.js also installs npm.

Once you have Node.js and npm installed, you can install the Firebase CLI via npm:

npm install -g firebase-tools

This installs the globally available firebase command. To update to the latest version, simply re-run the same command.

Access your Firebase projects

To connect your local machine to your Firebase account and obtain access to your Firebase projects, run the following command:

firebase login

Initialize your site

From the root of your project directory, run the following command:

firebase init

The firebase init command creates a firebase.json configuration file in the root of your project directory. This file is required to deploy your site using the CLI. You can customize your Hosting configuration in the firebase.json file.

Deploy your site

To deploy your site, run the following command from your project's root directory:

firebase deploy

This command deploys a release to your Firebase project's default Hosting site, your-firebase-project-id.firebaseapp.com, and any custom domains that you've connected to your Hosting site.

Manage and rollback deploys

From your project's Hosting page, you can see a full history of your deploys. If you have multiple Hosting sites, click View for the desired site to see its deployment history.

To rollback to a previous deploy, hover over its entry in the list, click the overflow menu icon, then click Rollback.

Send feedback about...

Need help? Visit our support page.