Get started with App Hosting

With an existing Next.js or Angular app (Next.js versions 13.5.x+ or Angular 18.2.x+) in a GitHub repository, getting started with App Hosting can be as straightforward as creating an App Hosting backend and then starting a rollout with a push to your live branch. If you don't have an app, use one of our sample apps to walk through the steps described in this guide.

For AI assistance, copy the prompt below into your AI coding agent (like Antigravity, Claude Code, Codex, and Cursor). You can customize the prompt and iterate with your agent. Visit Firebase agent skills for detailed installation info.

Help me use Firebase in my app.
1. Make sure that **Firebase agent skills** are installed and updated. For Claude Code, Codex, or Cursor agents, help me install the Firebase plugin. For other agents, run `npx skills add firebase/agent-skills`. Always try to use **Firebase agent skills** for Firebase-related tasks.
2. Help me use Firebase to host my web app. Set up my app to use Firebase, and then deploy my app.

This guide describes how to set up App Hosting in the Firebase console to automatically deploy every time a new commit is made to a GitHub repository. At the end of this flow you'll have a live Next.js or Angular example app that is redeployed every time you commit a new change to your GitHub repository's main branch.

Though this guide focuses on the recommended Firebase console flow, there are other ways to deploy, including using the Firebase CLI to deploy local code without a GitHub connection.

Step 1: Fork the demo repository

Visit https://github.com/firebase/apphosting-adapters and select Fork.

Step 2: Create an App Hosting backend

  1. In the Firebase console, navigate to Hosting & Serverless > App Hosting.

  2. Click Get started.

  3. If prompted, upgrade to the pay-as-you-go Blaze pricing plan to use App Hosting.

A screenshot of App Hosting backend setup.

Follow the prompts to complete these steps:

  • Choose a primary region (usually the region closest to your users).
  • Connect to GitHub. Choose the repository you just created by forking the apphosting-adapters repository.
  • Set your app's root directory to one of the following:
  • Set the live branch as main.
  • Enable automatic rollouts (automatic rollouts are enabled by default).
  • Assign a name to your backend.
  • Select your runtime environment. By default, the newest recommended Node.js version is pre-selected for you.
    • Configure