Migrate Firebase to Supabase: Firestore, Auth and Storage
Timo Wevelsiep•Updated: 25.08.2026Editorial note: Versions, commands and prices may change. Please verify critical steps independently before production use. This guide does not replace individual consulting.
Need more than a raw Firebase export? WZ-IT delivers a Firebase-to-Supabase migration across data modelling, Auth, Storage, Functions, testing and cutover.
A Firebase-to-Supabase migration is not a swap between two identically structured databases. Firebase combines several managed services and uses the document-oriented Firestore model. Supabase is built around relational PostgreSQL and enforces access through database grants and Row Level Security.
The largest part of the work is therefore often translating the application architecture, not copying bytes.
Which Firebase services are in use?
Inventory the actual estate before designing the target:
- Cloud Firestore or Realtime Database
- Firebase Authentication and external providers
- Firebase Storage
- Cloud Functions and triggers
- Firebase Hosting
- Cloud Messaging and push notifications
- Analytics, Crashlytics and Remote Config
- App Check
- extensions and connected Google Cloud services
Supabase does not replace every service one for one. Messaging, analytics or remote configuration may need complementary platforms or custom services.
Firestore and PostgreSQL think differently
Firestore stores documents in collections and subcollections. Relations often use embedded objects, identifiers or duplicated data. PostgreSQL uses tables, primary and foreign keys, constraints and joins.
A simple “one collection equals one table” mapping can work for basic data. Complex applications need design decisions:
| Firestore pattern | Possible PostgreSQL target |
|---|---|
| Embedded object | Separate table, JSONB or columns |
| Subcollection | Dependent table with a foreign key |
| Duplicated reference data | Normalised relation or deliberate materialisation |
| Array of IDs | Join table or typed array |
| Dynamic document fields | Defined columns or bounded JSONB |
| Compound Firestore query | SQL query with suitable indexes |
Design the target around real read and write paths, not only the export format.
Export and transform data
Supabase provides official Firebase migration resources and community tools. The documented Firestore path exports collections to JSON, transforms them and imports them into PostgreSQL.
A production migration includes:
- consistent Firebase export
- mapping documents to the target schema
- transforming IDs, timestamps and references
- importing in dependency order
- checking rows, relations and constraints
- comparing critical business queries
Large or actively written data sets also need a strategy for changes between the initial export and cutover.
Firebase Auth to Supabase Auth
The official Auth migration guide documents two tools: Firebase users are exported to JSON and then imported into auth.users. Firebase password-hash parameters need to be preserved.
Also review:
- email and phone verification
- linked OAuth identities
- custom claims and roles
- disabled users
- MFA
- password reset and email templates
- active sessions and tokens
Test representative accounts for every provider. Some edge cases may require a planned password reset or a first-login transition flow.
Security Rules become grants and RLS
Firebase Security Rules and Supabase RLS have different models. Translate rules semantically rather than syntactically.
For each table, define:
- Which operations may
anonperform? - Which operations may
authenticatedperform? - Which rows belong to the current user or tenant?
- Which server processes need elevated rights?
- Which relations must a policy check?
PostgreSQL checks grants first and policies afterwards. Both need to be correct. service_role bypasses RLS and belongs only in controlled server-side components.
Firebase Storage to Supabase Storage
The official Storage migration guide uses two stages: download files from Firebase and then upload them to Supabase.
Move and verify:
- bucket structure and object paths
- files and content types
- metadata
- public or private visibility
- signed URLs and their consumers
- Storage RLS policies
After upload, compare object counts, sizes and samples or checksums. Existing Firebase download URLs do not automatically continue working.
Reassign Cloud Functions and triggers
Firebase Functions can move to different targets:
- Supabase Edge Functions
- PostgreSQL triggers and database functions
- webhooks
- queue or workflow systems
- standalone backend services
Runtime, authentication, secrets, triggers and error handling change. A function should not be ported blindly when PostgreSQL can perform the operation transactionally and more simply.
Adapt the application and SDK
Frontend and backend use different clients, URLs and error objects after migration. Review:
- initialisation and environment variables
- data queries and pagination
- Realtime listeners
- auth state and token refresh
- uploads and download URLs
- offline behaviour
- server-side administrative access
- push notifications and remaining Firebase services
A parallel phase with automated and manual user-journey tests is safer than an immediate production replacement.
Cut over with a clear boundary
Before switching, define:
- the last Firebase write point
- final data and Storage sync
- behaviour of active sessions
- release of the new application version
- treatment of old clients
- rollback window and post-cutover data
Retire Firebase resources only after acceptance. Preserve exports and backups for the agreed period.
Sources
Rather have it operated?
You'd rather not run Supabase yourself? WZ-IT handles setup, operations and maintenance - privacy-focused from Germany.
Enquiry
Migrate, secure, or operate Supabase
We migrate Supabase projects and existing backends such as Firebase, Lovable, PostgreSQL, MySQL or Auth0, build the target environment, and can take over ongoing operations.
Frequently Asked Questions
Answers to the most important questions
Tools can export documents and populate tables. A dependable relational model for nested collections, relations, constraints and queries still often requires manual architecture work.
Supabase provides tools to export and import Firebase Auth users with their hash parameters. Edge cases, linked providers and active sessions still need testing.
Supabase combines table grants with PostgreSQL Row Level Security. Rules need to be reformulated for real user roles and verified with negative tests.
They usually need at least adaptation. Targets may be Supabase Edge Functions, PostgreSQL triggers, webhooks or separate application services. Runtimes, APIs and trigger behaviour differ.
Effort depends heavily on the Firestore model and application. WZ-IT assesses Firebase within the Supabase migration funnel and quotes it after assessment because relational remodelling is usually required.
More on Supabase
- What is Supabase?
- Supabase Cloud vs self-hosted
- Supabase self-hosting: pros & cons
- Supabase cost: Cloud vs self-hosted
- Migrate Supabase Cloud to self-hosted
- Migrate a Supabase project, region or organisation
- Migrate PostgreSQL to Supabase
- Migrate AWS RDS and Aurora to Supabase
- Migrate Heroku Postgres to Supabase
- Migrate Neon and Vercel Postgres to Supabase
- Migrate MySQL and MariaDB to Supabase
- Migrate Microsoft SQL Server and Azure SQL to Supabase
- Migrate Firebase to Supabase
- Migrate Lovable Cloud to Supabase
- Migrate Auth0 to Supabase Auth
- Supabase migration checklist
- Back up Supabase completely
- Update self-hosted Supabase
- Audit Supabase RLS
- Run Supabase on Hetzner
- Install Supabase with Coolify





