Lovable and Supabase not working? Fixing connection and data problems
Last reviewed 21 November 2026
Most Lovable apps keep their data in Supabase, either through Lovable’s built-in backend or a Supabase project of your own. When that link breaks, the app loads but nothing in it does. Here’s how to find out which part is wrong, without opening your data to everyone.
First check which backend you have: Lovable’s built-in one or your own Supabase project. If Lovable can’t connect, make sure the Supabase project is active, not paused, and reconnect it. If data is missing or you see “permission denied”, the database’s access rules are blocking it. Fix the rule, never switch it off, and keep secret keys out of your app’s code.
Which backend do you have?
- Lovable’s built-in backend is on by default, so most projects don’t need a Supabase account at all. It’s built on Supabase, and you manage the database, users and logs inside Lovable.
- Your own Supabase project is connected through Lovable’s Supabase integration. You manage it in the Supabase dashboard, and you pay Supabase separately.
Moving between the two isn’t automatic in either direction, according to Lovable’s Supabase guide, so it pays to know which one you’re on before changing anything.
Lovable can’t connect to Supabase
- The project is paused or still starting. Lovable can’t connect to a Supabase project that isn’t active. On Supabase’s free plan, projects are paused after a week without activity. Restore it in Supabase, then try again.
- The project was deleted, or access changed. Lovable then can’t find it. Disconnect it, or reconnect the Supabase organisation. Only workspace owners and admins can reconnect an organisation, but anyone with edit access can connect the project again once it’s linked.
- Access has expired. Reconnect the organisation from Connectors → Supabase → Manage Connected Organizations.
- Two Lovable projects share one Supabase project. Lovable warns that they overwrite each other’s secrets, which can break features in both.
Disconnecting doesn’t change your code or delete anything in Supabase, and you can reconnect to the same project later. While it’s disconnected, Lovable stops deploying your backend functions and can’t see the database, so reconnect before making more changes.
Data missing, or “permission denied”
Supabase protects each table with access rules, called Row Level Security (RLS). Two different problems look similar:
| What you see | What it usually means | What to do |
|---|---|---|
| “Permission denied” | The database role has no permission on the table at all, before any rule is checked | Check the table’s permissions first, as Supabase advises |
| “new row violates row-level security policy” when saving | RLS is on, but no rule lets this user add or change this row | Add an insert or update rule limited to the user’s own rows, and test it with two accounts |
| No error, but the list is empty | RLS is on and no rule lets this user see these rows | Add a rule that lets each user see their own rows, and test it with two accounts |
| Everyone can see everything | RLS is off, or a rule lets everyone through | Turn RLS on and write proper rules. This is the dangerous one |
Why switching RLS off is the wrong fix
When data won’t load, an AI assistant may suggest turning RLS off or allowing everything. The error disappears because nothing is protected any more. Lovable’s guide calls missing RLS rules the most common way app data gets exposed, and says every table should have them before you go live. Lovable’s quick security scan, which runs when you publish, flags tables without RLS and rules that let everyone through. Read is Lovable secure? for the wider picture.
Which Supabase keys are safe in your app
- The publishable key (older projects call it the anon key) is meant to be public. Supabase says it’s safe in web pages and apps, because RLS decides what it can reach.
- The secret key (older name: service_role) skips every access rule. Supabase says it must never go in a browser, a shipped app or your code repository, and never be sent over chat or email. That includes pasting it into an AI chat.
- Keys starting with “eyJ” are the older kind. Supabase is replacing the anon and service_role keys with publishable and secret keys by the end of 2026, so tutorials that tell you to copy them are out of date.
In Lovable, secret keys belong in Secrets, where backend functions can use them and the browser never sees them. Anything named VITE_ ends up in the browser, so it must never hold a secret.
Database changes that didn’t happen
When you change the database through Lovable’s chat, it writes the change as a migration that you approve. Changes pushed through GitHub are different: Lovable’s GitHub guide says it doesn’t run migration files or redeploy backend functions that arrive that way. Ask Lovable in chat to apply them, or run them yourself, and back up first. Our backup guide shows how.
When to get help
If real customers’ data is involved and you’re not sure your access rules are right, have a developer check them before anything else. It’s the problem with the most serious consequences and, for someone who knows Supabase, one of the quicker ones to put right. See hiring a Lovable developer.
Questions founders ask
Do I need my own Supabase account for Lovable?
Usually not. Lovable’s built-in backend is on by default and runs on Supabase underneath. Your own Supabase project makes sense if you want to manage the database directly or already have one.
Is it safe that my Supabase key is visible in the browser?
The publishable (anon) key is meant to be visible, as long as RLS rules protect your tables. The secret (service_role) key must never be visible anywhere outside your backend.
Can I move from Lovable’s built-in backend to my own Supabase later?
Yes, but it’s manual: export and restore the database, move uploaded files and code, and set up sign-in, secrets and outside services again. See moving from Lovable Cloud to your own Supabase project.