Migrate from Firebase
Step-by-step guide to moving your Firestore data, Firebase Auth users, and buckets to Aurabase's open, high-performance infrastructure.
Matching Firebase Bricks#
Aurabase replaces each proprietary Firebase component with standard, open, self-hosting technology without vendor lock-in:
| Firebase | Comparison | Aurabase equivalent |
|---|---|---|
Cloud Firestore | Higher equivalent | PostgreSQL (relational and SQL) or Aurabase NoSQL (MongoDB-style) |
Firebase Auth | Same, enriched | Same OAuth support, plus TOTP MFA, magic links and passwords |
Firebase Storage | Same, enriched | S3-compatible REST API (SeaweedFS) with on-the-fly image transformations |
Cloud Functions | Same | Edge Functions on standard Deno (Deno.serve()) and WASM |
Security Rules | Superior | Postgres RLS (row-level security), evaluated in the database |
Firebase Realtime DB | Same | Aurabase Realtime (change data capture, presence and broadcast over NATS and WebSockets) |
4-step roadmap#
- Schema & Data — Choice of model (PostgreSQL relational or NoSQL collections) and import (15 min)
- Authentication — Export Firebase Auth users and import scrypt/bcrypt hashes without reset (10 min)
- Storage files — Synchronization of Cloud Storage buckets to Aurabase Storage (variable depending on volume)
- SDK replacement — Replacing
firebase/*with@aurabase/aurabase-js
From Firestore to Aurabase#
You can either normalize your data in PostgreSQL to take advantage of the power of SQL and strict typing, or import it directly into Aurabase's NoSQL Document Store engine:
Roadmap — not available. The aura commands shown below are planned and not delivered yet: the CLI does not have them today.
# 1. Export Firestore to JSONL file
npx firestore-export --serviceAccount credentials.json --output firestore-export.jsonl
# 2. Import into the Aurabase NoSQL engine
aura db nosql-import firestore-export.jsonl --collection users --project-id <id>
# 3. Generating complete TypeScript types
npx @aurabase/gen --out src/aurabase.types.ts
Frictionless user migration#
Roadmap — not available. The aura auth import command and the import of Firebase password hashes (scrypt) are planned and not delivered yet: the CLI and Aurabase Auth do not have them today. Until then, create the users with the admin API (aura.authAdmin.createUser) and have them set a new password or sign in with a magic link.
The plan: keep Firebase's password hashes so that users keep their credentials without a password reset.
# Exporting users from Firebase CLI
firebase auth:export users.json --format=JSON --project my-firebase-app
# Import into Aurabase Auth (preserves hashes & tokens)
aura auth import users.json --provider firebase --env prod
Synchronizing S3 buckets#
Aurabase Storage uses a standard S3 API. You can sync your files continuously from Google Cloud Storage with the rclone or aws-cli utility:
# Direct transfer from GCS to Aurabase Storage
rclone sync gcs:my-firebase-bucket s3:aurabase-storage-bucket \
--s3-endpoint https://api.aurabase.cloud/v1/storage/$PROJECT_ID \
--s3-access-key-id $AURABASE_SERVICE_ROLE_KEY \
--progress
Replacing the Client SDK#
// BEFORE (Firebase)
import { getFirestore, doc, getDoc } from 'firebase/firestore'
const snap = await getDoc(doc(db, 'users', 'u1'))
const user = snap.data()
// AFTER (Aurabase)
import { createClient } from '@aurabase/aurabase-js'
const { data: user } = await aura.from('users').select('*').eq('id', 'u1').single()