# Vercel (/docs/guides/postgres/vercel)

Location: Guides > Postgres > Vercel

The [Vercel Marketplace integration for Prisma Postgres](https://www.vercel.com/marketplace/prisma) connects your Vercel projects with Prisma Postgres instances. Once connected, the integration automatically sets the following environment variable on your deployed Vercel app:

* `DATABASE_URL`: A Prisma Postgres [connection string](/postgres/database/connecting-to-your-database) starting with `postgres://...`

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 [#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 [#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 [#templates]

The easiest way to use Prisma Postgres on the Vercel Marketplace is via one of the templates:

* [Prisma ORM + NextAuth Starter](https://vercel.com/templates/next.js/prisma-postgres)
* [Postgres + Kysely Next.js Starter](https://vercel.com/templates/next.js/postgres-kysely)
* [Postgres + Drizzle Next.js Starter](https://vercel.com/templates/next.js/postgres-drizzle)
* [Postgres + SvelteKit Starter](https://vercel.com/templates/svelte/postgres-sveltekit)

Usage [#usage]

Install the extension [#install-the-extension]

To install the extension, click **Install** at the top of the [Prisma Postgres integration page](https://www.vercel.com/marketplace/prisma).

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

Create a new database [#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 [#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 [#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).

In the local version of your project where you have your `DATABASE_URL` set, run the following command to open Prisma Studio:

  

#### npm

```bash
npx prisma studio
```

#### pnpm

```bash
pnpm dlx prisma studio
```

#### yarn

```bash
yarn dlx prisma studio
```

#### bun

```bash
bunx --bun prisma studio
```

Using with Next.js [#using-with-nextjs]

If you're building a Next.js app and want a step-by-step walkthrough — schema, migrations, querying from Server Components, and deploying — see the [Next.js guide](/guides/frameworks/nextjs).

The key things to set up on the Vercel side:

Ensure your project uses the correct environment variable [#ensure-your-project-uses-the-correct-environment-variable]

Make sure your `prisma.config.ts` reads from `DATABASE_URL`:

```ts
import "dotenv/config";
import { defineConfig, env } from "@prisma/config";
export default defineConfig({
  datasource: {
    url: env("DATABASE_URL"),
  },
  schema: "./prisma/schema.prisma",
});
```

Generate Prisma Client on every deploy [#generate-prisma-client-on-every-deploy]

Add a `postinstall` script so Prisma Client is generated after Vercel installs dependencies:

```json title="package.json"
{
  "scripts": {
    "postinstall": "prisma generate" // [!code ++]
  }
}
```

Billing and pricing [#billing-and-pricing]

Prisma Postgres uses [usage-based pricing](https://www.prisma.io/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?](/postgres/faq#how-do-i-upgrade-my-plan-if-i-am-using-prisma-postgres-via-vercel) in the Prisma Postgres FAQ.

Security [#security]

Rotating your Prisma integration secrets in Vercel [#rotating-your-prisma-integration-secrets-in-vercel]

In security incidents (like [this Vercel security bulletin](https://vercel.com/kb/bulletin/vercel-april-2026-security-incident)) 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](https://pris.ly/discord) or on [X](https://pris.ly/x) if you need assistance with this process.

## Related pages

- [`Firebase Studio`](https://www.prisma.io/docs/guides/postgres/idx): Learn how to use Prisma Postgres in the online Firebase Studio
- [`Fly.io`](https://www.prisma.io/docs/guides/postgres/flyio): Learn how to deploy applications using Prisma Postgres to Fly.io
- [`Netlify`](https://www.prisma.io/docs/guides/postgres/netlify): Learn how to create Prisma Postgres databases via the official Netlify extension and deploy your applications with it
- [`Viewing data`](https://www.prisma.io/docs/guides/postgres/viewing-data): Viewing and editing data in Prisma Postgres via Prisma Studio or other database GUIs
- [`VS Code`](https://www.prisma.io/docs/guides/postgres/vscode): The Prisma VS Code extension provides a management UI for Prisma Postgres and superpowers for Copilot agent mode