Lovable and Supabase: the built-in backend, your own project, and RLS that holds
Lovable runs on Supabase twice over. The built-in backend (Lovable Cloud) uses Supabase's open-source foundation and is on by default, billed in Lovable credits. Or you connect a Supabase project you own and Lovable builds against it, billed by Supabase. The choice is hard to undo: moving from your own Supabase to the built-in backend is not supported, and the other direction is an export and restore. Either way, Lovable's docs name the main risk: missing row-level security policies are “the most common way app data gets exposed”.
By Marco Kohns · Docs read 23 October 2026; SaaS run 2026-09-26
Onby default
The built-in backend is enabled for every workspace and turns on when a feature needs it.
1Supabase project
Each Lovable project connects to one at a time; two projects sharing one overwrite each other's secrets.
10.4credits
My SaaS foundation on the built-in backend: 4 questions, sign-up, workspaces, roles in the database.
The choice
Should you use Lovable Cloud or your own Supabase project?
The built-in backend for one bill and one console; your own Supabase when you need its dashboard, its billing or a database that outlives the builder.
| Built-in backend (Cloud) | Your own Supabase project | |
|---|---|---|
| Setup | On by default; Lovable enables it when a feature needs it, or asks first | Connect a project you own; available on all plans |
| Billing | Lovable credits (Run credits) | Supabase bills your organisation |
| Database changes | SQL migrations; breaking changes never applied by default | Reviewed migrations: Lovable shows the SQL and asks before running it |
| Social login, auth settings | Configured from the Lovable chat | Configured in the Supabase dashboard |
| Switching later | To your own Supabase: export, restore, then auth, secrets and storage again | To the built-in backend: not supported |
Sources: Built-in backend, Supabase integration, moving a backend, read 23 October 2026. Since 20 October 2026 Lovable can also create a Supabase project from the chat, in workspaces where the built-in backend is disabled; the region cannot be changed afterwards.
The built-in backend
What does Lovable Cloud give an app?
A database with live updates, user authentication, storage and functions, with the backend managed and billed inside Lovable.
Data
Database
People
Users and sign-in
Files
Storage
Logic
Functions
On my SaaS run (2026-09-26) the prompt asked for sign-up, workspaces and invites; Lovable asked 4 questions, enabled the built-in backend, built the flow, signed in as a second test user to try an invite, and reported roles checked in the database on every read and write. The whole run cost 10.4 credits. The full run is on the SaaS MVP prompt page.

Row-level security
Where does row-level security break in a Lovable app?
Where a table has no policy, where a policy lets everyone through, and where the policy exists but does not match what the app means.
Holds
Policies that deny
- Every table has row-level security, deny by default
- Roles in their own table, read by the policy
- The owner id comes from the session, never from the client
- A query as a second account returns zero rows
Breaks
The common gaps
- A table created in a later prompt without a policy
- using (true): the table is covered and denies nothing
- An update policy without with check, so a row changes owner
- A security definer function that reads around every policy
Lovable flags missing coverage: on a connected Supabase project it runs automated checks on RLS coverage after schema changes, and the Security view's Quick scan reviews access rules at every publish. Coverage is half the answer. Its own docs tell you to verify the policies yourself, and the only proof is a query run as someone who should be denied. The security guide has the CVE that shows what happens when that step is skipped.
Tested schemas
What do four tested Lovable schemas look like?
The four build kits ship a Supabase schema and a verify.sql that runs as the wrong user. Counts parsed from the files.
| Kit | Tables | Policies | Checks | The trap it prevents |
|---|---|---|---|---|
| SaaS Starter | 4 | 12 | 6 | a member promoting themselves to owner |
| Landing Page with Email Capture | 1 | 1 | 7 | a public form that exposes the whole list |
| Internal Admin Dashboard | 2 | 5 | 7 | an aggregate function that leaks the event log |
| Lightweight CRM | 3 | 12 | 6 | a record reassigned to someone else |
Leaving
How do you take the database with you if you leave Lovable?
Plan it before the first table exists: the backend you start on is the one you keep unless you export.
- 01Simplest exit
Own Supabase from day one
The database was always yours; the migrations Lovable ran are saved in the code under supabase/migrations/. - 02Several steps
Built-in backend, then export
Export the database and restore it into a Supabase project, then move storage files, auth, secrets and connected services yourself. - 03GitHub
Keep the code too
Git sync creates a new repository and syncs one branch; the code and the migration files go with it.
Steps from Lovable docs: database backups and moving a backend, read 23 October 2026. Deleting the built-in backend permanently deletes the database, its backups, user accounts and files.
Schemas with the proof included
Disclosure: if you create a Lovable account through links on this page, we may earn a commission. It costs you nothing and does not change what we recommend. Create a free Lovable account
Frequently asked
Does Lovable use Supabase?
Yes. The built-in backend, also called Lovable Cloud, uses Supabase's open-source foundation and is on by default, billed in Lovable credits. Or you connect a Supabase project you own, available on all plans and billed by Supabase.
Can I switch a Lovable project from Cloud to my own Supabase?
Not in one step. Per Lovable's docs you export the database, restore it into your Supabase project, then move storage files, code, authentication, secrets and external services. The other direction, from your own Supabase to the built-in backend, is not supported.
Can two Lovable projects share one Supabase project?
They can connect, but Lovable warns that projects sharing one Supabase project overwrite each other's secrets, including the LOVABLE_API_KEY, so features using that key stop working. Each Lovable project connects to one Supabase project at a time.
Does Lovable change my Supabase database without asking?
On a connected Supabase project, schema changes run as reviewed migrations: Lovable shows the SQL and asks for approval before running it, and also asks before inserting or changing data. Reading data to debug changes nothing.
Does Lovable check my row-level security?
It checks coverage: automated checks after schema changes on a connected project, and the Quick scan at every publish. Its docs also tell you to verify the policies yourself. A query run as a second account, expecting zero rows, is the check that proves a policy denies.
Where do social logins get configured?
On the built-in backend, from the Lovable chat. On your own Supabase project, in the Supabase dashboard's Authentication settings, after which you prompt Lovable to add the sign-in button.
What we did not publish
- A run on a connected Supabase project. My runs used the built-in backend.
- Supabase's own prices, which Supabase sets and bills.
- A credit figure for running the built-in backend over a month; Run credits depend on the app's traffic and I have no production app on it to measure.
Sources
- Lovable docs: Built-in backend, read 23 October 2026
- Lovable docs: Supabase integration, read 23 October 2026
- Lovable docs: Database backups, read 23 October 2026
- My SaaS run, 2026-09-26; the kits' own SQL files
Written by

Marco Kohns
Founder of ProtoBites - Venture Growth Studio
Growth PM at a Silicon Valley scale-up (a16z and General Catalyst backed), ex-Techstars where he consulted 13 early-stage startups, Reforge-trained. Every prompt on this site comes out of shipping ProtoBites' own portfolio products.
Related reading
- every Lovable guide, by build stage · Choose a tool, plan, prompt, build safely, launch.
- free build kits with tested RLS · The four schemas counted on this page.
- the SaaS starter kit · Verification queries that stop a member becoming owner.
- backend prompts for roles, jobs and RLS · The rules the kits prove.
- Lovable SaaS prompts · The foundation prompt that enabled Cloud.
- common Lovable mistakes · Trusting generated access control, priced.
- Lovable pricing and credits · Plans read today and what one prompt costs in credits.
- the SaaS MVP prompt, run and measured · Roles checked in the database, per the run.
- how to write prompts for Lovable · The Safe-Guard section, explained.
- Lovable security · The CVE record, the two scans, and our own leak.
- SaaS ideas · Fifteen SaaS ideas built on multi-tenant policies.
- build a SaaS · Building a SaaS in the order that proves each policy first.
- CRM app prompts · Ten CRM briefs that keep the with-check clause.
- admin dashboard prompts · Ten briefs whose safeguards refuse SECURITY DEFINER.
- the SaaS MVP prompt page · Roles checked in the database, read back by Lovable on the run.