Prisma ORM 8 is here.Read the docs
Postgres

Vercel

Learn how to create Prisma Postgres databases via the Vercel Marketplace and deploy your Next.js, Nuxt, and SvelteKit applications.

The Vercel Marketplace integration for Prisma Postgres connects your Vercel projects with Prisma Postgres instances. Once connected, the integration automatically sets the following environment variable on your deployed Vercel app:

These enable you to connect to the Prisma Postgres instances via any ORM or database library you want to use (Prisma ORM, Drizzle, Kysely, ...).

Why Prisma Postgres works well on Vercel

Vercel scales serverless functions automatically. Each new function instance opens a database connection, and with a traditional Postgres setup, that's how you hit connection limits under load. Prisma Postgres includes connection pooling by default, so you don't need to configure pgBouncer or maintain a separate pooler. The DATABASE_URL the Marketplace sets works in local dev, preview deployments, and production.

Features

  • Create and use Prisma Postgres instances without leaving the Vercel dashboard.
  • Automatic generation of Prisma Postgres URLs for production and preview environments.
  • Simplified environment configuration for your Vercel project.
  • Billing workflows to up-/ and downgrade your Prisma Postgres pricing plan.
  • Ready-to-deploy fullstack templates for Next.js, Nuxt, SvelteKit and with various ORMs and DB libraries.

Templates

The fastest way to start with Prisma Postgres on the Vercel Marketplace is one of the templates:

Usage

Install the extension

To install the extension, click Install at the top of the Prisma Postgres integration page.

The integration will now show up on your list of integrations, e.g. https://vercel.com/<VERCEL-TEAM>/~/integrations.

Create a new database

Once installed, you can navigate to the Storage tab and click Create Database.

Select Prisma Postgres and click Continue. Then select the Region for the database and a Pricing Plan, and click Continue again.

Finally, give the database a Name and click Create.

The database is now ready and can be connected to your Vercel projects.

Connect database to Vercel project

In your Vercel project, you can now click the Storage tab, select the database you just created and then click Connect. This will automatically set the DATABASE_URL environment variable in that project and enable your application to access your newly created Prisma Postgres instance.

Viewing and editing data in Prisma Studio

To view and edit the data in your Prisma Postgres instance, you can use the local version of Prisma Studio.

Studio ships with the Prisma ORM 7 CLI and works with Prisma ORM 7 and Prisma ORM 8 databases alike. Point it at the connection string from the Storage tab:

bunx prisma@7.10.0 studio --url="$DATABASE_URL"

Using with Next.js

If you're building a Next.js app and want a step-by-step walkthrough covering the contract, migrations, querying from Server Components, and deploying, see the Next.js guide.

The key things to set up on the Vercel side:

Ensure your project uses the correct environment variable

The generated src/prisma/db.ts reads process.env.DATABASE_URL, which is the variable the Connect step above sets on your Vercel project. Nothing else needs to be configured for the runtime to find the database.

Commit the emitted contract files

Prisma ORM has no build-time generate step. npx prisma@latest contract emit writes src/prisma/contract.json and src/prisma/contract.d.ts, and those files are committed with your code, so Vercel's next build needs no postinstall hook. Apply schema changes to the database before you deploy, with npx prisma@latest db migrate from your machine or CI. See Applying a migration.

Billing and pricing

Prisma Postgres uses usage-based pricing based on operations and storage. The same plans and rates apply when you create a database via the Vercel Marketplace, and your Prisma Postgres usage is billed through your Vercel account.

To change your plan, see How do I upgrade my plan if I am using Prisma Postgres via Vercel? in the Prisma Postgres FAQ.

Security

Rotating your Prisma integration secrets in Vercel

In security incidents (like this Vercel security bulletin) or as a regular security practice, you may need to rotate your Prisma integration secrets. This process generates new authentication credentials for your database connection while keeping your data intact.

Follow these steps to rotate your Prisma integration secrets in Vercel:

  1. Open your browser and go to your specific project (e.g., https://vercel.com/your-team-name/your-project-name)
  2. Click "Integrations" in the left sidebar menu to see all connected marketplace apps
  3. Click "Prisma" to open the Prisma integration management page
  4. Under "Installed Products", click on the specific database whose secrets you want to rotate
  5. Click the "Settings" tab and scroll down to find the security section
  6. Click the "Rotate Secrets" button to open the rotation dialog
  7. Configure rotation settings:
    • Delay period: Enter 0 for immediate rotation (urgent incidents) or any other number for delayed rotation in hours (planned maintenance)
    • Rotation scope: Select which secrets to rotate (database connection secrets, API tokens, etc.)
  8. Click "Rotate Secrets" to confirm and wait for the success message
  9. Redeploy your applications: This is critical! After rotation completes:
    • Immediately redeploy all applications using this database (Vercel will prompt you)
    • Click "Redeploy" for each affected application
    • Verify connections work after redeployment
    • Monitor application logs for connection errors

Reach out to our Discord community or on X if you need assistance with this process.

On this page