Can users access my database?
Last checked 31 Aug 2026
Short answer
Only through the access rules you (or your row-level security policies) allow — Lovable Cloud's database isn't publicly browsable, but a table without RLS enabled is effectively open to anyone with your app's public key.
The default exposure
Every Lovable Cloud (Supabase) project's database is reachable via a public anon API key that ships in your front-end code — this is normal and expected. What actually restricts access is row-level security (RLS) policies on each table, not the key being secret.
What this means practically
- A table with RLS disabled can be read or written by anyone who has your app's public key — which is anyone who's loaded your site, since it's in the browser.
- A table with a correct RLS policy only allows the specific access you defined, e.g. "a user can only see their own rows".
- Direct SQL access to the underlying Postgres instance is not exposed to visitors — access always goes through the API layer, governed by RLS.
How to check yours
List every table and confirm row-level security is enabled with policies matching who should actually see and edit each row.
What usually goes wrong
Tables created early in a project (during prototyping) sometimes get left with permissive or no RLS policies once the "shape" of the data is right, and nobody revisits them before launch. Treat "does this table have correct RLS" as a standing checklist item, not a one-time setup step. See /questions/how-do-i-check-supabase-rls for how to verify this and /questions/can-users-access-other-users-information for the specific case of cross-user data leaks.
Sources
Was this answer helpful?
Related questions
- AnswerHow do I make Lovable perform a security review without changing anything?Explicitly tell Lovable to run in read-only review mode — ask it to report findings only and not touch any code, then decide what to fix yourself.
- AnswerHow do I prevent spam registrations?Verify email addresses on sign-up, add a CAPTCHA to the registration form, rate-limit sign-up attempts per IP, and check the token server-side before creating an account.
- AnswerHow do I check Supabase RLS?Ask Lovable to list every table and its row-level security status and policies in plain language — Lovable Cloud users don't have Supabase dashboard access, so this has to go through chat.
- AnswerWhere should secrets be stored?In your project's server-side secrets store, used only inside Edge Functions — never in front-end code, client-side environment variables, or committed to your Git repository.