You're viewing the legacy docs. They are deprecated as of May 18, 2016.
Go to current docs

5 minute quickstart

Hosting Quickstart

Easily deploy and host your app's static assets (HTML, CSS, JavaScript, etc) with our production-grade hosting service. All of your content is served over HTTPS and backed by a global CDN.

Setup the Firebase command line tools

First Time Installation

The Firebase command line tools require Node.js and npm, which can both be installed by following the instructions on https://nodejs.org/. Installing Node.js also installs npm.

The Firebase command line tools require Node.js version 0.10.0 or greater.

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

$ npm install -g firebase-tools

# or use sudo (with caution) if required by your system permissions
# sudo npm install -g firebase-tools

This installs the globally available firebase command.

Updating Previously Installed Firebase Tools

If you have a previously installed version of Firebase command line tools, you can easily update them to the latest version:

$ npm update -g firebase-tools

# or use sudo (with caution) if required by your system permissions
# sudo npm update -g firebase-tools

Initialize your app

Once you've chosen the Firebase app you'd like to deploy, cd into your project directory and run the command:

$ firebase init

Then you'll be prompted to select the Firebase app you'd like to deploy. You only ever need to run this init command once.

Running the firebase init command will create a firebase.json settings file in the root of your project directory. You can learn more about this file in the Advanced Configuration section of the guide.

Deploy your website

To deploy your website simply run:

$ firebase deploy

Your app will be deployed to the domain <YOUR-FIREBASE-APP>.firebaseapp.com

Custom domains are available with our paid Firebase plans. See our custom domains screencast for setup instructions.

Manage and rollback deploys

From the Hosting tab in your App Dashboard you can see a full history of your deploys. To rollback to a previous deploy, click on the arrow icon on the right.

Now your app is ready to share with the world! For more details on Firebase Hosting, check out our complete hosting documentation and the documentation for our command line tool.