
Open-source alternatives to Firebase in 2026
Firebase is generous until an app grows. The free Spark tier covers small projects. The Blaze plan then bills per Firestore read, write, delete, stored gigabyte, and gigabyte of egress. PocketBase and Directus give you the same backend core — database, auth, an API, realtime, and file storage — that you own, hosted at a flat €9 per month.
TL;DR
Firebase's Blaze plan meters Firestore at $0.03 per 100,000 reads, $0.09 per 100,000 writes, and $0.01 per 100,000 deletes, plus storage and egress. The bill rises with usage and with traffic spikes.
PocketBase is a single Go binary: a SQLite database, auth, realtime, file storage, and an admin UI in one file. It is MIT-licensed and sits at 58,300 GitHub stars.
Directus puts a REST and GraphQL API plus a no-code admin on top of any SQL database. It is at 35,800 stars and runs under the Business Source License — free for organisations under $5M in revenue or funding.
DANIAN runs either one for €9 per month per instance, across 21 datacenter regions on six continents, with daily off-site backups. The price is fixed; it does not move when your traffic does.
The honest limit: PocketBase and Directus replace the data, auth, API, and file-storage slice — not Firebase Cloud Messaging, Crashlytics, Cloud Functions at Google scale, or the Firebase mobile SDK suite.
Why people are leaving Firebase in 2026
The trigger is rarely the product. It is the Blaze bill. Firebase's no-cost Spark tier is real and generous. The moment an app crosses it, billing switches to per-operation metering on Firestore, storage, and egress. A read-heavy screen, or a viral week, can multiply the cost without warning.
The free tier covers a lot. Firestore gives 50,000 reads, 20,000 writes, and 20,000 deletes per day at no cost, plus 1 GiB of stored data and 10 GiB of monthly egress. Authentication is free up to 50,000 monthly active users. Many small apps never pay a cent.
The pressure starts above those limits. On the Blaze plan, every operation past the free allowance is billed. Firestore reads cost $0.03 per 100,000 documents. Writes cost $0.09 per 100,000. Deletes cost $0.01 per 100,000. Stored data runs about $0.15 to $0.18 per GiB per month, and egress is $0.12 per GiB after the first 10 GiB.
The unit prices look small. The problem is the count. A single screen can fire dozens of reads. A real-time listener re-reads documents when it reconnects. Offset-based pagination charges for every skipped document. Read volume is hard to predict before you ship.
Consider one screen. A dashboard that loads a 50-item list spends 50 reads each time it opens. Open it five times a day across 25,000 users and that single screen is over 6 million reads a day. Firestore bills each read above the free tier. The cost tracks behaviour you do not fully control: how often people refresh, how chatty your listeners are, how your queries are written.
Spikes have no ceiling. Google's own pricing note is blunt: requests keep succeeding even after you pass your monthly budget. Budgets in Firebase are alerts, not hard caps. A feature that goes viral bills at the same per-operation rate, multiplied by the traffic.
None of this makes Firebase a bad product. It makes the bill hard to forecast. For a team that wants a fixed number on the invoice, the metering model is the reason to look elsewhere.
What “alternative” actually means here
An alternative is not always a managed copy of Firebase. It is one of three things: a cheaper hosted backend, the same open-source software you run yourself, or that software run for you. This post covers the open-source route — PocketBase and Directus — and is honest about the slice they cover.
Three real options exist. You can move to another hosted backend and keep paying per usage. You can self-host an open-source backend on your own server. Or you can have someone run that open-source backend for you at a fixed price. The last two give you the data.
Self-hosting is a real option. PocketBase and Directus both run on a $24-per-month production-class virtual server. That covers the software. It does not cover your time: setup, security updates, certificate renewal, backup checks, and being on call when something breaks at 2am. For a team with an in-house engineer who likes this work, the do-it-yourself path is a fair choice.
Managed removes the operations. DANIAN runs the same open-source software for you. You get the database, auth, API, and file storage; we patch, monitor, and back up daily, off-site. The price is €9 per month per instance, fixed in advance.
There is a second reason beyond price. With either tool the data is yours, in a format you can read and move. A hosted backend keeps your records in its own store and on its own terms. Owning the database is the part that does not expire when a pricing page changes.
What these tools do not replace.
This is the part most “Firebase alternative” lists skip. PocketBase and Directus cover the backend core: data, authentication, an API, realtime, and file storage. They do not replace Firebase Cloud Messaging for push notifications. They do not replace Crashlytics for crash reporting. They are not a drop-in for Cloud Functions at Google scale, and they do not give you Firebase's mobile SDK suite or its tie-in with Google Analytics. If your app leans on that bundle, a move means assembling a few separate pieces, not flipping one switch.
What filling the gap looks like. In practice, teams keep push on a dedicated notification service, send crash data to an error-monitoring tool, and run background jobs as small serverless functions. For lighter server-side logic, PocketBase's built-in hooks handle a fair share of what people reach for Cloud Functions to do. None of this is exotic, but it is work you scope on purpose rather than inherit by default.
Frame the win correctly. What you get is an owned app, data, and auth backend with a predictable bill. What you give up is the single-vendor convenience of the full Google platform. That trade is right for some apps and wrong for others. The rest of this post helps you tell which.
The shortlist
Two open-source backends cover most of what small teams build on Firebase. PocketBase suits a brand-new app that wants everything in one binary. Directus suits a team that already has a SQL database, or wants its data in plain SQL it controls. Here is the honest read on each.
PocketBase
PocketBase is an open-source backend in a single Go file. It bundles a SQLite database, authentication, realtime subscriptions, file storage, and an admin dashboard. It is MIT-licensed, sits at 58,300 GitHub stars, and runs as one portable executable. DANIAN hosts a managed PocketBase backend for €9 per month.
Who builds it. PocketBase is built and maintained by a single independent developer, as a free MIT-licensed project. The whole backend ships as one binary you can download and run.
What it gives you. One file holds the database, the user and auth system, realtime data over subscriptions, file storage, and a clean admin UI. You extend it with Go, or with JavaScript hooks. Official SDKs for JavaScript and Dart cover web, Node, and mobile clients, so a front-end talks to it without custom plumbing. For a new app, that is most of a backend on day one.
The honest caveat. PocketBase is still pre-1.0. It is run in production by many teams regardless, with 263 releases behind it. Expect occasional breaking changes between versions, and read the changelog before you upgrade.
Best for. A greenfield app, an MVP, an internal tool, or a solo builder who wants one thing to deploy.
See the managed PocketBase backend if you would rather not run it yourself.
Directus
Directus puts a REST and GraphQL API and a no-code admin on top of any SQL database. It works with PostgreSQL, MySQL, SQLite, and others, with no migration of your existing data. It sits at 35,800 GitHub stars. DANIAN runs Directus on your existing SQL database for €9 per month.
Who builds it. Directus is built by a company around an open-core model. The dashboard is a no-code Vue app aimed at non-technical users. It layers an API on a database rather than owning the database itself.
What it gives you. Point Directus at a new or existing SQL database and it generates a REST and a GraphQL API, plus an admin UI for managing content. Your data stays in plain SQL — Postgres, MySQL, SQLite, MariaDB, and more — so it is portable and queryable outside Directus. It also handles file and image assets, role-based permissions, and automation flows triggered by a webhook or a schedule. That is the opposite of a document store you cannot easily leave.
The honest caveat. Directus is not under a standard open-source licence. It uses the Business Source License 1.1: free for organisations under $5M in combined annual revenue or funding, with a commercial licence required above that. For DANIAN's typical customer that means free in practice — but the threshold is real, and the project has signalled another licence revision is under discussion, so check the current terms for your case.
Best for. A team that already has a SQL database, wants a content UI on top of it, or wants data ownership in a portable format.
See Directus for an existing SQL database.
PocketBase and Directus vs Firebase
The table compares the two open-source backends against the Firebase pieces they cover. Prices are the published Blaze rates and DANIAN's flat fee. Figures are current as of June 2026; verify Firebase's pricing page before you commit, since usage-based rates change.
| PocketBase | Directus | Firebase (Blaze) | |
|---|---|---|---|
| Replaces | Firestore + Auth + Storage + Realtime | SQL data + Auth + API | Firestore, Auth, Storage, Realtime DB |
| Database | SQLite (bundled) | Any SQL: Postgres, MySQL, SQLite, … | Firestore / Realtime DB (proprietary) |
| API | REST-ish + realtime | REST + GraphQL | SDK + REST |
| Licence | MIT | BSL 1.1 (free under $5M rev/funding) | Proprietary |
| GitHub stars | 58,300 | 35,800 | — |
| Pricing model | Flat — you own it | Flat — you own it | Per read / write / GB / egress |
| Cost on DANIAN | €9/mo flat | €9/mo flat | n/a |
| Data ownership | Full | Full | Vendor-held |
| Self-host option | Yes — one binary | Yes — Docker | No |
| Switching effort | Low (new apps) | Low–medium (map to SQL) | — |
One row deserves a flag. Firebase's licence is proprietary and its data sits in a store you do not control. Both open-source backends keep your data in a format you can export and read elsewhere. That is the difference between renting a backend and owning one.
A worked cost example at moderate traffic
Numbers make the trade concrete. Take a moderately active app: 25,000 daily users, a feed-style read pattern, 40 GiB stored, and 80 GiB of monthly egress. On Firebase's Blaze plan that runs to roughly $61 per month. The same backend on DANIAN, sized for the load, is a fixed figure you choose.
The assumptions. 25,000 daily active users. Each user triggers about 150 document reads and 20 writes per day — a list-and-feed app, where reads dominate. The database holds 40 GiB. Monthly egress is 80 GiB. Authentication stays within the 50,000 free monthly active users. These are illustrative, not a benchmark; your own pattern will differ.
On Firebase, that works out as follows, using the published Blaze rates:
| Firebase Blaze line item | Monthly cost |
|---|---|
| Firestore reads — ~111M billable at $0.03 per 100,000 | ≈ $33 |
| Firestore writes — ~14.4M billable at $0.09 per 100,000 | ≈ $13 |
| Stored data — 39 GiB at ~$0.16 per GiB | ≈ $6 |
| Egress — 70 GiB at $0.12 per GiB | ≈ $8 |
| Authentication — within 50,000 free monthly active users | $0 |
| Total, at this scale, this month | ≈ $61 |
The same backend on DANIAN. PocketBase or Directus serving this app does not need much: a few vCPU and RAM units, and a little extra storage. On the €9 base plan plus those units, the figure lands around €25 to €40 per month — and it is the same every month. Reads and writes are not metered. A traffic spike does not change the invoice; only a deliberate resource upgrade does, and we will not make that change without your consent.
What the example hides is movement. Double the users to 50,000 and the Firebase reads, writes, and egress roughly double — past $110. Ship one inefficient query, or a listener that re-reads a large collection on reconnect, and reads can climb with no change in user count. The DANIAN figure, by contrast, is the one you picked. That predictability is the point, more than the absolute floor.
A fair note in Firebase's favour. At very small scale, Firebase is free and DANIAN is not. If your app stays under the Spark limits, Firebase costs nothing and runs itself. The flat model wins once you are reliably past the free tier, or once a predictable invoice matters more than a zero in a quiet month.
For an agency or freelancer reselling to clients, the flat figure has a second use. A bill that does not move is a margin you can quote with confidence. Per-operation pricing turns every client app into a variable cost you carry until the invoice lands. A fixed €9 base per instance is a number you can put in a proposal.
How to pick: three questions to ask yourself
The choice is rarely about features alone. Three questions sort most teams: how predictable the bill needs to be, whether you already have a SQL database, and which Firebase services your app depends on. Your answers point at PocketBase, Directus, or staying put.
1. If a fixed monthly number matters more than a possible zero in a slow month, an owned backend at a flat price fits. If your app is small and likely to stay under the free tier, Firebase costs nothing — stay there for now.
2. Do you already have a SQL database?
If yes, Directus layers an API and admin on it without moving your data. If you are starting fresh and want one thing to run, PocketBase is the shorter path.
3. Which Firebase services do you actually use?
If you use only Firestore, Auth, and Storage, PocketBase or Directus cover it. If push notifications, Crashlytics, and Cloud Functions are load-bearing, plan to add separate tools — or keep those parts on Firebase and move only the data layer.
Frequently asked questions
What is the best open-source alternative to Firebase?
There is no single best — it depends on your app. For a brand-new project that wants a database, auth, realtime, and file storage in one binary, PocketBase is the shortest path. For a team with an existing SQL database, or one that wants a content UI and a portable SQL store, Directus fits better. Both give you a backend you own at a flat €9 per month on DANIAN.
Which is better, PocketBase or Directus?
Neither is universally better; they suit different starting points. PocketBase is one Go binary with SQLite, auth, realtime, and an admin UI — ideal for a greenfield app or MVP. Directus layers a REST and GraphQL API plus a no-code admin on any existing SQL database. Pick PocketBase to start fresh and simple; pick Directus when you already have SQL data or want a content interface.
Can PocketBase and Directus fully replace Firebase?
They replace the backend core — database, auth, API, realtime, and file storage. They do not replace Firebase Cloud Messaging, Crashlytics, Cloud Functions at Google scale, or the Firebase mobile SDK suite. If your app depends on those, plan to add separate tools rather than expecting a one-to-one swap.
Is PocketBase production-ready?
Many teams run PocketBase in production today, and it has 263 releases behind it. It is still pre-1.0, currently v0.38.1, and the maintainer states backward compatibility is not guaranteed before v1.0. Treat it as production-capable but expect occasional breaking changes, and read the changelog before upgrading. On DANIAN, upgrades are handled with that caution in mind.
Is PocketBase really free?
Yes. PocketBase is MIT-licensed, which lets you use, modify, and even resell it freely. The software costs nothing. What you pay for is hosting and operations — a server if you self-host, or €9 per month if DANIAN runs it for you, including daily backups and monitoring.
Is Directus open source?
Not under a standard open-source licence. Directus uses the Business Source License 1.1. It is free for organisations under $5M in combined revenue or funding, with a commercial licence above that. For most small teams it is free in practice, but check the current terms, since the project is reviewing its licence.
How much does it cost to host PocketBase or Directus?
On DANIAN, hosting either one is a flat €9 per month per instance. That includes the base plan's server resources, daily off-site backups, and monitoring. You add vCPU, RAM, or storage units only if your load needs them. Self-hosting instead runs about $24 per month for a production-class virtual server, plus your own time for setup and upkeep.
How does the cost compare to Firebase as I grow?
Firebase's Blaze plan meters reads, writes, storage, and egress, so the bill rises with usage and spikes with traffic. An owned backend on DANIAN is a flat €9 per month per instance, plus any resource units you choose. The number is set in advance and does not move with traffic.
Is there a free trial?
Yes. DANIAN offers a 7-day trial with no card required. You can spin up a PocketBase or Directus instance, point a test build at it, and see whether a flat, owned backend fits before you pay anything.
Do PocketBase and Directus support realtime updates like Firebase?
Yes. PocketBase has realtime subscriptions built in, so clients receive live updates over a persistent connection. Directus offers realtime through its WebSocket interface in current versions, alongside its REST and GraphQL APIs. Neither copies Firestore's exact model, but both cover the common case of pushing data changes to connected clients.
Do they handle authentication and user management?
Yes. PocketBase ships with built-in authentication — email and password, plus OAuth providers such as Google and GitHub — and a user table you manage from its admin UI. Directus has its own users, roles, and granular permissions, with SSO and OAuth options. Both replace the slice that many apps rely on Firebase Authentication for.
Can PocketBase and Directus store files and images?
Yes. PocketBase includes file storage tied to your records, handled through the same binary. Directus has a full asset and file-management layer with on-the-fly image resizing and format conversion. Both cover the role Firebase Storage fills, and on DANIAN your files live in the same managed instance with daily off-site backups.
Can I use PocketBase or Directus for a mobile app?
Yes. PocketBase offers official SDKs for JavaScript and Dart, so it works with web, Node, and Flutter clients out of the box. Directus exposes REST and GraphQL that any mobile framework can call. The one gap to plan for is the wider Firebase mobile suite — push notifications, crash reporting, analytics — which you would add as separate services.
What databases does Directus work with?
Directus runs on standard SQL databases: PostgreSQL, MySQL, MariaDB, SQLite, and Microsoft SQL Server, among others. It works with a new database or an existing one with no migration, generating an API over whatever schema you already have. Your data stays in plain SQL you can read and query outside Directus.
Do I need to know how to code to use Directus?
For day-to-day content and data work, no — Directus has a no-code admin where non-technical users manage records, media, and users. Setting it up, designing the schema, and wiring it into your app does take some technical work. If you would rather skip the setup and operations, DANIAN runs the instance for €9 per month.
Can I move my existing Firebase data over?
Yes, with a migration step. Export your Firestore collections to JSON, then load them into PocketBase's SQLite file or a SQL database behind Directus using a short import script. There is no one-click importer, so budget a few hours to map fields. Once moved, the data sits in portable SQL that any tool can read.
What happens to my data if I leave DANIAN?
It is yours. PocketBase stores everything in a SQLite file you can export and take with you. Directus keeps data in standard SQL — Postgres, MySQL, or SQLite — that any tool can read. There is no proprietary format to escape and no export fee. We will hand over a full copy on request.
What happens to my app if PocketBase or Directus shuts down?
Your app keeps running. Both are open source — PocketBase under MIT, Directus as source-available under the Business Source License — so the code you run does not disappear if a company changes direction. Your data sits in SQLite or standard SQL you control. That independence from any single vendor is the main reason to own the backend.
Where is my data hosted?
On DANIAN you choose from 21 datacenter regions across six continents, so you can place your backend close to your users. Your instance and its database run in the region you select. You can request a full copy of your data at any time, and it stays in a portable format you can move elsewhere.
Is my data isolated from other customers' apps?
Yes. Each app runs in its own hardened, isolated container with its own database, file storage, and resources — not shared application space. You also get per-container terminal and file-manager access to your own instance. Daily off-site backups run for every container, and you can export your data whenever you want.
Can I scale PocketBase or Directus as my app grows?
Yes. On DANIAN you add vCPU and RAM units and extra storage as your load grows. Scaling is a deliberate upgrade you approve, not automatic per-operation metering — so the bill changes only when you choose to change it. We will not raise your resources, or your invoice, without your consent.
Can I run these myself instead?
Yes. Both run on a $24-per-month production-class virtual server. That covers the software, not your time — setup, patching, certificate renewal, backups, and on-call. If you have an engineer who likes that work, self-hosting is a fair path. If you would rather not, DANIAN runs it for €9 per month.
What to do this week
The path is short. List the Firebase services your app relies on. If it is mostly Firestore, Auth, and Storage, an owned backend will cover it at a flat price. If push, crash reporting, and serverless functions are central, plan to add those separately or keep them where they are.
Then pick by shape. New app, one thing to run: PocketBase. An existing SQL database, or data you want in portable SQL: Directus.
Try it for a week. Spin up either one and point a test build at it.
A 7-day trial with no card is enough to see whether a flat, owned backend fits before you commit.
Sources
Firebase pricing — firebase.google.com/pricing
Firestore pricing (Google Cloud) — cloud.google.com/firestore/pricing
PocketBase on GitHub — github.com/pocketbase/pocketbase
Directus on GitHub — github.com/directus/directus
