Nhost vs Firebase: Postgres vs NoSQL, pricing and self-hosting
by Versuscraft team · published 21 November 2026

Last verified: 21 November 2026
Nhost is an open-source backend built on a dedicated Postgres database with an auto-generated GraphQL API, and you can self-host it. (Nhost docs, Nhost pricing) Firebase, backed by Google, keeps app data in Firestore, a NoSQL document database. (Firebase docs, Firebase docs) Pick Nhost if you want relational data, root SQL access and plans with included allowances, starting at $25/mo for Pro. (Nhost docs, Nhost pricing) Pick Firebase if you ship mobile apps that need offline sync and want a free tier with no payment method needed. (Firebase docs, Firebase pricing)
Key takeaways
- The data model is the real split: Nhost gives you Postgres with psql access as a root user, while Firestore stores documents in collections. (Nhost docs, Firebase docs)
- Nhost Pro starts at $25/mo with 10 GB database and $15 in compute credits; Firebase's Blaze plan bills at the rate of the underlying Google Cloud infrastructure. (Nhost pricing, Firebase pricing)
- On the free tiers, Nhost Starter pauses a project after 1 week of inactivity, while Firebase's Spark plan leaves out Cloud Functions and Cloud Storage. (Nhost pricing, Firebase pricing)
- Self-hosting is free with Nhost's community edition on Docker Compose; Firebase says its emulators are not appropriate for production. (Nhost docs, Firebase docs)
At a glance
| Nhost | Firebase | |
|---|---|---|
| Database | Dedicated Postgres instance | NoSQL document database (Firestore) |
| Main API | Auto-generated GraphQL API | Native SDKs plus REST and RPC |
| Free tier | Starter, Free forever | Spark, No payment method needed |
| Entry paid plan | Pro, from $25/mo | Blaze, Pay as you go |
| Free database storage | 1 GB database | 1 GiB total |
| Free egress | 5 GB egress | 10 GiB/month |
| Auth users on free tier | Unlimited total users | 50K MAUs with Identity Platform |
| Functions on free tier | 10 seconds timeout | Not on Spark |
| Self-hosting | Community edition, Docker Compose | Emulators only, not for production |
| Compliance | SOC 2 Type II on Team | ISO 27001 and SOC 1, SOC 2, and SOC 3 |
Postgres and GraphQL vs Firestore documents
Nhost gives each project its own Postgres instance and generates a GraphQL API from your schema, including realtime subscriptions. (Nhost pricing, Nhost docs) You can connect with psql as a root user and install extensions such as PostGIS or pgvector. (Nhost docs)
Firestore is a NoSQL document database: documents live in collections and can hold nested objects and subcollections. (Firebase docs, Firebase docs) It offers multi-region replication and ACID transactions, and its Enterprise edition accepts existing MongoDB code and drivers. (Firebase docs) Offline mode works on iOS, Android and the web. (Firebase docs)
Nhost vs Firebase pricing: fixed plans or pay as you go
Nhost sells plans with included allowances. Pro starts at $25/mo and Team at $599/mo. (Nhost pricing) Pro includes $15 in compute credits, 10 GB database, 50 GB storage and 50 GB egress. (Nhost pricing) On the paid plans, usage past the included amounts costs $0.20 per GB for the database, $0.05 per GB for file storage and $0.10 per GB for egress. (Nhost pricing) Nhost never stops a project that goes over its limits; it bills the excess. (Nhost pricing)
Firebase's Blaze plan is Pay as you go and keeps the Spark plan's no-cost usage, with unit costs billed at Google Cloud rates. (Firebase pricing) Eligible accounts get $300 in free credit. (Firebase pricing) Cloud Functions invocations are free up to 2M/month, then $0.40/million. (Firebase pricing) Past the free quota, Firestore's rows on Firebase's pricing page point to Google Cloud pricing instead of listing a rate. (Firebase pricing)
Free tier limits that bite
Nhost Starter (Free forever) comes with 1 GB database, 1 GB storage and 5 GB egress. (Nhost pricing) It allows one active project, pauses it after 1 week of inactivity, and times out functions after 10 seconds. (Nhost pricing, Nhost limits) Nhost doesn't cap total auth users on any plan. (Nhost pricing)
Firebase's Spark plan gives Firestore 1 GiB total, 50K reads/day, 20K writes/day and 10 GiB/month. (Firebase pricing) Cloud Functions and Cloud Storage are not available on Spark, and Realtime Database allows 100 simultaneous connections there. (Firebase pricing) Auth with Identity Platform on Spark covers 50K MAUs, but SAML or OIDC sign-ins stop at 50 MAUs. (Firebase pricing)
Auth, functions and SDKs
Nhost Auth supports email and password, social logins, passwordless and WebAuthn, and stores users in your own database. (Nhost docs) Firebase Authentication supports email and password, phone auth, Google, Apple, X, Facebook and GitHub, plus the open-source FirebaseUI. (Firebase docs)
Nhost functions are JavaScript or TypeScript, and libraries that rely on native addons will not work; Nhost points to Nhost Run for those. (Nhost docs, Nhost limits) Cloud Functions for Firebase run JavaScript and Python and can trigger on database changes or new Auth sign-ups. (Firebase docs)
For local work, the Nhost CLI runs the whole stack, Postgres included, in Docker and tracks migrations. (Nhost docs) Firebase's Emulator Suite runs Firestore, Realtime Database, Cloud Storage, Authentication, Hosting and Cloud Functions (beta) locally. (Firebase docs)
Can you self-host Nhost or Firebase?
This is where the two differ most. Nhost is 100% open-source, and its community edition self-hosts for free with a Docker Compose reference implementation. (Nhost docs, Nhost docs) Nhost describes that implementation as being for demonstration purposes, so plan to run it yourself or pay for a support agreement or a dedicated cluster. (Nhost docs, Nhost docs)
Firebase says its emulators should not be used as "self-hosted" versions of its services and are not appropriate for production. (Firebase docs) On export, Nhost gives full access to your database and storage, while Firestore's managed export writes to a Cloud Storage bucket and requires the Blaze plan. (Nhost pricing, Firebase docs)
Security and compliance
Nhost lists SOC 2 Type II on its Team plan, and HIPAA is still in progress. (Nhost pricing, Nhost docs) Nhost Cloud runs on AWS and encrypts all data at rest with AES-256 and in transit with TLS. (Nhost docs) Firebase services have completed the ISO 27001 and SOC 1, SOC 2, and SOC 3 evaluations and encrypt data in transit over HTTPS. (Firebase docs)
Where Nhost wins
- Postgres with root access and extensions such as PostGIS and pgvector. (Nhost docs)
- A GraphQL API generated from your schema, with row-level permissions. (Nhost docs)
- Open source, with a free self-hosted community edition. (Nhost docs, Nhost docs)
- Monthly plans with included allowances, and no project stopped for going over. (Nhost pricing)
Where Firebase wins
- Firestore's offline mode for mobile and web apps. (Firebase docs)
- A free tier with no payment method and 50K MAUs for auth. (Firebase pricing)
- Native SDKs for Apple platforms, Android, Flutter, Unity and C++. (Firebase docs)
- Analytics and Cloud Messaging at no cost on both plans. (Firebase pricing)
Limitations to plan for
- Nhost functions can't use native addons (Nhost Run is the documented alternative), and Starter caps them at 10 seconds. (Nhost limits)
- Nhost's self-hosted setup is a reference implementation for demonstration. (Nhost docs)
- Firebase's Spark plan has no Cloud Functions or Cloud Storage. (Firebase pricing)
- A Firestore document can be at most 1 MiB, and each project gets exactly one free database. (Firebase limits)
Skip Nhost if your team already models data as documents and wants Firestore's offline mode on mobile.
Which one fits your use case
- For a SaaS team with relational data, Nhost fits because you get Postgres with root access and GraphQL generated from the schema. (Nhost docs, Nhost docs)
- A team with data sovereignty rules can self-host Nhost on its own infrastructure. (Nhost docs)
- If your mobile app must keep working offline, Firebase fits because Firestore has an offline mode. (Firebase docs)
- Solo developers with no budget can start on Spark without a card, then move to Blaze once they need functions or storage. (Firebase pricing)
Verdict
Pick Nhost if you want Postgres, a generated GraphQL API and a monthly plan with included allowances, with the option to self-host later. Pick Firebase if you build mobile-first apps that need offline sync and many native SDKs, and want a free tier that needs no card.
Frequently asked questions
Is Nhost an open-source Firebase alternative?
Yes. Nhost is 100% open-source and can be self-hosted, and it uses Postgres with GraphQL where Firebase's Firestore is a NoSQL document database. (Nhost docs, Nhost docs)
Does Firebase support PostgreSQL?
Yes, through SQL Connect, which uses a managed Cloud SQL for PostgreSQL database starting as low as $9.37/month on Blaze, with pricing that varies by region and configuration. (Firebase docs, Firebase pricing)
Does Nhost's free tier pause projects?
Yes. Nhost Starter pauses a project after 1 week of inactivity, and only one project can be active at a time. (Nhost pricing)
Try Nhost
Install the Nhost CLI, run the stack locally in Docker, then deploy to the Starter tier (Free forever) at Nhost. (Nhost docs, Nhost pricing)
Sources
- nhost.io/product/database
- firebase.google.com/docs/firestore
- nhost.io/pricing
- firebase.google.com/pricing
- docs.nhost.io/platform/self-hosting/community
- firebase.google.com/docs/emulator-suite
- firebase.google.com/products/firestore
- nhost.io/product/graphql
- docs.nhost.io/products/functions/limits
- firebase.google.com/support/privacy
- nhost.io/product/auth
- firebase.google.com
- firebase.google.com/docs/firestore/quotas
- docs.nhost.io/platform/self-hosting
- firebase.google.com/products/sql-connect
- docs.nhost.io/getting-started/local-development/cli