If your data has to live in your own cloud account, self-host Supabase. If you only use the database, plain Postgres will do. If it's just the bill, staying on Supabase Cloud is usually cheaper. Any move is real work. We moved one small app off Supabase Cloud to four targets, and the restore command from Supabase's guides stopped with an error on every one.
On the two Supabase targets, the restore also gave back privileges the app had taken away. An anonymous caller could run a function that returns a service key, and a signed-in user could make themselves an admin. Supabase has known about the cause since February 2026. Its CLI reference gave a fix for tables only, and in our test that fix left a function open. After our report, Supabase extended it to functions and sequences on November 19. Unless a result names another scope, every test result in this post has the same one: Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026, and one small demo app.
We sell one of these options. If you're keeping Supabase but leaving Supabase Cloud, we set up self-hosted Supabase in your own Google Cloud project in two weeks, at a fixed price from $8,000. That's for a new project, or one small enough to move in a day. A migration with live users gets its own fixed quote. If Supabase Cloud would serve you better, we'll say so.
Sachin Mour, who leads engineering at Pulore, moved Hexis off hosted Supabase to its own Google Cloud setup. Hexis's app has its own API and sign-in, so of Supabase's services it runs only Studio and postgres-meta, against Cloud SQL. For this post, we ran a migration test with a demo app on November 16, 2026.
Start with why you're leaving
| Why you're leaving | What fits | What to know |
|---|---|---|
| The bill | Usually, staying on Supabase Cloud | In our pricing post, Supabase Cloud is cheaper for the two smaller example setups. Self-hosting the largest saves money only if running it takes under 12 to 18 hours a month |
| A Free project that keeps pausing | A paid plan | Free projects pause after 7 days without activity. Pro starts at $25 a month |
| The data must live in your own cloud account, or off the internet | Self-hosted Supabase | The only alternative in our test that ran the app's supabase-js calls |
| A region Supabase Cloud doesn't offer | Self-hosted Supabase | Supabase Cloud's 17 regions include none in the Middle East |
| Health data that needs a BAA | Either, with work | See Supabase HIPAA compliance |
| Your app has its own API and sign-in | Plain Postgres, such as Cloud SQL | The data came over in our test. There's no API, sign-in, file serving or function runtime |
| Another Supabase region or organization | A new Supabase Cloud project | The same restore, with the two problems below |
| Documents, offline sync, or no SQL | A different backend | A rewrite of the app's data layer |
The test results in this table have the scope above: Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026. The plain Postgres row held on PostgreSQL 18 too.
What we moved, and where
The app is the demo behind our sample code audit report, in its fixed state: a client portal for small studios. It has 10 tables in the public schema, all with row level security (RLS) on, 28 policies, 8 functions, 2 triggers and 171 rows. Its 7 users sign in with email and password. 68 invoice PDFs sit in one private bucket behind 4 storage policies, and the app has 4 Edge Functions. One more trigger, on auth.users, creates a profile for each new user.
The source was a new Free project on Supabase Cloud, in Singapore, on PostgreSQL 17.12. It had "Automatically expose new tables" ticked, and its Data API on. We dumped it into the three files Supabase's guides use, for roles, schema and data, and restored that dump four ways:
- A second Supabase Cloud project: Free plan, Sydney, PostgreSQL 17.12. Supabase's backup and restore guide covers this move.
- Self-hosted Supabase: Supabase's Docker Compose setup at commit
5b6443862b90(November 16, 2026), on a laptop. Its compose file started PostgreSQL 17.6. Supabase's restore-to-self-hosted guide covers this move. - Cloud SQL for PostgreSQL 17.11, and again on 18.6: one vCPU and 3.75 GiB of memory, Enterprise edition, in London.
- Stock PostgreSQL 17 and 18: Docker Hub's
postgres:17andpostgres:18images, which were 17.12 and 18.7.
Supabase has no PostgreSQL 18 image yet. On November 16, Docker Hub's supabase/postgres had no 18 tag. So the source and both Supabase targets ran 17. Cloud SQL and stock Postgres restored the same dump on 17 and again on 18.
Both guides restore the three files with the same psql command, in one transaction that stops at the first error. It's "the guide's command" below. Run it only against the new target:
psql \
--single-transaction \
--variable ON_ERROR_STOP=1 \
--file roles.sql \
--file schema.sql \
--command 'SET session_replication_role = replica' \
--file data.sql \
--dbname "<target connection string>"Supabase's guides now write the dump commands with --remote, the spelling of newer CLI versions. CLI 2.31.4, which we ran, spells it --db-url.
Two sets of checks decided what carried over. 120 run through the public API with each user's own password. They cover sign-in, the rows each user can read, the app's database functions, files, Edge Functions and two writes. 156 values are read in SQL, among them every policy, the rows each user can see, and the grants anon and authenticated hold on each table and function. Cloud SQL and plain Postgres have no Supabase API, so only the SQL values apply there. On those two, we also restored a raw pg_dump, which Supabase's guide warns against.
We ran the same scripts against a local source earlier that day. Where the two runs differ, this post quotes the Cloud run.
The short version
Seen in our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026). Cloud SQL and stock Postgres ran again on PostgreSQL 18 the same day:
| Second Supabase Cloud project | Self-hosted Supabase | Cloud SQL 17.11 and 18.6 | Stock PostgreSQL 17.12 and 18.7 | |
|---|---|---|---|---|
| The guide's command, as written | Stopped at line 9 of roles.sql | Stopped at line 9 of roles.sql | Stopped: role "anon" does not exist, on 17 and on 18 | Stopped: role "anon" does not exist, on 17 and on 18 |
| Before it exited 0 | 8 roles lines left out | The same 8 lines, and 2 empty storage tables left out | Supabase's roles, schemas, and auth and storage tables added. supabase_vault left out. The trigger switch replaced. 6 roles lines left out, on 17 and on 18 | The same, without the trigger switch. 5 roles lines left out, on 17 and on 18 |
| Grant values wider than on the source | 18 of 40 | 18 of 40, the same 18 | 0 of 40, on 17 and on 18 | 0 of 40, on 17 and on 18 |
| Users | All 7 signed in with their old passwords | All 7 signed in with their old passwords | 7 bcrypt hashes, no sign-in service | 7 bcrypt hashes, no sign-in service |
| Files | Records came over. 68 files uploaded again | Records came over. 68 files uploaded again | Records only, no file service | Records only, no file service |
| Edge Functions | Deployed with the CLI | Copied in. 2 lines of the key helper changed | Nothing to run them on | Nothing to run them on |
| At the end | 120 of 120 API checks, 156 of 156 SQL values equal | 120 of 120 API checks, 153 of 156 SQL values equal | No API. 152 of 156 SQL values equal, on 17 and on 18 | No API. 152 of 156 SQL values equal, on 17 and on 18 |
On all four targets, all 28 RLS policies came over, and the rows each user can see matched the source. On all four, the dump left out the app's 4 storage policies and its sign-up trigger, which we added from a file of 5 statements.
PostgreSQL 18 changed nothing in the Cloud SQL and stock Postgres columns. Every error count and every checked value matched the 17 run, apart from the server version.
The restore gave back privileges the app had taken away
Seen on the second Cloud project and on self-hosted Supabase (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026):
- 18 of the 40 grant values we compare came back wider than on the source, the same 18 on both targets.
- An anonymous caller got HTTP 200 from
get_pdf_settings, a function that returns the PDF service's key. The source answered 401. - On the source, users could update only the name and avatar columns of their own profile. After the restore, a signed-in user changed their own role to admin, and was an admin afterwards. The source refused that with a 403.
- Anonymous callers got an empty list from 4 tables where the source refused them outright.
RLS itself carried over. The leak came from grants, which decide whether a role may use a table or function at all, before any policy is checked.
Why it happens
pg_dump writes each object's privileges as changes from PostgreSQL's built-in default for that object's type and owner, as the comment on buildACLCommands in pg_dump's source explains. That default never includes Supabase's API roles. So when the source has taken a privilege away from anon, the dump has no line for it.
Seen in our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026): for get_pdf_settings, the app's dump grants to service_role and says nothing about anon. Both Supabase targets started with default privileges in public that grant every new table, function and sequence to anon, authenticated and service_role. On the second Cloud project there were 6 such entries, for objects created by postgres and by supabase_admin. During a restore, each object is created, the target's defaults grant it to those roles, and the dump's own GRANT lines add what the source had. Nothing takes the defaults away again.
Supabase's Securing your API page documents these automatic grants. It says unticking "Automatically expose new tables" removes the Data API grants, though some privileges remain. It also says Supabase is changing the platform default to revoke the automatic grants, and gives no date. We created our second project with the box ticked, and didn't test one without it.
Who found it first
This isn't news to Supabase. A user restoring one Supabase Cloud project into another reported it in supabase/cli#4862 on February 16, 2026. Two days later, a member of the Supabase organization agreed on the thread that users silently get every privilege. On March 10, pull request #4885 added a "Note on Privilege Migration" to the supabase db dump reference, and the issue was closed as completed. The note said to revoke the default privileges on tables in public from anon and authenticated before restoring to a new project. Since November 19 it covers functions and sequences too, as below.
The reporter's own workaround on that thread was to take the API roles' privileges away, then run the dump's GRANT lines again. It's also what fixed our app.
What our test adds (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026):
- The note's fix covered tables only. On a new Supabase Cloud project, it closed the table in the two-object test below and left the function open.
- The same 18 grant values widened on a second Cloud project and on self-hosted Supabase.
- With a Supabase Cloud source, CLI 2.31.4's roles file stopped the guide's command at line 9 on both Supabase targets. That's the next section but one.
- Neither restore guide mentions any of this. As we read them on December 1, 2026, the backup and restore guide and the restore-to-self-hosted guide say nothing about default privileges or the anon role.
We ran the two-object test again with CLI 3.1.0 and with 3.2.0, which came out on November 16, and added a sequence (Supabase CLI 3.1.0 and 3.2.0, Supabase's PostgreSQL 17.12 image in local containers, 16 Nov 2026). Both times, the note's fix closed the table and left the function and the sequence open. Revoking the default privileges on tables, functions and sequences first closed all three. We reported the function and sequence case to Supabase on November 16, in supabase/cli#7647. Supabase changed the note because of it. Since November 19 it gives the same three statements for tables, functions and sequences (supabase/cli#7680). We ran the test again on December 1 with CLI 3.4.0, the latest release, and got the same results (Supabase's PostgreSQL 17.12 image in local containers).
Run the two-object test yourself
Run this only on a throwaway local database, never on a project with data. It creates and drops objects in the public schema and changes the database's default privileges. A new local project works: run supabase init and supabase start in an empty folder, and supabase status prints the database's connection string. Run every step through psql with that one connection string, so the same role creates, dumps and restores the objects. Your pg_dump has to be the same major version as the database, or newer.
-
Create one table and one function:
create table public.mech_t (id int); create function public.mech_fn() returns int language sql as 'select 1'; -
Take every privilege on both away from anon:
revoke all on table public.mech_t from anon; revoke all on function public.mech_fn() from public, anon; -
Check what anon may do. Both columns should read
f:select has_table_privilege('anon', 'public.mech_t', 'select') as anon_can_select, has_function_privilege('anon', 'public.mech_fn()', 'execute') as anon_can_execute; -
Dump the public schema to a file:
pg_dump "<local connection string>" --schema-only --schema=public --file=two-objects.sql -
Drop both objects:
drop table public.mech_t; drop function public.mech_fn(); -
Restore the file. In our runs, psql printed 13 errors here: one because the public schema already exists, and 12 for default privileges that belong to Supabase's own admin role. None was about the two objects.
psql "<local connection string>" -X --file=two-objects.sql -
Run the check from step 3 again.
-
Run the fix the
db dumpreference gave until November 19, for tables only:alter default privileges in schema public revoke all on tables from anon, authenticated; -
Repeat steps 5 to 7.
-
Because the restore in step 9 turned the defaults back on, run all three statements of the fix for tables, functions and sequences, as the reference gives it now:
alter default privileges in schema public revoke all on tables from anon, authenticated; alter default privileges in schema public revoke all on functions from anon, authenticated; alter default privileges in schema public revoke all on sequences from anon, authenticated; -
Repeat steps 5 to 7.
-
Drop both objects as in step 5.
-
Stop the stack with
supabase stop.
We saw the same four results in three places on 16 Nov 2026:
- a clean
supabase/postgres:17.6.1.136container; - an empty local stack started by Supabase CLI 2.31.4, on PostgreSQL 17.4;
- a new Free project on Supabase Cloud, on PostgreSQL 17.12.
| After | anon may select the table | anon may execute the function |
|---|---|---|
| Step 3, the source state | f | f |
| A plain restore | t | t |
| The reference's fix until 19 Nov, tables only | f | t |
| The fix for tables, functions and sequences | f | f |
The dump ends with the source's own ALTER DEFAULT PRIVILEGES lines, which grant to anon again. That's why each fix has to run right before its restore. After the test, the database's default privileges were the same as before it.
Before you restore: revoke the defaults
Do this on the new, empty target only, right before you restore. Run the statements through the same connection the restore uses, because default privileges belong to the role that creates the objects. Run them again before every restore attempt, because the dump's own ALTER DEFAULT PRIVILEGES lines turn the defaults back on.
-- On the NEW, EMPTY target only. Right before each restore attempt.
alter default privileges in schema public revoke all on tables from anon, authenticated;
alter default privileges in schema public revoke all on functions from anon, authenticated;
alter default privileges in schema public revoke all on sequences from anon, authenticated;In the two-object test, these three closed both objects on every database we tried. We didn't re-run the whole app with them. Going by that test, the tables-only fix would have left this app's 7 function grants open, get_pdf_settings among them. We didn't run the app that way either.
What fixed the app in our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026), on both Supabase targets, was a step after the restore. We took every privilege on the public schema's tables, views, sequences and functions away from anon, authenticated and service_role, then ran the dump's own GRANT lines again. After that, all 18 values matched the source.
After you restore: compare the grants
This query only reads. It lists every table, view, function and sequence in public that anon or authenticated can reach. It also lists columns where a role holds a right that the whole table doesn't give it. Run it on the source and on the restored database, then compare the two outputs. A line that's only in the target's output is a privilege the restore gave back.
Save it as after-restore-check.sql:
-- Read-only: what anon and authenticated can reach in the public schema.
with roles as (
select oid, rolname from pg_roles where rolname in ('anon', 'authenticated')
), rels as (
select c.oid, c.relkind from pg_class c join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public'
), found as (
select case r.relkind when 'v' then 'view' when 'm' then 'materialized view' else 'table' end as kind,
r.oid::regclass::text as object, ro.rolname as role,
concat_ws(',', case when has_table_privilege(ro.oid, r.oid, 'select') then 'select' end,
case when has_table_privilege(ro.oid, r.oid, 'insert') then 'insert' end,
case when has_table_privilege(ro.oid, r.oid, 'update') then 'update' end,
case when has_table_privilege(ro.oid, r.oid, 'delete') then 'delete' end) as can
from rels r cross join roles ro
where r.relkind in ('r', 'p', 'v', 'm', 'f')
union all
select 'column', r.oid::regclass::text || '.' || quote_ident(a.attname), ro.rolname,
concat_ws(',', case when has_column_privilege(ro.oid, r.oid, a.attnum, 'insert') and not has_table_privilege(ro.oid, r.oid, 'insert') then 'insert' end,
case when has_column_privilege(ro.oid, r.oid, a.attnum, 'update') and not has_table_privilege(ro.oid, r.oid, 'update') then 'update' end)
from rels r join pg_attribute a on a.attrelid = r.oid and a.attnum > 0 and not a.attisdropped
cross join roles ro
where r.relkind in ('r', 'p')
union all
select 'function', p.oid::regprocedure::text, ro.rolname, 'execute'
from pg_proc p join pg_namespace n on n.oid = p.pronamespace cross join roles ro
where n.nspname = 'public' and has_function_privilege(ro.oid, p.oid, 'execute')
union all
select 'sequence', r.oid::regclass::text, ro.rolname,
concat_ws(',', case when has_sequence_privilege(ro.oid, r.oid, 'usage') then 'usage' end,
case when has_sequence_privilege(ro.oid, r.oid, 'select') then 'select' end,
case when has_sequence_privilege(ro.oid, r.oid, 'update') then 'update' end)
from rels r cross join roles ro
where r.relkind = 'S'
)
select kind, object, role, can from found where can <> '' order by kind, object, role;Then run it on both databases and compare:
psql "<source connection string>" -X -A -F ' | ' -f after-restore-check.sql > source.txt
psql "<target connection string>" -X -A -F ' | ' -f after-restore-check.sql > target.txt
diff source.txt target.txtWe ran it on our local rehearsal target on 16 Nov 2026, where it listed 36 grants without an error.
The roles file stopped the restore at line 9
Seen in our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026):
With a Supabase Cloud source, CLI 2.31.4's role-only dump held more than the app's own roles. It had two roles Supabase creates itself, supabase_etl_admin and supabase_privileged_role, three grants made by supabase_admin, and a grant on the log_min_messages parameter.
On both Supabase targets, the guide's command stopped at line 9 of roles.sql, which creates supabase_etl_admin, because the role already existed. A pass that we rolled back found 8 failing lines on the second Cloud project, all in the roles file. Two roles already existed, five lines touched reserved roles that only a superuser may change, and the parameter grant was refused. The schema and data files loaded with no error.
We commented out exactly those 8 lines and ran the guide's command again. It exited 0, and after the other fixes in this post, every SQL value and API check matched the source.
On Cloud SQL and plain Postgres, the guide's command stopped on role "anon" does not exist instead, since neither server has Supabase's roles. After we created them, the three grants made by supabase_admin failed there too, and on Cloud SQL, so did the parameter grant. Both servers did the same on PostgreSQL 18.
With CLI 2.31.4, a local stack's roles file had none of these lines, so our rehearsal against a local stack couldn't show this.
In our re-check, CLI 3.1.0 left these lines out, and so did 3.2.0, which came out on November 16 (Supabase CLI 3.1.0 and 3.2.0, Supabase's PostgreSQL 17.12 image in local containers, 16 Nov 2026). The image has the same two roles and the three grants made by supabase_admin. We added the parameter grant ourselves. Neither roles file had any of the 8 lines, and the guide's command ran without an error. Both versions treat every role whose name starts with supabase_ as reserved. We didn't run either against a Supabase Cloud project. If you dump with an older CLI, update it first, or comment out the lines that fail.
Stay on Supabase Cloud, or move to a new project
If the bill is the reason, price it before you move. Our pricing post works out three setups line by line. On Supabase Cloud they come to $35, $437.38 and $3,895.30 a month. Self-hosted on Google Cloud, the same setups are about $117, $230 and $2,045 a month in infrastructure, before 2 to 20 hours a month of running work. Supabase Cloud wins the first two, on prices checked October 28 and November 2, 2026. The Supabase pricing calculator runs the same model on your numbers.
If you need a new Supabase project, for another region or organization, Supabase's backup and restore guide covers the move with the same three files and psql command. Of our four targets, this one needed the least work by hand.
Seen in our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026), besides the roles lines and the grants above: the API answered right after the restore. All 7 users signed in with their old passwords. 19 of the 120 API checks differed from the source at that point. That fell to 11 after the grants fix, 7 after the storage policies and trigger, and 6 once the studio owners had uploaded the 68 PDFs again. The files kept their owners. The count reached 0 when the Edge Functions were deployed with the CLI, unchanged. At the end, all 156 SQL values matched too.
Supabase's backup and restore guide says changes you make to the auth and storage schemas, such as triggers and RLS policies, have to be restored separately.
Self-host Supabase
This is the alternative for data that has to live in your own cloud account, stay off the internet, or sit in a region Supabase Cloud doesn't offer. Of the three alternatives we tested, it's the only one that ran the app's supabase-js calls.
Seen in our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026), on self-hosted Supabase running PostgreSQL 17.6: the grants and the storage policies and trigger needed the same work as on the second Cloud project. The 68 files went up again through the Storage API with the stack's service-role key. On top of that:
- The data for 2 empty storage tables had to come out too, because the restoring user may not write them.
- The API answered 404 until we told PostgREST to reload its schema cache with
NOTIFY pgrst, 'reload schema'. - Three of the four Edge Functions failed with
supabaseKey is required. The app's key helper readsSUPABASE_PUBLISHABLE_KEYS, which the stack leaves empty unless Supabase'sadd-new-auth-keys.shscript has been run. A two-line change to the helper, falling back to the legacy key, fixed it. We didn't test running the script instead. - The app's per-function
verify_jwtsetting has no counterpart. The stack has one switch for all functions,FUNCTIONS_VERIFY_JWT, off by default. This app's functions check the caller themselves, so its checks still passed.
At the end, all 120 API checks matched the source. 153 of 156 SQL values did. The other 3 were the server version, and the pg_net extension and schemas the image adds.
Supabase's restore-to-self-hosted guide doesn't mention the schema reload. It says the self-hosted image is Postgres 15 by default. The compose file we pulled started PostgreSQL 17.6, so check the version before you restore a Postgres 17 dump.
What we didn't test is running it for real. Our stack ran on a laptop, with no TLS, no email sending and no backups. Self-Hosted Supabase in Production covers that work, and what the platform has that self-hosting doesn't. Supabase hosting options compares where to run it.
Plain Postgres in your own cloud account
This fits an app that already has its own API and sign-in, or a team ready to build them. It's how Hexis runs, with Supabase Studio and postgres-meta on top as admin tools. Why We Self-Host Supabase on GCP covers that setup and Cloud SQL's limits.
Seen in our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026), on Cloud SQL for PostgreSQL 17.11 and 18.6, and on stock PostgreSQL 17.12 and 18.7. Each result below held on both versions:
- The guide's command stopped on
role "anon" does not exist. - To load the three files, we created Supabase's roles, three schemas and a publication by hand. We loaded the auth and storage table definitions from the source, since the files assume them but don't contain them. We left out the
supabase_vaultextension, which neither server offers, and the roles lines that failed. - Cloud SQL's
postgresuser isn't a superuser. Cloud SQL refused the guide's trigger switch,SET session_replication_role = replica, with "permission denied to set parameter". The CLI's data file sets it on its first line too. - With triggers left on, the app's own trigger fired during the data load, and the membership rows then failed on a duplicate key. Turning the app's triggers off by hand around the data file fixed it. Supabase Cloud allowed the switch.
- Loading the auth and storage table definitions into Cloud SQL printed 367 errors, 362 of them about
pg_attver, a storage parameter Supabase's Postgres sets on its tables. The data still loaded.
Nothing came back wider here: 0 of 40 grant values. 152 of 156 SQL values matched on both servers, on 17 and on 18, including all 88 per-user row counts. The 4 that differ are the server version and the lists of extensions, schemas and roles.
PostgreSQL 18 changed none of this. Every error count matched the 17 run. Apart from the server version, the only difference we saw was on Cloud SQL, which offers newer default versions of two of the source's extensions on 18: pg_stat_statements 1.12 and pgcrypto 1.4, against 1.11 and 1.3 on 17.
What came over is the data. The 7 users arrived with their bcrypt password hashes, but there's no sign-in service to check them against. The 68 file records arrived without the files or anything to serve them. auth.uid() exists only because the auth schema's functions came along, and the policies apply only to a caller that sets request.jwt.claims the way PostgREST does. Sign-in, an API, file serving and a runtime for the functions are yours to build.
Supabase's restore-to-self-hosted guide warns that a raw pg_dump picks up Supabase's internals and causes permission errors. In our test, with Supabase's roles created first, a raw pg_dump printed 21 errors on stock Postgres and 580 on Cloud SQL, on 17 and on 18 alike. Each still matched 153 of 156 SQL values. It never needed the trigger switch, because a raw dump loads the data before it creates triggers.
We didn't test Amazon RDS, a private IP or the Cloud SQL Auth Proxy.
A different backend
Firebase is the first name on most lists, and it's a different kind of backend. Its main database, Firestore, stores documents rather than tables, Security Rules take the place of RLS policies, and it runs only on Google's cloud. Moving there means reshaping the data, rewriting every policy and replacing the app's supabase-js calls. Firebase's docs say its user import accepts bcrypt hashes. In our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026), all 7 users' password hashes were bcrypt. We compare the two in Supabase vs Firebase.
The other backends on most lists are below. We haven't moved an app to any of them, so the table says nothing about how a move goes.
Not run by us. Each line is from the project's own pages, read on November 16, 2026.
| Project | Its database | More from its own pages |
|---|---|---|
| Neon | Postgres, which its docs call Lakebase Postgres, with branching and autoscaling | Auth, object storage, functions and realtime too. Its Supabase guide restores with --no-owner and --no-acl, which leave out the source's owners and grants, and says to set roles and privileges afterwards |
| Appwrite | Its own Databases service, which its docs say supports a different set of features from PostgreSQL | A Supabase import in its console. Postgres functions, advanced indexes and scheduling don't move, OAuth users sign in again, and functions are rebuilt by hand. BSD 3-Clause license |
| Nhost | Postgres, with a GraphQL API from Hasura | Auth, storage and Node.js functions. MIT license. Its README says the whole stack can be self-hosted, starting from a Docker Compose example |
| Convex | Its own reactive database. Reads, writes and business logic are TypeScript functions | FSL-1.1-Apache-2.0 license. Its README says the self-hosted version includes most features of the cloud product |
| PocketBase | Embedded SQLite, in one file | Realtime subscriptions, auth, file storage and an admin dashboard. v0.43.0 on its site. Its docs say full backward compatibility isn't guaranteed before v1.0.0 |
What a move takes
We timed only the machine steps, on 171 rows and 68 small files (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026). Those times say nothing about how long a real move takes, and we didn't time the human work.
What the test does show is the work list. Between the dump and a matching copy on a Supabase target, we:
- left out the roles lines a Cloud source carries;
- fixed the grants the restore widened;
- added the app's storage policies and sign-up trigger by hand;
- uploaded every file again;
- deployed or copied the Edge Functions, and on self-hosted Supabase, reloaded PostgREST's schema cache and changed the key helper.
On plain Postgres, the list starts with Supabase's roles, schemas, and auth and storage tables, and ends with building sign-in, an API and file serving.
A real app adds what our test left out: OAuth identities, MFA, more data, writes during the move, and the cut-over. For a project with live users, we rehearse the move on a copy first. Then we cut over in a quiet window: pause writes, copy the last changes, point the app at the new stack and check that the data matches. That's why a migration with live users gets its own fixed quote. If you'd like an outside read of the app before you decide, our fixed-price code audit reviews its code, RLS policies and cloud setup.
Compliance and where the data lives
Supabase Cloud can hold protected health information on the Team plan or above, with its paid HIPAA add-on and projects set as High Compliance. The add-on comes with Supabase's Business Associate Agreement (BAA). Self-hosted, Supabase's BAA doesn't apply, and Supabase says its HIPAA controls aren't supported out of the box there. The agreement that matters is then your cloud provider's, for the products it covers. Supabase HIPAA compliance walks through both routes. This is engineering, not legal advice.
Supabase's regions page lists 17 specific regions, none in the Middle East, as read on November 16, 2026. Self-hosting puts the database in the region and cloud account you choose. A new Supabase Cloud project can change the region, within that list.
How to choose
Each step names the requirement it answers and the assumption behind it.
- If the bill is the reason, stay on Supabase Cloud and find the line that's growing. In our pricing post's largest example, self-hosting saves about $1,850 a month on the invoice. That covers the running work only if it takes less than 12 to 18 hours a month. The one-time setup then has to be paid back: at 10 hours a month and $125 an hour, an $8,000 setup takes about 13 months. This assumes your bill looks like one of the post's examples.
- If the data must live in your own cloud account, stay off the internet, or sit in a region Supabase Cloud lacks, self-host Supabase. This assumes someone owns upgrades, backups and restore tests, and plans for the restore steps above.
- If your app has its own API and sign-in, move the database to plain Postgres. This assumes you can do without Supabase's API, Auth, Storage and Edge Functions.
- If you need another Supabase region or organization, restore into a new Supabase project. This assumes you revoke the default privileges first and compare the grants after.
- If you want documents, offline sync or no SQL, pick a different backend. This assumes you'll rewrite the data layer, the access rules and the sign-in flow.
What we didn't test
- Paid plans, other regions, or a project with "Automatically expose new tables" unticked. Both projects were on the Free plan.
- CLI 3.1.0 or 3.2.0 against Supabase Cloud. We re-ran the roles file and the two-object test with them in local containers only.
- Size and downtime: 171 rows and 68 small files, no writes during the move, no cut-over.
- Sign-in other than email and password: no OAuth identities, MFA factors, SSO or phone sign-in.
- Whether existing sessions survive the move.
- New sign-ups. We checked that the sign-up trigger exists on each target, but created no account.
- Realtime, cron, webhooks, Vault and pg_net. The app uses none of them.
- Running self-hosted Supabase in production. Ours ran on a laptop with default settings.
- Moving files over the S3 protocol, or by copying the file backend's folder.
- Managed Postgres beyond one Cloud SQL tier in one region, reached over an allowlisted public address.
- PostgreSQL 18 on the Supabase side. Supabase has no 18 image yet.
- The fix for tables, functions and sequences on the whole app. It ran on the two-object test only.
- Neon, Appwrite, Nhost, Convex, PocketBase and Firebase.
- Hours of work. We timed machine steps only.
Frequently asked questions
What is the closest alternative to Supabase?
Self-hosted Supabase, because it runs Supabase's own open-source services. In our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026), it was the only alternative where the app's supabase-js calls kept working. All 120 checks matched the source after the fixes in this post, with a two-line change to the Edge Functions' shared key helper. Plain Postgres such as Cloud SQL, on PostgreSQL 17 and 18, kept the schema, data and RLS policies, but has no API, sign-in or file storage. Appwrite, Nhost, Convex and PocketBase have their own APIs, so moving to them means rewriting the app's data calls.
Is self-hosted Supabase cheaper than Supabase Cloud?
Usually not for small and mid-sized apps. In our Supabase pricing post, two example setups cost $35 and $437.38 a month on Supabase Cloud. Self-hosted on Google Cloud, they need about $117 and $230 of infrastructure, plus 2 to 8 hours a month of running work. In the largest example, $3,895.30 against about $2,045, self-hosting saves money only if running it takes less than 12 to 18 hours a month. Those prices were checked on October 28 and November 2, 2026.
Do user passwords carry over when you leave Supabase Cloud?
For email and password users moving to another Supabase project or to self-hosted Supabase, they did in our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026). All 7 users signed in with their old passwords right after the restore, and a wrong password was still refused. On Cloud SQL and plain Postgres, the 7 users arrived with their bcrypt hashes, but there was no sign-in service to check them against. We didn't test OAuth, MFA, SSO or phone sign-in. Supabase's restore-to-self-hosted guide lists auth provider settings among the things you set up again by hand.
Does restoring a Supabase dump keep its grants?
Not on a target whose default privileges grant to anon. pg_dump records grants as changes from PostgreSQL's built-in defaults. So a privilege the source took away from anon leaves no line in the dump, and the target's defaults hand it back. In our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026), 18 of 40 grant values came back wider on both Supabase targets. Supabase's db dump reference now gives the fix for tables, functions and sequences: revoke the default privileges for anon and authenticated right before the restore. In our two-object test, those three statements closed both objects. The tables-only version it gave before November 19 left the function open.
Can you move off Supabase Cloud without downtime?
We didn't test it. The dump and restore in this post is an offline copy: anything written after the dump doesn't move. For a project with live users, we rehearse the move on a copy first. Then we cut over in a quiet window: pause writes, copy the last changes, point the app at the new stack and check that the data matches. The old project stays as it was until you're confident in the new one.
What happens to Supabase Storage files in a migration?
The database dump carries the files' records, not the files. In our test (Supabase CLI 2.31.4, PostgreSQL 17.12, two Free projects, 16 Nov 2026), the 68 file records came over to both Supabase targets. The PDFs had to be uploaded again through the Storage API. After that, every file check matched the source. The app's 4 storage policies weren't in the dump either, and went in by hand. Supabase's restore-to-self-hosted guide lists storage objects among the things to move separately.

