← All guides

Supabase connection rescue

Cursor app loses Supabase connection after moving to production

CursorSupabaseVPSDomain

Short answer

The Cursor app connecting to Supabase from your production server with correct URLs, keys, and network access.

Why this matters

The app loaded data in Cursor dev mode. After deploy, every database call fails with connection refused or authentication errors.

Walkthrough

  1. 01

    Find the Supabase credentials

    Locate the project URL, anon key, and any service role key the app uses.

    • Check the Supabase dashboard for project URL and keys.
    • Search the Cursor workspace for Supabase initialization calls.
    • Identify whether the app uses a direct connection or a pooled connection string.
  2. 02

    Configure server network access

    The server must be able to reach Supabase endpoints without firewall blocks.

    • Confirm the VPS can reach the Supabase host on the required ports.
    • Check Supabase IP allow lists if you have network restrictions enabled.
    • Verify DNS resolution from the server resolves Supabase hosts correctly.
  3. 03

    Wire the app and test

    Set the credentials on the server, rebuild, and test every data flow.

    • Add Supabase URL and key as server environment variables.
    • Rebuild the app and confirm it connects to the database.
    • Test reads, writes, auth, and any storage or realtime features.

Where RepoAssistant fits

RepoAssistant wires Cursor apps to Supabase in production with correct credentials, network config, and smoke tests.