Supabase Connection String for IPv6 in Prisma

Connection string migration to support IPv6 in Supabase

  • Alexandro Martínez
    Author
    by Alexandro Martínez
    9 months ago
  • If you're using Supabase with PgBouncer and Prisma, you may need to update your connection string to support IPv6 and use the new connection pooler Supavisor.

    Before: Using PgBouncer

    You're connection string, using the pgbouncer parameter, looks like this:

    postgres://postgres:[PASSWORD]@db.PROJECT.supabase.co:6543/postgres?pgbouncer=true

    Now: Using Supavisor

    To use Supavisor, Supabase now provides the following connection string:

    postgres://postgres.PROJECT:[PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres

    But you can use the same pgbouncer flag at the 6543 port:

    postgres://postgres.PROJECT:[PASSWORD]@aws-0-us-east-1.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1

    But the AWS host region depends on your supabase region, you can see the database connection string details at https://supabase.com/dashboard/project/_/settings/database.


    Read the official Supabase + Prisma guide.

    We respect your privacy.

    TLDR: We use cookies for language selection, theme, and analytics. Learn more.