Migration

Migrating away from Supabase: when (and how) teams actually leave

Migrating away from Supabase

The direction that proves whether a migration practice is actually vendor-neutral: why some teams leave Supabase, and what really happens when they do.

We’ve spent the last several articles walking through why teams move to Supabase — from Firebase, Amazon RDS, Neon, Heroku, Render, and legacy MySQL/MSSQL systems. If that’s all we ever wrote about, it would be fair to wonder whether we’re vendor-neutral migration engineers or just a Supabase sales channel with extra steps. So it’s worth covering the direction that actually proves the point: why do teams migrate away from Supabase, and what does that migration look like?

The honest answer is that leaving isn’t a failure state, for Supabase or for the team leaving. Postgres is Postgres wherever it runs, and a platform that’s genuinely open about that fact should make leaving straightforward when it’s the right call. This guide covers the real reasons teams do it and exactly what happens technically when they do.

Why teams actually migrate away from Supabase

Need for serverless scale-to-zero — Neon’s specialization

Supabase’s compute model isn’t built around scaling to zero the way Neon’s storage/compute-separated architecture is. For a steady production workload, that’s rarely the deciding factor. But for spiky, intermittent usage — a staging environment that’s live a few hours a day, a fleet of preview branches for CI that sit idle most of the time — paying for always-on compute is a real, avoidable cost. Teams with this specific usage pattern sometimes move the non-production parts of their infrastructure to a platform built around that exact economics, while keeping production wherever makes sense.

Not wanting the whole bundle in the first place

Some teams adopt Supabase for the Postgres database and the speed of getting started, and later realize they never actually wanted the bundled Auth and generated API layer — they want a clean Postgres instance with their own custom authentication (Auth.js, Better Auth, a hand-rolled system) and their own API design. This isn’t a complaint about Supabase doing anything wrong; it’s a mismatch between what the platform optimizes for and what a specific team’s architecture actually needs once it’s mature enough to have strong opinions about its own Auth and API layer.

Extreme scale: compute cost and data residency

At a large enough scale, two things tend to surface. First, compute cost optimization becomes worth dedicated engineering attention in a way it isn’t for a smaller application — and that sometimes means a different hosting arrangement makes more financial sense than a managed platform’s standard pricing. Second, data-residency requirements can extend beyond the regions Supabase supports directly, particularly for regulated industries or specific national compliance requirements. Neither of these is a criticism of Supabase — they’re the kind of constraints that show up specifically at a scale most projects never reach.

Wanting fully self-managed infrastructure

This is worth calling out as a special case, because it’s not really a departure at all. Teams that want complete control over their infrastructure — their own Kubernetes cluster, their own backup strategy, deployment inside their existing cloud environment for compliance reasons — aren’t leaving Supabase as a platform. They’re choosing self-hosted Supabase, which is a fully supported, open-source deployment model, not a different product. If this is your reason for “migrating away,” the honest framing is that you’re moving to a different deployment of the same platform, and it’s worth reading that as a distinct project from the other three reasons on this list.

What actually happens when you leave Supabase

The database: still just Postgres, in both directions

This is the same fact that’s made every migration to Supabase in this series comparatively low-risk, and it holds in reverse: because Supabase runs standard Postgres with no proprietary storage format, the same pg_dump/pg_restore tooling that moves data in also moves it back out.

pg_dump -h db.xxxxxxxxxxxx.supabase.co -U postgres \
  -d postgres -Fc -f supabase_dump.dump

pg_restore -h your-new-host -U postgres \
  -d your_database --no-owner --no-privileges supabase_dump.dump

There’s no vendor-specific export format to fight, no data trapped behind an API that only Supabase’s own tools can read. Whatever you think of Supabase as a platform, this part of its architecture does what open standards are supposed to do.

Auth: easier to extract than you’d expect, harder to land

This is the detail most teams get wrong in both directions, so it’s worth being precise. Supabase Auth stores password hashes using bcrypt, in the encrypted_password column of the auth.users table — which is a normal Postgres table inside a database you fully control. Unlike a platform such as AWS Cognito, which explicitly blocks password hash export via its API for security reasons, there’s no equivalent restriction here: if you have direct database access to your own project (which every Supabase project owner does), the hashes are just sitting in a table you can query.

The harder part isn’t extraction — it’s whether your destination can use what you extract. If you’re moving to another bcrypt-based Auth system, this is close to a direct transfer. If you’re moving to a system that hashes with a different algorithm by default (Better Auth’s default is scrypt, for example), you have two real options: configure the destination to verify against bcrypt for migrated users, or run a gradual migration where each user’s password gets re-hashed in the new system’s format the next time they successfully log in. Both are well-documented patterns, not open research problems.

One more detail worth knowing: each Supabase project has its own JWT secret used to sign session tokens. If you carry that secret over to wherever you’re going, existing sessions stay valid. If you don’t, users need to sign in again — which is a minor inconvenience, not a password reset.

Storage: S3-compatible, straightforward to move

Because Supabase Storage exposes an S3-compatible API — the same fact that makes migrating storage into Supabase from an existing S3 bucket comparatively easy — moving files back out works the same way in reverse. Standard S3 tooling (the AWS CLI, rclone) can read directly from Supabase Storage and copy objects to wherever you’re headed next. Access-control policies, which live as Storage RLS in Supabase, need to be re-expressed in whatever access-control model your destination uses.

Realtime and Edge Functions: rebuilt, not exported

This is where a genuine rebuild is unavoidable. Supabase Realtime is built on Postgres’s logical replication; whatever platform you’re moving to almost certainly implements realtime updates differently, so the client-side subscription code needs to be rewritten against the new system’s API. Edge Functions run on Deno specifically — if your destination doesn’t support Deno natively, those functions need to be ported to whatever runtime you’re moving to, function by function, based on what each one actually does rather than a mechanical translation.

How complex is migrating away from Supabase, really?

Component Complexity Why
Database (schema + data) Low Standard Postgres with no proprietary format; pg_dump/pg_restore works in both directions
Authentication Moderate Password hashes are directly accessible via SQL (unlike Cognito); destination compatibility, not extraction, is the real variable
Storage Low S3-compatible API means standard S3 tooling works directly; only access-control policies need re-expressing
Realtime & Edge Functions Moderate–High No direct equivalent on most destination platforms; client code and functions need genuine rebuilding, not translation

An important reframe: this isn’t always a lost client

Here’s the part worth being direct about, because it changes how this whole topic should be read. Of the four reasons teams migrate away from Supabase, one of them — wanting fully self-managed infrastructure — isn’t actually a departure. It’s a request for self-hosted Supabase, deployed inside a client’s own AWS, GCP, or Azure account, with the same Postgres, Auth, Storage, and Realtime stack, just running somewhere the client fully controls.

That’s not a competing outcome to the migration work we’ve described throughout this series — it’s a direct match for one of our core services. A client who says “we want to leave Supabase because we need self-managed infrastructure” is, more often than not, a client whose actual need is met by staying on the platform and changing where it runs. Recognizing that distinction early is one of the more valuable things a migration partner can catch before a team spends effort moving somewhere they didn’t need to go.

Common pitfalls we see

  • Assuming Auth hashes can’t be extracted, and planning a mass password reset unnecessarily. Because the bcrypt hashes are sitting in a normal Postgres table you control, a forced reset is often avoidable — but only if the migration plan accounts for hash-format compatibility with the destination from the start.
  • Treating “we want self-hosted” and “we want to leave Supabase” as the same project. They frequently aren’t. Scoping which one you’re actually facing changes the entire plan.
  • Underestimating the Realtime and Edge Function rebuild. The database migrating cleanly can create a false sense that the whole project is low-risk; the parts of Supabase that don’t have a direct equivalent elsewhere are where the real engineering time goes.
  • Not carrying over the JWT secret when it matters. A minor detail that determines whether users get a slightly awkward “please sign in again” moment or a seamless transition.

A quick pre-migration checklist

  • Which of the four reasons actually describes your situation — and specifically, is “self-managed infrastructure” really a platform departure, or a case for self-hosted Supabase instead?
  • What password hashing algorithm does your destination Auth system use by default? This determines whether Auth migration is a near-direct transfer or requires a gradual re-hash-on-login approach.
  • Do you need existing user sessions to remain valid, or is an occasional re-login acceptable? This determines whether carrying over the JWT secret is worth the extra step.
  • How much of your application depends on Supabase Realtime or Edge Functions, and does your destination platform have a genuine equivalent or does that logic need a real rebuild?
  • Are you moving for cost, control, or a specific technical capability (like Neon’s scale-to-zero)? The answer shapes whether this is a full migration or a partial one.
🔄
Not sure if you need to leave Supabase, or just change how it’s deployed? Gart Solutions scopes migrations in either direction — including the self-hosted Supabase option that solves more “we want to leave” conversations than you’d expect. See how our migration practice works →

How Gart Solutions approaches these migrations

Migrating away from Supabase gets the same discipline we bring to every migration in this series, with one addition specific to this direction: we start by confirming which of the underlying reasons is actually driving the request, because “self-managed infrastructure” and “leave the platform entirely” point to very different projects. Our process typically covers:

  • Scoping the real destination — distinguishing a genuine platform departure from a case for self-hosted Supabase before any migration work begins
  • Database migration — pg_dump/pg_restore, validated against schema and row counts, in either direction
  • Auth migration strategy — direct hash transfer where the destination’s hashing algorithm is compatible, or a gradual re-hash-on-login approach where it isn’t
  • Realtime and Edge Function rebuilds — reimplemented against the destination platform’s actual capabilities, not mechanically translated

This completes the picture for what we’ve covered across this series: we handle migrations of any complexity, in any direction, across the Postgres and BaaS ecosystem. Firebase, Amazon RDS, Neon, Heroku, Render, and legacy MySQL/MSSQL systems onto Supabase — and Supabase onward to wherever a client’s architecture actually needs to go next. The direction of the arrow has never been the point; getting the migration right has.

Conclusion

Teams leave Supabase for real, specific reasons — spiky workload economics, wanting a leaner unbundled stack, extreme-scale cost or residency requirements, or a need for full infrastructure control. None of those reasons make Supabase the wrong choice in general; they’re the kind of requirements that only show up once a project has grown into them. The database migration itself stays genuinely low-risk in either direction, because Postgres doesn’t lock your data into a proprietary format. What deserves real attention is Auth compatibility with your destination and the Realtime/Edge Function rebuild — and, just as importantly, confirming upfront whether “leaving” actually means leaving, or just means self-hosting the same platform somewhere you control.

Planning a Supabase or Postgres migration?

Gart Solutions’ database migration engineers plan and execute Postgres migrations — into Supabase, within a live schema, or off a managed platform entirely — with a rollback plan built in from day one, not bolted on after something breaks.

40% cost reduction on a comparable Postgres migration
25% query performance improvement
Minimal downtime during cutover
Database Migration Cloud Migration SRE & Monitoring Compliance Audit
Talk to a migration engineer  →
Let’s work together!

See how we can help to overcome your challenges

FAQ

Is it hard to migrate away from Supabase?

The database migration itself is low-complexity, because Supabase runs standard Postgres with no proprietary format — the same pg_dump/pg_restore tooling that moves data in works to move it back out. The real complexity is in Auth (compatibility with your destination's hashing algorithm), Realtime, and Edge Functions, which don't have direct equivalents on most other platforms and need genuine rebuilding.

Can we get our users' password hashes out of Supabase?

Yes — and this is genuinely easier than leaving some other platforms. Supabase stores bcrypt password hashes in a normal Postgres table (auth.users) inside a database you fully control, unlike platforms such as AWS Cognito that explicitly block hash export via their API. The real question isn't whether you can extract the hashes, but whether your destination Auth system can verify them directly or needs a gradual re-hash-on-login migration.

We want self-managed infrastructure — do we actually need to leave Supabase?

Often, no. Self-hosted Supabase is a fully supported deployment model where the same Postgres, Auth, Storage, and Realtime stack runs inside your own AWS, GCP, or Azure account under your full control. If infrastructure ownership is the actual driver, this is usually a better-scoped project than a full platform migration, and it's worth confirming which one you're actually facing before committing to either plan.

What happens to Supabase Realtime if we migrate to another platform?

It needs to be rebuilt, not exported. Supabase Realtime is built on Postgres's logical replication, and most other platforms implement realtime updates through a different mechanism entirely, so the client-side subscription code has to be rewritten against whatever your destination platform provides.

Can Edge Functions move to another platform directly?

Not directly — Edge Functions run on Deno specifically, and unless your destination also supports Deno natively, each function needs to be ported to the target runtime individually, based on what it actually does rather than a line-by-line translation.

Will our users need to reset their passwords?

Not necessarily. If your destination Auth system can be configured to verify bcrypt hashes (or you implement a gradual re-hash-on-login migration), users can keep using their existing passwords. A forced reset is more often a sign of an unplanned migration than an unavoidable technical requirement.

Do we need to migrate everything at once?

No, and for workload-specific reasons (like wanting Neon's scale-to-zero for dev/staging environments), a partial migration is often the more sensible plan — moving only the parts of your infrastructure that actually benefit from the destination platform's specific strengths, while leaving production wherever it currently makes the most sense.

Does Gart Solutions actually help clients leave Supabase, given your focus on migrating people to it?

Yes — a genuinely vendor-neutral migration practice has to work in both directions, or it's not really vendor-neutral. We scope the real underlying need first, which sometimes means recommending self-hosted Supabase instead of a full departure, and sometimes means a full migration elsewhere. Either way, the goal is the right outcome for your infrastructure, not a specific platform's retention numbers.
arrow arrow

Thank you
for contacting us!

Please, check your email

arrow arrow

Thank you

You've been subscribed

We use cookies to enhance your browsing experience. By clicking "Accept," you consent to the use of cookies. To learn more, read our Privacy Policy