> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nextlovable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud Migration Overview

> Infrastructure independence from Lovable's managed backend. Migrate to your own Supabase project using our Chrome Extension.

# The Escape Hatch

<Card title="Infrastructure Independence" icon="unlock">
  Use our Chrome Extension to migrate from Lovable's proprietary Supabase instance to your own Supabase project. Full data ownership, custom RLS policies, and production-ready infrastructure. Self-service migration completes in under 5 minutes.
</Card>

## Two Tiers: Choose Your Complexity

<CardGroup cols={2}>
  <Card title="Self-Service: $99" icon="user">
    **Best for: MVPs, side projects**

    * Up to 50 tables
    * Standard auth only
    * Automatic migration via Chrome Extension
    * DIY troubleshooting
    * Completes in under 5 minutes

    <Button href="https://chromewebstore.google.com/detail/lovable-cloud-to-supabase/ekleklhofagefcgokjlgcjkkmlkbdlnp">Get the Extension</Button>
  </Card>

  <Card title="White-Glove: €850+" icon="hand-holding-hand">
    **Best for: Production apps**

    * Unlimited complexity
    * External APIs & webhooks (Stripe, OpenAI, etc.)
    * Complex RLS policies
    * We handle edge cases
    * Custom SQL triggers
    * Priority support

    <Button href="https://cal.com/chiheb-nabil/next.js-migration-help-done-for-you-service">Book Consultation</Button>
  </Card>
</CardGroup>

## Quick Check: Which Tier Fits You?

<Check>
  * [ ] I have fewer than 50 tables
  * [ ] No complex external integrations (Stripe, OpenAI, etc.)
  * [ ] I can handle manual fixes if needed
</Check>

**All checked?** → **Self-Service (\$99)**

**Any unchecked?** → **White-Glove (€850+)**

## Prerequisites

<Steps>
  <Step title="Check Your Project Size">
    Not sure if your project is "simple" or "complex"?

    **If you have 100+ tables** or integrations with Stripe, OpenAI, or other external APIs, **skip to the White-Glove option**.
  </Step>

  <Step title="Prepare Your Supabase Project">
    Create a new Supabase project at [supabase.com](https://supabase.com) if you haven't already.

    You'll need these credentials (used locally only):

    <AccordionGroup>
      <Accordion title="Project Reference ID">
        **Location**: Supabase Dashboard → Settings → General

        Looks like: `abc123def456`
      </Accordion>

      <Accordion title="Personal Access Token (PAT)">
        **Location**: Supabase Dashboard → Account → Access Tokens

        Used for authentication with the Extension
      </Accordion>

      <Accordion title="Anon Key (Public)">
        **Location**: Supabase Dashboard → Settings → API → Project API Keys

        The `anon` public key
      </Accordion>

      <Accordion title="Service Role Key (Secret)">
        **Location**: Supabase Dashboard → Settings → API → Project API Keys

        The `service_role` key. **Keep this secret!**
      </Accordion>
    </AccordionGroup>

    <Info>
      **Your credentials are used locally only** — they're never sent or stored anywhere. Complete privacy guaranteed.
    </Info>
  </Step>
</Steps>

## The Migration Process

<Steps>
  <Step title="1. Install Extension & Connect">
    Install the **Lovable Cloud to Supabase** Chrome Extension and connect your credentials.

    [Install Extension →](https://chromewebstore.google.com/detail/lovable-cloud-to-supabase/ekleklhofagefcgokjlgcjkkmlkbdlnp)
  </Step>

  <Step title="2. Automatic Migration">
    Once connected, the extension clones your Lovable Cloud setup and deploys it to Supabase automatically.

    **What's migrated:**

    * **Database Schema** — Tables & rows
    * **Edge Functions** — Serverless logic
    * **Authentication** — Users & permissions

    **Complexity Check:**
    Standard schemas migrate automatically. Custom SQL triggers or complex RLS policies may need manual review.

    <Info>
      **Migration typically completes in under 5 minutes.** You'll receive a notification when it's ready.
    </Info>
  </Step>

  <Step title="3. You're Done! 🎉">
    Your project is now running on Supabase with all your data, functions, and users migrated successfully.
  </Step>
</Steps>

## What's Included

<AccordionGroup>
  <Accordion title="Complete Database Migration">
    Every table, every row, every relationship:

    * PostgreSQL schema recreation
    * Data integrity validation
    * Index and constraint preservation
    * Enum and custom type migration
  </Accordion>

  <Accordion title="Edge Functions">
    Serverless logic preserved:

    * Function code migration
    * Environment variables
    * Secrets management
    * Trigger reconfiguration
  </Accordion>

  <Accordion title="Authentication System">
    User accounts transferred:

    * Email/password accounts
    * User metadata preservation
    * OAuth provider identities (reconfiguration required)
    * Password reset flow guidance
  </Accordion>
</AccordionGroup>

## What's NOT Included (Manual Steps)

<Warning>
  These require manual action after migration:
</Warning>

<AccordionGroup>
  <Accordion title="Storage Buckets & Files">
    **Storage is NOT automatically migrated.**

    After migration, you'll need to:

    * Create new storage buckets in your Supabase
    * Upload files manually or via script
    * Update file references in your database

    [Learn more about Storage Migration](/cloud-migration/post-migration#storage)
  </Accordion>

  <Accordion title="Complex RLS Policies">
    Standard RLS policies migrate automatically.

    **Complex policies may need manual review:**

    * Policies with custom SQL functions
    * Multi-table policy dependencies
    * Complex permission logic
  </Accordion>

  <Accordion title="External API Integrations">
    Third-party services require manual reconfiguration:

    * Stripe webhooks
    * OpenAI API keys
    * Custom payment processors
    * External auth providers
  </Accordion>
</AccordionGroup>

## Post-Migration Checklist

After migration completes, complete these steps to go live:

<Steps>
  <Step title="1. Update AI/API Keys">
    If your project uses AI features:

    * Move to OpenRouter (recommended) or your preferred provider
    * Update your API key in Supabase environment variables
  </Step>

  <Step title="2. Recreate Environment Variables">
    Copy your environment variables from Lovable to Supabase:

    * Go to Supabase Dashboard → Settings → API
    * Add all required env vars
  </Step>

  <Step title="3. Re-enable Social Auth">
    OAuth providers need reconfiguration:

    * Google, GitHub, Apple, etc.
    * Update callback URLs to your Supabase project
    * Test login flow
  </Step>

  <Step title="4. Migrate Storage (Manual)">
    Move files to Supabase Storage:

    * Create buckets matching your old structure
    * Upload files
    * Update database references

    [Storage Migration Guide →](/cloud-migration/post-migration#storage)
  </Step>
</Steps>

## Need Help with Complex Logic?

<Card title="White-Glove Migration: €850+" icon="hand-holding-hand">
  If your project has:

  * 100+ tables
  * Stripe, OpenAI, or other external integrations
  * Complex custom SQL
  * Custom RLS policies

  We handle it all for you.

  [Book a Consultation →](https://cal.com/chiheb-nabil/next.js-migration-help-done-for-you-service)
</Card>

## Next Steps

<CardGroup cols={3}>
  <Card title="Get the Extension" href="https://chromewebstore.google.com/detail/lovable-cloud-to-supabase/ekleklhofagefcgokjlgcjkkmlkbdlnp" icon="puzzle">
    Start your \$99 Self-Service migration
  </Card>

  <Card title="White-Glove Service" href="https://cal.com/chiheb-nabil/next.js-migration-help-done-for-you-service" icon="hand-holding-hand">
    Book consultation for complex migrations
  </Card>

  <Card title="Post-Migration Guide" href="/cloud-migration/post-migration" icon="list-check">
    Complete your migration setup
  </Card>
</CardGroup>

<Info>
  **Just need the frontend code?** Start with the [CLI](/cli) to convert your React app to Next.js first.
</Info>
