Deploy Your Firebase Frontend

Use Firebase for your backend. Use ZeroDeploy for a simpler frontend deploy.

Last updated: February 20, 2026

How it works

Firebase backend + ZeroDeploy frontend.

Firebase provides backend services (Firestore, Auth, Cloud Storage, Cloud Functions) that your frontend accesses via the Firebase JS SDK. ZeroDeploy hosts your compiled frontend (React, Vue, Angular, etc.) on a global edge network. Your app loads from ZeroDeploy and connects to Firebase's API at runtime — same architecture, different host.

Deploy in 3 steps

From zero to live in under a minute.

1

Create your frontend project

Scaffold a new project with Vite. Add the Firebase SDK and connect it to your backend.

bash
npm create vite@latest my-app -- --template react
2

Build for production

Run the build command to generate static output in dist/.

bash
cd my-app && npm run build
3

Deploy to ZeroDeploy

One command to push your frontend to the edge. It's live in seconds.

bash
zerodeploy deploy --dir dist

Configuration tips

Connecting your frontend to Firebase.

  • Store Firebase config as environment variables: VITE_FIREBASE_API_KEY, VITE_FIREBASE_AUTH_DOMAIN, VITE_FIREBASE_PROJECT_ID, etc. These are safe to expose — Firebase Security Rules protect your data.
  • Initialize Firebase once in a shared module and export the app instance: initializeApp({ apiKey: import.meta.env.VITE_FIREBASE_API_KEY, ... }).
  • If you use Firebase Auth with redirect-based sign-in, add your ZeroDeploy domain to the "Authorized domains" list in the Firebase Console (Authentication > Settings).

Things to know

Firebase-specific tips to avoid common pitfalls.

  • Firebase API keys are designed to be public. They identify your project, not authenticate you. Security Rules on Firestore, Storage, and Realtime Database control access — make sure they're properly configured.
  • Firebase Auth requires your hosting domain in the "Authorized domains" list. Add your ZeroDeploy subdomain (e.g., myapp.zerodeploy.app) and any custom domains in the Firebase Console under Authentication > Settings.
  • For SPAs with client-side routing, create a public/_redirects file with /* /index.html 200. Learn more about redirects →
  • Cloud Functions are server-side and run on Google's infrastructure — they work regardless of where you host your frontend. You don't need Firebase Hosting for Cloud Functions to work.

Everything you need

Host your Firebase frontend with the features you'd expect from a modern hosting platform.

Instant Deploys

Push to deploy in under 5 seconds. No queues, no build minutes to worry about.

Preview URLs

Every deployment gets a unique URL. Share any version instantly with your team.

Custom Domains

Connect your own domain with automatic SSL. Just add a CNAME and you're live. Learn more →

GitHub Actions CI/CD

Deploy on every push with GitHub Actions. Get PR comments with preview URLs. Set up CI/CD →

Built-in Analytics

See traffic, top pages, referrers, and countries right in your dashboard. No third-party scripts. Learn more →

Forms That Just Work

Add action="/_forms/contact" to any form. Submissions appear in your dashboard. Learn more →

Frequently asked questions

Can I use Firebase without Firebase Hosting?

Yes. Firebase services (Firestore, Auth, Storage, Cloud Functions) are independent of Firebase Hosting. Your frontend can be hosted anywhere — including ZeroDeploy — and still connect to all Firebase services via the Firebase JS SDK.

Is my Firebase API key safe in the frontend?

Yes. Firebase API keys are meant to be public — they identify your project, not grant access. Firestore Security Rules and Storage Security Rules control who can read and write data. Configure those properly and your data is protected.

Do Cloud Functions still work if I host on ZeroDeploy?

Yes. Cloud Functions run on Google's infrastructure independently of your hosting. Your ZeroDeploy-hosted frontend calls Cloud Functions the same way it would from Firebase Hosting — via HTTPS endpoints.

Why use ZeroDeploy instead of Firebase Hosting?

ZeroDeploy includes built-in forms and privacy analytics that Firebase Hosting doesn't offer. Deploys are faster (under 5 seconds vs 10-30 seconds), and pricing is a flat $29/month instead of pay-per-use. If you only need Firebase for backend services, a simpler host for your frontend makes sense.

Also works with

ZeroDeploy hosts frontends for any backend-as-a-service.

Framework deploy guides

Simpler hosting for your Firebase frontend

Keep Firebase for what it's great at. Host your frontend on ZeroDeploy with instant deploys, forms, and analytics.