- Home
- FAQ
- Integrations & Backend
- Database & Supabase
Database & Supabase
Integrations & Backend · 25 articles
[Database] Can I connect multiple Supabase databases to one Lovable project?
Lovable supports connecting one Supabase project via the native integration. For multiple databases, you can manually add additional Supabase connections via Edge Functions and API calls in your code. This requires some manual setup beyond the one-click integration.
[Database] Help! I'm stuck in the Lovable ecosystem and can't migrate my database
Your data is stored in Supabase (PostgreSQL), which is fully portable. Export via Supabase's native tools or pg_dump, then migrate to any PostgreSQL host. Lovable generates code synced to GitHub—export and redeploy to another platform (Vercel, Netlify, custom servers). You're never truly locked in.
Advanced migration using the Supabase CLI
Use the Supabase CLI (`npm install -g supabase`) to pull schema and data from your source project (`supabase db pull`, `supabase db dump`), then push to the target project (`supabase link`, `supabase db push`). This command-line approach is faster and more reliable than manual dashboard migrations, especially for large databases. Full instructions are in Supabase CLI documentation.
Can I change my mind after adding Cloud to my project?
The reference material does not specify whether you can remove Cloud from a project or revert to Supabase. For details on switching between Cloud and Supabase after setup, contact [email protected].
Can I change the region after enabling Cloud for a project?
The reference material does not specify whether Cloud region can be changed after setup. For details on region flexibility and migration, contact [email protected].
Can I connect my project to a backend to store data?
Yes, Lovable has native Supabase integration. Click 'Connect' from Cloud → Supabase, select your project, and confirm. Lovable can then generate database tables, authentication, and Edge Functions. For other backends (Firebase, AWS, custom APIs), use Edge Functions and manual API calls.
Can I export my Cloud project to Supabase?
The reference material does not describe exporting a Cloud project to Supabase. Both use PostgreSQL databases under the hood, but migration would be complex. Contact [email protected] about data migration options if you need to switch platforms.
Can I integrate my Supabase-connected Lovable app with external automation tools?
Yes, Supabase Edge Functions and webhooks support integrations with external tools. Use n8n MCP to connect 400+ tools and automation workflows. Store API keys in Cloud → Secrets, then use them in Edge Functions to call external APIs (email, payments, CRM, etc.). Lovable can auto-scaffold the necessary functions when you describe what you need.
Can I migrate my project from Supabase to Cloud?
The reference material does not describe a migration path from Supabase to Cloud. Since both use PostgreSQL, manual export/import of data might be possible, but Lovable doesn't provide an automated migration tool. Contact [email protected] to discuss options for migrating projects, databases, and authentication.
Can I use Google authentication in apps not using Lovable Cloud?
Yes, Google authentication works with Supabase integration (which isn't the same as Lovable Cloud). Both use Supabase's authentication system. Enable the Google provider in your Supabase project's Authentication → Providers, add your OAuth credentials, and configure redirect URIs. Lovable can then auto-scaffold the 'Sign in with Google' button when you ask in chat.
Can I use one Supabase database for multiple Lovable projects?
Yes, you can connect multiple Lovable projects to the same Supabase instance. This is useful for monoliths or related microservices. However, each project shares the same database and authentication context. Be careful with RLS policies and data isolation—set up row-level security properly to prevent unintended data leakage between projects. Contact [email protected] for architectural guidance.
Connect a backend
Go to Project Settings, select Supabase project, and confirm the connection. You'll see a ✅ Supabase connected confirmation. From there, Lovable can auto-generate tables, auth flows, Edge Functions, and real-time subscriptions.
Database Integration
Lovable has native one-click Supabase integration accessible from Project Settings. Select your Supabase project and confirm the connection. You get instant access to PostgreSQL databases, authentication flows, Edge Functions, file storage, real-time subscriptions, and Row Level Security—all auto-scaffolded with components and functions.
Do I need separate accounts for Lovable and Supabase?
Yes, you need both a Lovable account and a Supabase account. However, the integration is seamless—after connecting, Lovable can create Supabase projects or connect to existing ones. You don't need to manage Supabase separately for basic use cases. For advanced settings (RLS policies, Edge Functions, secrets), you can dive into Supabase's dashboard, but Lovable scaffolds most things automatically.
Do emails require Lovable Cloud?
Yes, email sending requires Lovable Cloud to be enabled and Edge Functions to be deployed. Emails are sent via Supabase Edge Functions or Resend API, which must be accessible in production. Your Lovable project publishes to Cloud by default when you set up email; this is automatic for most users.
Does Supabase or Lovable help me write custom SQL or database logic?
Lovable auto-generates SQL and database logic from your prompts. You can create PostgreSQL tables, set up row-level security (RLS) policies, and define schemas directly through natural language requests. For advanced custom SQL beyond the auto-generated code, you can edit the generated Supabase functions and queries in the code, or use Supabase Edge Functions for serverless business logic that Lovable scaffolds for you.
How can I add real-time features like a chat or live feed to my app?
Use Supabase real-time subscriptions. Prompt Lovable: 'Add a real-time chat feature' or 'Create a live feed with real-time updates.' Lovable scaffolds Supabase Realtime subscriptions that push updates to all connected clients instantly. You'll need to set up a messages table in the database, and Lovable generates the subscription logic and UI components.
How do I connect Resend to Supabase Auth?
In your Supabase Edge Function, listen to auth events (signup, password reset). When triggered, call the Resend API using a stored secret key to send emails (confirmation, reset link, etc.). Store the Resend API key in Supabase Cloud → Secrets, never in code. Lovable auto-scaffolds this when you prompt for email auth workflows.
How is the region selected when I enable Cloud?
When you enable Cloud for a project, Lovable likely selects a region based on your location or account settings. The reference material doesn't detail the exact selection logic. Check your Cloud settings or Project Settings to see which region was assigned. Contact [email protected] if you need a different region.
I'm currently using the Supabase integration. What does this change mean for me?
Lovable Cloud is an alternative to the traditional Supabase integration, offering tighter integration and simplified setup. If you're using Supabase, you can continue using it—no changes required. Cloud is a newer option for new projects or migrations. Both support databases, authentication, file storage, and real-time features. You don't have to migrate unless you choose to.
Is there a limit to file uploads with Supabase storage?
Supabase Storage on the free tier allows up to 50MB per file. Paid tiers increase this limit. File storage is generous overall, but very large files (>50MB) may need custom handling. For apps needing massive file uploads, consider chunked uploads or alternative storage. Prompt Lovable to implement large file handling if needed.
My Cloud data isn't loading. What should I do?
First, check the Cloud tab → Logs for error messages. Verify your Cloud region is correct and your database connection is active. Check that tables and RLS (Row Level Security) policies are properly configured for your authentication method. Use Plan mode to investigate before retrying. If logs show timeout or permission errors, check Supabase Logs for the underlying issue. Contact [email protected] if problems persist.
Review Supabase Logs
If you're using Supabase integration, check Supabase Logs to diagnose database, authentication, and Edge Function errors. Open your Supabase project dashboard → Logs and filter by function, auth, or database queries. Compare these with errors in Lovable's Cloud tab to trace issues end-to-end. Supabase logs show exact SQL errors and authentication failures.
What does the Supabase integration actually do for me?
Supabase integration provides a one-click connection to a PostgreSQL database, authentication, file storage, serverless Edge Functions, and real-time subscriptions. From the Lovable editor, you can auto-scaffold database tables with RLS policies, authentication flows (email/password, Google OAuth), file uploads, and backend logic via Edge Functions. Secrets are stored securely in Supabase. It's a complete backend-as-a-service.
What if I want to test changes to my database without affecting the live app?
Create a second Supabase project for staging/testing, then connect a separate Lovable project to it. Test changes there before applying to production. Alternatively, use database branches or snapshots in Supabase (if available on your plan). Once tested, apply the same changes to your production database and Lovable project. This prevents breaking live data.
