Deploy Angular & Next.js apps with App Hosting, now GA!

Ready to host your production server-rendered web apps on Google Cloud.

Last year at Google I/O 2024, we launched the first public preview of App Hosting, our serverless web hosting service built for modern, full-stack web apps - think streamlined deployments for Angular and Next.js in a fully managed environment. You import your GitHub repo, and App Hosting handles the rest. App Hosting automatically sets up CI/CD to run static site generation, deploys server-rendered content to Cloud Run, caches static content on a global CDN, and takes care of all the networking bits in between. By abstracting away the infrastructure, you can focus on building your web apps, knowing you have an automatically scaling and secure platform.

An architecture diagram showing the Google Cloud services App Hosting orchestrates
An architecture diagram showing the Google Cloud services App Hosting orchestrates

Since that initial preview, we’ve continued to ship major updates to App Hosting to make it easier to build and deploy modern web apps with Firebase. Today, we’re thrilled to announce that Firebase App Hosting has reached General Availability (GA)! This milestone brings even more features designed to help you get to market faster and scale.

Ready for production use

Now that App Hosting is GA, it’s fully supported for production deployments. Deploy your production Angular and Next.js apps with confidence, knowing they’re backed by a platform meeting stringent GA requirements from Google Cloud and covered by the Google Cloud Platform Terms of Service.

Ready to migrate your production app to App Hosting? You’ll probably need to migrate your domain. App Hosting’s new “Migrate a domain” flow ensures a seamless transition with zero downtime for your app. This new flow walks you through the correct order of DNS record updates so that your users and business aren’t disrupted when you switch.

A screenshot of the "Migrate a domain" flow in the Firebase console
A screenshot of the "Migrate a domain" flow in the Firebase console

A critical aspect of production readiness is robust security, and that begins with protecting sensitive information like API keys from unauthorized use. With Firebase App Hosting, you can securely store API keys as secrets and control who has access using the streamlined integration with Cloud Secret Manager.

Besides making App Hosting production-ready, there are significant new features since the initial preview, all designed to:

  1. Accelerate your innovation

  2. Provide greater flexibility and customization

  3. Support more frameworks

Keep reading to learn about everything that’s new since our preview launch last year.

Unlock rapid innovation

App Hosting accelerates time-to-market by managing your entire stack and offering seamless integration with GitHub for automated deployments. Over the past year, we’ve added new features to help you build faster, with confidence.

Accelerated testing and debugging

It’s much easier and faster if you can test code locally before deploying to staging or production. Now part of the Firebase Local Emulator Suite, App Hosting has a new emulator-specific configuration file, where you can make overrides for local development. These overrides live in apphosting.emulator.yaml, which is automatically created by the Firebase CLI. The emulator now dynamically loads secrets from Cloud Secret Manager, which means you can reference secrets in your local config and safely check it into source control to share with teammates.

Once you’ve tested locally, you’re ready to deploy. However, your local and production environments may be out of sync, causing your build to fail. With App Hosting’s improved build error messages, you can more easily diagnose and resolve build failures so you can get to production faster.

A screenshot of the App Hosting overview page showing a large red box with a warning about build errors
A screenshot of the App Hosting overview page showing a large red box with a warning about build errors

Proactive monitoring, seamless recovery

After you roll out a new version, use metrics in the App Hosting dashboard to monitor the health and resource usage of your web app. Each rollout is marked in your usage graphs so you can quickly know which commit may have caused an issue.

If you identify an issue, you can quickly roll back to a previous version of your app - without rebuilding, using App Hosting’s new rollbacks feature. Skipping the build leads to a faster recovery and ensures consistency in generated static content.

Opinionated, but flexible

App Hosting simplifies your infrastructure but doesn’t sacrifice control. While opinionated, it’s also flexible, letting you make customizations to fit your specific app and business requirements.

Customize your setup

App Hosting provides defaults for Cloud Run, but you can customize your backend configuration– aspects like concurrency, CPU, and memory limits— depending on your app’s compute needs.

App Hosting also supports granular environment configurations. Not only can you define multiple environment configurations for the same codebase, you can control where each environment variable is used, either at build time or run time. This gives you more control over how your secrets and data are being handled, ensuring they aren’t accessible in more places than they need to be.

Since last year’s preview, we’ve enhanced App Hosting’s flexibility with more customization features. You can now:

  • Add a wildcard subdomain as a custom domain to host multi-tenant applications and map hundreds, or even thousands, of subdomains to a single backend.
  • Connect App Hosting to a Google Cloud VPC network, letting you expand your app’s capabilities by integrating with backend services, such as a Redis cache.
  • Override App Hosting’s smart defaults for build and start commands, giving you more control over how your app is run.

Regions available across the globe

You can also customize where your app lives. App Hosting integrates with a global CDN for fast delivery, but you can serve the app from a region close to your users to reduce latency for uncached content.

We first launched App Hosting with support for us-central1 and have added regions in Europe and Asia for better global coverage. App Hosting is available in us-central1 (Iowa), asia-east1 (Taiwan), and europe-west4 (Netherlands).

Your favorite frameworks

App Hosting is optimized for modern, server-rendered JavaScript frameworks like Angular and Next.js. Today, we’re excited to share that App Hosting has a new community framework adapter model, with preview support for Nitro and Astro.

A screenshot of an Angular web app with the App Hosting dashboard in another tab behind it
A screenshot of an Angular web app with the App Hosting dashboard in another tab behind it

Community framework adapters (preview)

App Hosting has framework adapters to automatically build and deploy apps. The Angular and Next.js adapters are officially supported and maintained by the App Hosting team, but we want App Hosting to work well for all modern web frameworks. To allow for deployments with more frameworks, we published an open output bundle specification and worked with the Nitro team to build the first App Hosting community adapter, released in Nitro 2.11.0.

Since many frameworks are built on top of Nitro, this unlocks more frameworks you can use with App Hosting, including Nuxt, Analog, TanStack Start, and Vinxi.

We also built a proof-of-concept adapter for Astro and are looking forward to more community adapters in the future.

Angular and Next.js starter apps

To get started, check out the new Angular and Next.js starter apps! Get started by cloning an Angular or Next.js template from the firebase-framework-tools repository, or by running npm init @apphosting in your terminal.

These sample apps range from Hello World starters to e-commerce apps built with other Firebase products, like Genkit, Auth, and Data Connect. Building a full-stack web app often involves more than hosting, so we want to showcase how to use App Hosting with the rest of Firebase, giving you a one-stop shop for all your app’s building blocks.

An architecture diagram of an app hosted with Firebase, showing the different layers of the stack that different products fit into.
An architecture diagram of an app hosted with Firebase, showing the different layers of the stack that different products fit into.

These starter apps use the latest Firebase JavaScript SDK, which now works better than ever with full-stack web frameworks.

The Firebase JavaScript SDK for modern web apps

If you have used Firebase, you’re familiar with our SDKs for web development: the JavaScript SDK (which traditionally runs in the browser) and the Admin SDK (which runs in trusted backend environments).

The emergence of full-stack JavaScript frameworks– which run seamlessly across both client and server– revealed challenges in this distinct client/server SDK separation. Over the past year, we’ve improved the JavaScript SDK to make it easier to build modern, full-stack web apps with Firebase.

FirebaseServerApp: built to support SSR web apps development

The Firebase Admin SDK is useful for talking to other Firebase services, but it has one big problem for server-rendered web apps: it bypasses all security rules. We’ve introduced FirebaseServerApp, which is a modified version of the Firebase JavaScript SDK meant specifically to be run on the server by SSR web apps. Now, you can read from and write to Firestore and Cloud Storage with user credentials from the user that made a request to your backend.

To learn more, see the new guide: Use Firebase in dynamic web apps with SSR.

Firebase Authentication was originally designed around single-page apps, and thus didn’t have support for cookie authentication. As a result, synchronizing auth state between the client and server in full-stack web apps was difficult.

Firebase Auth now has preview support for automatic cookie sync in Next.js apps with a custom middleware library (released in version 11.6.0). This preview implementation is just the beginning of our journey; watch this space as we continue to refine the cookie-based authentication experience!

JavaScript SDK: Automatic Initialization

We know juggling the Firebase config object can be tricky, especially if you have multiple backends for development and production. App Hosting now automatically configures the SDKs for you, so you can call initializeApp() without any arguments.

Besides being convenient, it lets you safely deploy the same codebase across environments, preventing your staging app from accidentally accessing production data.

Summary

App Hosting’s goal is to be the best way to deploy server-rendered web apps on Google: you push to Git, and App Hosting does the rest. You can use of these new features, and we have plans for many more!

If you haven’t already, head over to the Firebase console and explore the documentation to deploy your first app. As always, if you have questions, you can use any of our support channels.

Wondering what the difference is between App Hosting and the original Firebase Hosting? Check out our in-depth blog post.

And if you have ideas for any new features, let us know on User Voice. Your feedback matters and will help us continue to make App Hosting the best web hosting platform for you.

We can’t wait to see what you build!