Get started with App Hosting  |  Firebase App Hosting

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.

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.

Follow the prompts to complete these steps:

Select Finish and deploy.

Step 3: View the deployed app

When you create a backend, Firebase gives you a no-cost subdomain where end users can visit your web app. Its format is backend-id--project-id.us-central1.hosted.app.

In the Backend information row in the dashboard for your backend, select the link to your live backend to view your new website:

Step 4: Trigger a rollout by pushing a change

Once your backend is created and you have a live URL, you can trigger the rollout of a new version of your web app whenever you push changes into the live branch of your GitHub repository. To perform a test of your App Hosting setup:

  1. In your fork of the demo GitHub repository, navigate to the source of the demo app home page, make any recognizable edit you like, and then push your change to the main branch. To find your home page:
    • Next.js:/starters/nextjs/basic/src/app/page.tsx
    • Angular:/starters/angular/basic/src/app/pages/home/home.component.html
  2. In the Firebase console, monitor App Hosting as your new change is rolled out to production. When the rollout is complete, you can view your change in the app's home page.

Next steps