Connect to Supabase
You can connect your Lovable project to your own Supabase project to manage your app's backend directly. This gives you full control over your database, user authentication, file storage, and server-side code.
Anyone who wants direct ownership and management of their app's backend infrastructure, billing, and dashboard access, rather than using Lovable's default built-in backend.
Do this, in order
- 1
Sign up for a Supabase account and create a project, or use an existing one.
You need a Supabase project to connect to Lovable; the free tier is sufficient to start.
- 2
If you are a workspace owner or admin, link your Supabase organization to your Lovable workspace.
This makes your Supabase projects available for connection by anyone in your Lovable workspace.
- 3
In your Lovable project, go to 'More' -> 'Cloud' and click 'Already have a Supabase project? Connect it here'.
This opens the connection dialog to link your Lovable project to a specific Supabase project.
- 4
Choose a Supabase project from your linked organizations and click 'Connect'.
This establishes the connection between your Lovable project and your chosen Supabase backend.
- 5
Verify the connection in the Cloud view, which will show your Supabase project's name and status.
This confirms that Lovable is now using your Supabase project as its backend, allowing you to prompt for backend features.
Paste this into your project
Connect my Lovable project to my Supabase project. I want to use my own Supabase account for backend management, billing, and full access to the Supabase dashboard. Once connected, I will ask you to design my database schema, run migrations, deploy edge functions, and wire my app's UI to my data.
Words decoded
- Backend
- The part of an application that handles data storage, user accounts, and server-side logic, usually hidden from the user.
- Database schema
- The blueprint or structure of your database, defining how data is organized, including tables, columns, and relationships.
- Migrations
- Changes made to the database structure, like adding new tables or columns, which are carefully managed to avoid data loss.
- Edge functions
- Small pieces of code that run on a server close to your users, handling tasks like sending emails, processing payments, or calling other services, without you managing the server.
- UI
- User Interface, which is what you see and interact with on a screen.
- Auth
- Short for authentication, which is the process of verifying a user's identity, like signing in with a username and password.
- Real-time
- When information updates instantly, without you having to refresh the page, like in a live chat or a stock ticker.
- Serverless functions
- Another name for edge functions; code that runs on demand without you managing the underlying server infrastructure.
- Row Level Security (RLS)
- A security feature in databases that controls which rows of data a user can see or modify, based on their identity or role.
Where people get stuck
- Do not expect an automatic switch between Lovable's built-in backend and your own Supabase project; there is no one-click migration.
- Be aware that Lovable projects sharing one Supabase project can overwrite each other's secrets and break integrations if not carefully managed.
- Do not overlook setting up Row Level Security (RLS) policies on your Supabase tables, as missing RLS is a common way app data gets exposed.
- Do not try to link a Supabase organization if you are not a workspace owner or admin in Lovable, as the option will be disabled.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.