If you are building server-rendered Angular or Next.js apps, check out next-generation Firebase App Hosting, a full-stack solution for modern web frameworks.
Stay organized with collections
Save and categorize content based on your preferences.
Firebase Hosting integrates with popular modern web frameworks including Angular
and Next.js. Using Firebase Hosting and Cloud Functions for Firebase with these
frameworks, you can develop apps and microservices in your preferred framework
environment, and then deploy them in a managed, secure server environment.
Support during this early preview includes the following functionality:
Deploy Web apps comprised of static web content
Deploy Web apps that use pre-rendering / Static Site Generation (SSG)
Deploy Web apps that use server-side Rendering (SSR)—full server rendering on demand
Firebase provides this functionality through the Firebase CLI. When initializing
Hosting on the command line, you provide information about your new or existing
Web project, and the CLI sets up the right resources for your chosen Web
framework.
Before you begin
Before you get started deploying your app to Firebase,
review the following requirements and options:
Firebase CLI version 12.1.0 or later. Make sure to
install the CLI
using your preferred method.
Optional: Billing enabled on your Firebase project
(required if you plan to use SSR)
Serve locally
You can test your integration locally by following these steps:
Run firebase emulators:start from the terminal. This builds your app and
serves it using the Firebase CLI.
Open your web app at the local URL returned by the CLI (usually http://localhost:5000).
Deploy your app to Firebase Hosting
When you're ready to share your changes with the world, deploy your app to your
live site:
Run firebase deploy from the terminal.
Check your website on: SITE_ID.web.app or PROJECT_ID.web.app (or your custom domain, if you set one up).
Configure different environments
You can deploy multiple sets of environment variables for different project environments, such as staging and production.
Like Cloud Functions for Firebase, this tooling supports the dotenv file format for loading environment variables specified in a .env file.
If you have a staging project alias, you can deploy environment variables from a .env.staging file.
If you have a production project alias, you can deploy environment variables from a .env.production file.
If you have a project with id PROJECT_ID, you can deploy environment variables from a .env.PROJECT_ID file.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-27 UTC."],[],[],null,["\u003cbr /\u003e\n\nFirebase Hosting integrates with popular modern web frameworks including Angular\nand Next.js. Using Firebase Hosting and Cloud Functions for Firebase with these\nframeworks, you can develop apps and microservices in your preferred framework\nenvironment, and then deploy them in a managed, secure server environment.\n\nSupport during this early preview includes the following functionality:\n\n- Deploy Web apps comprised of static web content\n- Deploy Web apps that use pre-rendering / Static Site Generation (SSG)\n- Deploy Web apps that use server-side Rendering (SSR)---full server rendering on demand\n\nFirebase provides this functionality through the Firebase CLI. When initializing\nHosting on the command line, you provide information about your new or existing\nWeb project, and the CLI sets up the right resources for your chosen Web\nframework.\n| **Note:** Framework-aware Hosting is an early public preview. This means that the functionality might change in backward-incompatible ways. A preview release is not subject to any SLA or deprecation policy and may receive limited or no support.\n\nBefore you begin\n\nBefore you get started deploying your app to Firebase,\nreview the following requirements and options:\n\n- Firebase CLI version 12.1.0 or later. Make sure to [install the CLI](/docs/cli#install_the_firebase_cli) using your preferred method.\n- Optional: Billing enabled on your Firebase project (required if you plan to use SSR)\n\nServe locally\n\nYou can test your integration locally by following these steps:\n\n1. Run `firebase emulators:start` from the terminal. This builds your app and serves it using the Firebase CLI.\n2. Open your web app at the local URL returned by the CLI (usually http://localhost:5000).\n\nDeploy your app to Firebase Hosting\n\nWhen you're ready to share your changes with the world, deploy your app to your\nlive site:\n\n1. Run `firebase deploy` from the terminal.\n2. Check your website on: `SITE_ID.web.app` or `PROJECT_ID.web.app` (or your custom domain, if you set one up).\n\nConfigure different environments\n\nYou can deploy multiple sets of environment variables for different project environments, such as staging and production.\n\nLike Cloud Functions for Firebase, this tooling supports the [dotenv](https://www.npmjs.com/package/dotenv) file format for loading environment variables specified in a .env file.\n\n- If you have a `staging` project alias, you can deploy environment variables from a `.env.staging` file.\n- If you have a `production` project alias, you can deploy environment variables from a `.env.production` file.\n- If you have a project with id `PROJECT_ID`, you can deploy environment variables from a `.env.PROJECT_ID` file.\n\nSee the [Cloud Functions documentation](https://firebase.google.com/docs/functions/config-env?gen=2nd#deploying_multiple_sets_of_environment_variables) for a detailed guide.\n\nNext steps\n\nSee the detailed guide for your preferred framework:\n\n- [Angular](/docs/hosting/frameworks/angular)\n- [Next.js](/docs/hosting/frameworks/nextjs)\n- [Flutter Web](/docs/hosting/frameworks/flutter)\n- [Frameworks with Express.js](/docs/hosting/frameworks/express)"]]