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 protect API keys?Never put API keys in front-end code — store them as secrets used only inside server functions (Edge Functions), where the browser never sees them.
- AnswerAre Lovable websites secure?Lovable includes built-in security scanning and API-key protection, but real security also depends on you setting up row-level security and role checks correctly — it isn't automatic just because you used Lovable.
- 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.
- AnswerHow do I run a security audit on Lovable?Open your project's Security view in Lovable to see automated scan results, then ask Lovable in chat to review RLS policies, role storage, and any exposed secrets in detail.