Supabase or Lovable Cloud?
What you can build
With Supabase connected, you can prompt Lovable to build complete backend features:- Store and query data: Lovable designs tables and relationships from a plain-language description and connects your UI to them.
- Sign users in: email and password authentication, social logins, and access control backed by Supabase Auth.
- Upload and serve files: images, documents, and other media stored in Supabase Storage buckets.
- Run server-side code: Supabase Edge Functions for payments, emails, AI features, scheduled tasks, and external API calls.
- Keep secrets safe: API keys for services like Stripe or Resend are stored securely in your Supabase project, never in your app’s code.
- Update in real time: live chat, feeds, and dashboards using Supabase’s real-time subscriptions.
Prerequisites
- A Supabase account. Sign up or sign in; the free tier is enough to get started.
- A Supabase project to connect, or a Supabase organization where you can create one.
Connect Supabase to Lovable
Connecting involves two separate actions, often done by different people:- Link a Supabase organization to your Lovable workspace. A workspace owner or admin does this once per organization. Linked organizations become available to everyone in the workspace.
- Connect a Lovable project to a Supabase project. Anyone with edit access to the project can do this, using any project from a linked organization.
Link your Supabase organization (workspace owners and admins)
You can link an organization from any of these places:- The Supabase connector page: open Connectors from the dashboard sidebar, select Supabase, and click Connect Supabase (or Manage Connected Organizations if the workspace already has one).
- The connect dialog in a project: in the editor, open More → Cloud, click Already have a Supabase project? Connect it here, and use Add Organization.
- When creating a project: on the dashboard, click + in the prompt box, open Databases, and choose Add Supabase organization.
Connect your Lovable project to a Supabase project
When an organization is linked, anyone with edit access to a project can connect it. Start from either place:- When creating a new project: on the dashboard, click + in the prompt box, open Databases, and pick a Supabase project under the Supabase heading (or type “Supabase” in the menu search). The new Lovable project is created with that Supabase project as its backend.
- In an existing project: connect from the Cloud view in the editor:
Open the connect dialog
Choose a Supabase project
Verify the connection
How Lovable works with your Supabase project
With Supabase connected, Lovable manages your backend from chat. You don’t need to write SQL or copy code into the Supabase dashboard.Database
Supabase provides a hosted PostgreSQL database, so your app keeps the full power and scalability of SQL without you managing servers. Whenever a feature needs to store data, describe it in plain language and Lovable designs the tables, columns, and relationships for you:supabase/migrations/), and regenerates the TypeScript types your app uses. Lovable also asks for your approval before inserting or changing data. Reading data for debugging (for example, checking why a page is empty) does not modify anything.
You can always work with your data directly in the Supabase dashboard as well: the Table Editor shows rows in a spreadsheet-like view where you can inspect and edit records, and the SQL Editor lets you run your own queries.
Real-time updates: Supabase can stream database changes to your app, which enables features like live chat, notifications, or dashboards that update for all users without refreshing. Prompt Lovable to make a feature update in real time and it wires up the subscription:
Authentication
Prompt Lovable to add signup and login flows backed by Supabase Auth:Edge functions
Supabase Edge Functions are serverless functions: small pieces of backend code that run on Supabase’s infrastructure, without you provisioning or managing a server. They’re the right tool whenever your app needs logic that can’t or shouldn’t run in the user’s browser. Typical uses:- AI features: calling a model API to summarize, classify, or chat.
- Sending emails or notifications: for example, a welcome email on signup via an email API like Resend.
- Processing payments: creating checkout sessions and handling webhooks with Stripe.
- Scheduled tasks: recurring jobs like a nightly cleanup or a daily summary.
- Calling external APIs with secret keys: anything that uses credentials you can’t expose in frontend code.
Secrets
Many backend features depend on secret API keys, such as a Stripe secret key for payments or a Resend key for email. When a feature needs one, Lovable detects it and prompts you to enter the value through a secure input. Secrets are stored in your Supabase project, where your edge functions can read them; they never appear in your app’s code or repository, and Lovable does not read stored secret values back.Storage
Supabase Storage hosts files (images, videos, PDFs, and other media) alongside your database, organized into buckets with their own access permissions. Ask for a file upload feature and Lovable builds the upload logic and creates the buckets, asking for your approval before creating or changing buckets on your Supabase project:Security checks
Lovable runs automated security checks against your database configuration, including Row Level Security (RLS) coverage, and flags issues it finds after schema changes.Managing the connection
The connection has two levels, managed in different places: the project connection (which Supabase project a Lovable project uses) and the workspace’s linked organizations (which Supabase organizations the whole workspace can use).Manage the project connection
In the editor, open More → Cloud on a connected project. From there you can:- See the connected project’s name and health status.
- Jump to the Supabase dashboard: the project overview, user management, SQL editor, edge functions, and secrets.
- Disconnect the project.
Manage linked organizations (workspace owners and admins)
Open Connectors from the dashboard sidebar, select Supabase, and use Manage Connected Organizations to link additional Supabase organizations or reconnect one whose access has expired. The Manage organizations button in a connected project’s Cloud view opens the same place.Disconnect Supabase
Open the Cloud view
Disconnect
Limitations
- Each Lovable project connects to one Supabase project at a time.
- There is no automatic migration between Lovable Cloud and your own Supabase project, in either direction.
- Supabase usage limits (database size, file upload size, bandwidth) follow your Supabase plan. Check Supabase pricing for current limits.
Lovable features that require Lovable Cloud
Some Lovable features are built for Lovable Cloud backends and don’t apply when you bring your own Supabase project:- In-editor backend views: the Database, Users, Storage, Secrets, Jobs, Usage, and Logs views in the Cloud section. With your own Supabase project, you use the Supabase dashboard instead.
- Managed infrastructure: daily backups with restore, pausing, and instance resizing from inside Lovable. You manage backups, compute, and billing in Supabase.
- Built-in payments: Paddle and Stripe payments through Lovable require Lovable Cloud for webhooks and subscription data.
- Custom emails: sending your app’s emails from your own domain requires Lovable Cloud.
- Configuring auth through Lovable: enabling social login providers and changing auth settings from chat, including managed Google authentication and SAML SSO for your app’s users, works on Lovable Cloud only. On your own Supabase project, configure these in the Supabase dashboard.
- Signed-in browser testing: Lovable can test your app as a logged-in user on Lovable Cloud only; with your own Supabase project it tests pages that don’t require signing in.
- Sensitive data scanning: PII detection covers Lovable Cloud databases and storage.
Troubleshooting
The Cloud view shows 'Supabase connection issue'
The Cloud view shows 'Supabase connection issue'
I can't click Connect next to my Supabase project
I can't click Connect next to my Supabase project
The connect link is disabled with 'Wait for Lovable to finish working'
The connect link is disabled with 'Wait for Lovable to finish working'
FAQ
Do I need to connect Supabase to give my app a backend?
Do I need to connect Supabase to give my app a backend?
Do I need a separate Supabase account, and who bills me?
Do I need a separate Supabase account, and who bills me?
Who in my workspace can connect Supabase?
Who in my workspace can connect Supabase?
Do I still need to paste SQL into the Supabase SQL editor?
Do I still need to paste SQL into the Supabase SQL editor?
Can I switch a project between Lovable Cloud and my own Supabase?
Can I switch a project between Lovable Cloud and my own Supabase?
Can I connect my app to automation tools like Zapier or Make?
Can I connect my app to automation tools like Zapier or Make?
What happens when I disconnect Supabase?
What happens when I disconnect Supabase?