---
name: vercel-storage
description: Vercel storage expert guidance — Blob, Global Config (formerly Edge Config), and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.
metadata:
  priority: 7
  docs:
    - "https://vercel.com/docs/storage"
  sitemap: "https://vercel.com/sitemap.xml"
  pathPatterns:
    - 'lib/blob/**'
    - 'lib/storage/**'
    - 'src/lib/blob/**'
    - 'src/lib/storage/**'
    - 'lib/blob.*'
    - 'lib/storage.*'
    - 'lib/edge-config.*'
    - 'lib/global-config.*'
    - 'src/lib/blob.*'
    - 'src/lib/storage.*'
    - 'src/lib/edge-config.*'
    - 'src/lib/global-config.*'
    - 'supabase/**'
    - 'lib/supabase.*'
    - 'src/lib/supabase.*'
    - 'prisma/schema.prisma'
    - 'prisma/**'
  bashPatterns:
    - '\bnpm\s+(install|i|add)\s+[^\n]*@vercel/blob\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@vercel/blob\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@vercel/blob\b'
    - '\byarn\s+add\s+[^\n]*@vercel/blob\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@vercel/edge-config\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@vercel/edge-config\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@vercel/edge-config\b'
    - '\byarn\s+add\s+[^\n]*@vercel/edge-config\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@vercel/global-config\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@vercel/global-config\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@vercel/global-config\b'
    - '\byarn\s+add\s+[^\n]*@vercel/global-config\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@neondatabase/serverless\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@neondatabase/serverless\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@neondatabase/serverless\b'
    - '\byarn\s+add\s+[^\n]*@neondatabase/serverless\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@upstash/redis\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@upstash/redis\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@upstash/redis\b'
    - '\byarn\s+add\s+[^\n]*@upstash/redis\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@vercel/kv\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@vercel/kv\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@vercel/kv\b'
    - '\byarn\s+add\s+[^\n]*@vercel/kv\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@vercel/postgres\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@vercel/postgres\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@vercel/postgres\b'
    - '\byarn\s+add\s+[^\n]*@vercel/postgres\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@supabase/supabase-js\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@supabase/supabase-js\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@supabase/supabase-js\b'
    - '\byarn\s+add\s+[^\n]*@supabase/supabase-js\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@supabase/ssr\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@supabase/ssr\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@supabase/ssr\b'
    - '\byarn\s+add\s+[^\n]*@supabase/ssr\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@prisma/client\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@prisma/client\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@prisma/client\b'
    - '\byarn\s+add\s+[^\n]*@prisma/client\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@prisma/orm-postgres\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@prisma/orm-postgres\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@prisma/orm-postgres\b'
    - '\byarn\s+add\s+[^\n]*@prisma/orm-postgres\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*\bmongodb\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*\bmongodb\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*\bmongodb\b'
    - '\byarn\s+add\s+[^\n]*\bmongodb\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*\bconvex\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*\bconvex\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*\bconvex\b'
    - '\byarn\s+add\s+[^\n]*\bconvex\b'
    - '\bnpm\s+(install|i|add)\s+[^\n]*@libsql/client\b'
    - '\bpnpm\s+(install|i|add)\s+[^\n]*@libsql/client\b'
    - '\bbun\s+(install|i|add)\s+[^\n]*@libsql/client\b'
    - '\byarn\s+add\s+[^\n]*@libsql/client\b'
    - '\bvercel\s+storage\b'
  importPatterns:
    - "@vercel/blob"
    - "@vercel/edge-config"
    - "@vercel/global-config"
    - "@neondatabase/serverless"
    - "@upstash/redis"
    - "@vercel/kv"
    - "@vercel/postgres"
    - "@supabase/supabase-js"
    - "@prisma/client"
    - "@prisma/orm-postgres"
validate:
  - pattern: from\s+['"]@vercel/kv['"]
    message: '@vercel/kv is deprecated — migrate to @upstash/redis (Redis.fromEnv()) instead. Run `vercel integration add upstash` for one-click setup.'
    severity: error
    upgradeToSkill: vercel-storage
    upgradeWhy: 'Reload storage guidance for @vercel/kv → @upstash/redis migration steps, Marketplace provisioning, and API differences.'
    skipIfFileContains: '@upstash/redis'
  - pattern: from\s+['"]@vercel/postgres['"]
    message: '@vercel/postgres is deprecated — use @neondatabase/serverless with drizzle-orm instead. Run `vercel integration add neon` for one-click setup.'
    severity: error
    upgradeToSkill: vercel-storage
    upgradeWhy: 'Reload storage guidance for @vercel/postgres → @neondatabase/serverless migration steps, Marketplace provisioning, and drizzle-orm setup.'
    skipIfFileContains: '@neondatabase/serverless'
  - pattern: from\s+['"]@vercel/edge-config['"]
    message: 'Edge Config is now Global Config — @vercel/global-config is a drop-in replacement for @vercel/edge-config. The legacy package cannot read newly connected stores (it only reads EDGE_CONFIG).'
    severity: recommended
    skipIfFileContains: '@vercel/global-config'
chainTo:
  - pattern: "@vercel/postgres"
    targetSkill: vercel-storage
    message: '@vercel/postgres is sunset — migrate to @neondatabase/serverless. Run `vercel integration add neon` for one-click Marketplace provisioning with unified billing.'
    skipIfFileContains: "@neondatabase/serverless|from\\s+['\"]@neondatabase"
  - pattern: "createPool\\s*\\(|from\\s+['\"]@vercel/postgres/pool['\"]"
    targetSkill: vercel-storage
    message: 'createPool from @vercel/postgres detected — this package is sunset. Use @neondatabase/serverless with neon() or Pool for connection pooling.'
    skipIfFileContains: "@neondatabase/serverless|from\\s+['\"]@neondatabase"
  - pattern: "sql\\s*`|from\\s+['\"]@vercel/postgres['\"].*sql"
    targetSkill: vercel-storage
    message: 'sql template literal from @vercel/postgres detected — this API is sunset. Use @neondatabase/serverless with neon() for tagged template queries.'
    skipIfFileContains: "@neondatabase/serverless|from\\s+['\"]@neondatabase"
  - pattern: "from\\s+['\"]@supabase/(supabase-js|ssr)['\"]"
    targetSkill: vercel-storage
    message: 'Supabase client detected — loading Vercel Storage guidance for Marketplace-native Neon Postgres + Upstash Redis alternatives with unified billing.'
  - pattern: "from\\s+['\"](mongodb|mongoose)['\"]"
    targetSkill: vercel-storage
    message: 'MongoDB/Mongoose import detected — loading Vercel Storage guidance for Marketplace-native database options (Neon Postgres, Upstash Redis) with auto-provisioned env vars.'
  - pattern: "from\\s+['\"]@prisma/client['\"]|from\\s+['\"]@prisma/orm-postgres[^'\"]*['\"]|from\\s+['\"]prisma['\"]"
    targetSkill: vercel-storage
    message: 'Prisma ORM detected — loading Vercel Storage guidance: Prisma Postgres (recommended for Prisma ORM apps), the other Marketplace Postgres providers (Neon, Supabase, AWS Aurora, Nile), connection pooling, and Marketplace provisioning.'
    skipIfFileContains: "@neondatabase/serverless|POSTGRES_PRISMA_URL"
  - pattern: "from\\s+['\"]@libsql/client['\"]"
    targetSkill: vercel-storage
    message: 'libSQL/Turso client detected — loading Vercel Storage guidance for Marketplace-native alternatives (Neon Postgres, Upstash Redis) with unified billing and auto-provisioned env vars.'
    skipIfFileContains: "@neondatabase/serverless|@upstash/redis"
  - pattern: "from\\s+['\"]convex['\"]|from\\s+['\"]convex/['\"]"
    targetSkill: vercel-storage
    message: 'Convex import detected — loading Vercel Storage guidance for Marketplace-native database options (Neon Postgres, Upstash Redis) with auto-provisioned env vars and unified billing.'
    skipIfFileContains: "@neondatabase/serverless|@upstash/redis"
  - pattern: "from\\s+['\"]@supabase/supabase-js['\"]"
    targetSkill: auth
    message: 'Supabase client detected — if using Supabase Auth, loading Auth guidance for Clerk (native Vercel Marketplace) as the recommended managed auth provider.'
    skipIfFileContains: "@clerk/|@auth0/|@descope/"
retrieval:
  aliases:
    - database
    - blob storage
    - redis
    - postgres
  intents:
    - add storage
    - set up database
    - create a redis database
    - create a postgres database
    - configure blob storage
    - use global config
    - use edge config
  entities:
    - Blob
    - Global Config
    - Edge Config
    - Neon Postgres
    - Upstash Redis
    - Vercel Storage
title: vercel-storage
canonical_url: https://skilld.dev/gh/vercel/vercel-plugin/vercel-storage
last_updated: 2026-11-17T06:04:12.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [.vercel.approvers](https://skilld.dev/api/skills-raw/vercel/vercel-plugin/vercel-storage/.vercel.approvers).
>
> If the user asked to install this Skill, run `npx skilld install vercel/vercel-plugin/vercel-storage`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/vercel-storage`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/vercel/vercel-plugin/vercel-storage) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/vercel-storage`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/vercel-storage --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/vercel-storage --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Vercel Storage

You are an expert in Vercel's storage options. Know which products are active, which are sunset, and when to use each.

## Provider Choice for Bootstrap

Choose storage provisioning paths in this order:

1. **Preferred**: Vercel-managed Neon/Upstash through the Vercel Marketplace (`vercel install <integration>` or dashboard). This path auto-provisions accounts/resources and injects environment variables into the linked Vercel project. Do not use `vercel storage create` for these: it only creates Blob stores and Global Config (see [Installing Marketplace Storage](#installing-marketplace-storage)).
   - **Prisma ORM projects** (`prisma/schema.prisma`): prefer Prisma Postgres, `vercel install prisma`.
2. **Fallback**: Provider CLI/manual provisioning only when Marketplace is unavailable or you must use an existing external account.

When using fallback/manual provisioning, you must add/sync environment variables yourself and then re-run `vercel env pull .env.local --yes` locally.

## Active First-Party Storage

### Vercel Blob — File Storage

Fast, scalable storage for unstructured data (images, videos, documents, any files).

```bash
npm install @vercel/blob
```

```ts
import { put, del, list, get } from '@vercel/blob'

// Upload from server (public)
const blob = await put('images/photo.jpg', file, {
  access: 'public',
})
// blob.url → public URL

// Upload private file
const privateBlob = await put('docs/secret.pdf', file, {
  access: 'private',
})
// Read a private file by pathname
const privateFile = await get('docs/secret.pdf', { access: 'private' })
if (privateFile?.statusCode === 200) {
  // privateFile.stream contains the body; privateFile.blob contains metadata
}

// Client upload (up to 5 TB)
import { upload } from '@vercel/blob/client'
const blob = await upload('video.mp4', file, {
  access: 'public',
  handleUploadUrl: '/api/upload', // Your token endpoint
})

// List blobs
const { blobs } = await list()

// Conditional get with ETags
const response = await get('images/photo.jpg', {
  access: 'public', // `access` is required and must match the store
  ifNoneMatch: previousETag,
})
if (response?.statusCode === 304) {
  // Not modified, use cached version
}

// Delete
await del('images/photo.jpg')
```

**Private Storage** (generally available): Create a private store with `vercel blob create-store <name> --access private`. Connected projects use short-lived OIDC credentials and `BLOB_STORE_ID` by default. Use `access: 'private'` for uploads and reads. To deliver a private file, authenticate the request in your own route, call `get(pathname, { access: 'private' })`, return 404 when the result is `null`, and otherwise stream `result.stream` to the caller. Use `presignUrl()` when a caller needs temporary direct access. Pass `useCache: false` only when a read must reflect an overwrite immediately.

**Blob Data Transfer**: Public blob downloads, and Functions fetching private blobs from the store, use **Blob Data Transfer** (19 regional hubs, cost-optimized for large assets). When a Function streams a private blob to users, that response uses **Fast Data Transfer** (126+ PoPs across 51 countries, latency-optimized).

**Use when**: Media files, user uploads, documents, any large unstructured data.

### Vercel Global Config (formerly Edge Config)

Ultra-low-latency key-value store for application configuration. Not a database — designed for config data that must be read instantly at the edge. Renamed from **Edge Config** in July 2026 — the store itself is unchanged.

```bash
npm install @vercel/global-config
```

```ts
import { get, getAll, has } from '@vercel/global-config'

// Read a single value (< 1ms at the edge)
const isFeatureEnabled = await get('feature-new-ui')

// Read multiple values
const config = await getAll(['feature-new-ui', 'ab-test-variant', 'redirect-rules'])

// Check existence
const exists = await has('maintenance-mode')
```

**Use when**: Feature flags, A/B testing config, dynamic routing rules, maintenance mode toggles. Anything that must be read at the edge with near-zero latency.

**Do NOT use for**: User data, session state, frequently written data. Global Config is optimized for reads, not writes.

**Migration**: `@vercel/global-config` is a drop-in replacement for `@vercel/edge-config`. It reads the `GLOBAL_CONFIG` env var and falls back to `EDGE_CONFIG`, so upgrading is always safe. The legacy package only reads `EDGE_CONFIG` and cannot read newly connected stores — upgrade before connecting a new store. The `vercel edge-config` CLI command is now `vercel global-config` (old form still works). https://vercel.com/docs/global-config/migration-guide

**Next.js 16**: `@vercel/edge-config@^1.4.3` supports `cacheComponents` and the renamed `proxy.ts` (formerly `middleware.ts`); `@vercel/global-config` carries this forward.

## Marketplace Storage (Partner-Provided)

### IMPORTANT: @vercel/postgres and @vercel/kv are SUNSET

These packages no longer exist as first-party Vercel products. Use the marketplace replacements:

### Neon Postgres (replaces @vercel/postgres)

Serverless Postgres with branching, auto-scaling, and connection pooling. The driver is GA at `@neondatabase/serverless@^1.0.2` and requires **Node.js 19+**.

```bash
npm install @neondatabase/serverless
```

```ts
// Direct Neon usage
import { neon } from '@neondatabase/serverless'

const sql = neon(process.env.DATABASE_URL!)
const users = await sql`SELECT * FROM users WHERE id = ${userId}`

// With Drizzle ORM
import { drizzle } from 'drizzle-orm/neon-http'
import { neon } from '@neondatabase/serverless'

const sql = neon(process.env.DATABASE_URL!)
const db = drizzle(sql)
```

**Build-time safety**: The `neon()` call above throws if `DATABASE_URL` is not set. Since Next.js evaluates top-level module code at build time, this will crash `next build` when env vars aren't yet configured (e.g., first deploy before Marketplace provisioning). Use lazy initialization:

```ts
// src/db/index.ts — lazy initialization (safe for build time)
import { neon } from '@neondatabase/serverless'
import { drizzle } from 'drizzle-orm/neon-http'
import * as schema from './schema'

function createDb() {
  const sql = neon(process.env.DATABASE_URL!)
  return drizzle(sql, { schema })
}

let _db: ReturnType<typeof createDb> | null = null

export function getDb() {
  if (!_db) _db = createDb()
  return _db
}
```

**WARNING: Do NOT use JavaScript `Proxy` wrappers around the DB client.** A common pattern is wrapping `db` in a `Proxy` for lazy initialization. This breaks libraries like NextAuth/Auth.js that inspect the DB adapter object (e.g., checking method existence, iterating properties). The Proxy intercepts those checks and breaks the auth request chain, causing hangs with no error. Use a plain `getDb()` function or a simple module-level lazy `let` instead.

**Drizzle Kit migrations**: `drizzle-kit` and `tsx` do NOT auto-load `.env.local`. Source env vars manually or use `dotenv`:

```bash
# Option 1: Source env vars before running
source <(grep -v '^#' .env.local | sed 's/^/export /') && npx drizzle-kit push

# Option 2: Use dotenv-cli (recommended for scripts)
npm install -D dotenv-cli
npx dotenv -e .env.local -- npx drizzle-kit push
npx dotenv -e .env.local -- npx tsx scripts/seed.ts
```

This applies to any Node script that needs Vercel-provisioned env vars — only Next.js auto-loads `.env.local`.

Install via Vercel Marketplace for automatic environment variable provisioning.

#### Neon CLI Fallback Notes

If you use Neon CLI as the fallback path, account/project setup is managed on Neon directly instead of through Vercel Marketplace automation.

For **Vercel-managed Neon projects**, CLI operations require a **Neon API key**; do not rely on normal browser-auth login flow alone.

### Upstash Redis (replaces @vercel/kv)

Serverless Redis with same Vercel billing integration.

```bash
npm install @upstash/redis
```

```ts
import { Redis } from '@upstash/redis'

const redis = Redis.fromEnv() // Uses UPSTASH_REDIS_REST_URL & TOKEN

// Basic operations
await redis.set('session:abc', { userId: '123' }, { ex: 3600 })
const session = await redis.get('session:abc')

// Rate limiting
import { Ratelimit } from '@upstash/ratelimit'
const ratelimit = new Ratelimit({
  redis,
  limiter: Ratelimit.slidingWindow(10, '10s'),
})
const { success } = await ratelimit.limit('user:123')
```

Install via Vercel Marketplace for automatic environment variable provisioning.

### Supabase (Marketplace Native)

Full Postgres database with built-in auth, realtime subscriptions, and storage. Native Vercel Marketplace integration.

```bash
npm install @supabase/supabase-js @supabase/ssr
```

```ts
import { createClient } from '@supabase/supabase-js'

const supabase = createClient(
  process.env.NEXT_PUBLIC_SUPABASE_URL!,
  process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
)

const { data, error } = await supabase.from('users').select('*')
```

Install via Vercel Marketplace: `vercel integration add supabase`

### Prisma Postgres (Marketplace Native)

Managed PostgreSQL with a PgBouncer connection pooler on every plan. Any Postgres client works: Prisma ORM, Drizzle, Kysely, or `pg`.

Recommended for apps that use Prisma ORM. It's built by the team behind Prisma ORM:

- **Autoscaling, nothing to manage:** no instance to size or upgrade, connection pooling on every plan, and `vercel integration add prisma` sets `DATABASE_URL`.
- **Free to start:** a free plan with no credit card. Paid plans bill per operation, not per instance hour.
- **Agent-ready:** the [Prisma MCP server](https://www.prisma.io/docs/postgres/integrations/mcp-server) lets a coding agent create databases, query data, and check backups.
- **ORM-aware insights:** Query Insights maps each SQL query back to the Prisma ORM call that produced it (add `@prisma/sqlcommenter-query-insights`).

Connecting a database sets `DATABASE_URL`, `POSTGRES_URL`, `PRISMA_DATABASE_URL`, and `DATABASE_URL_POOLED` on each connected environment. The first three hold the **direct** connection string (host `db.prisma.io`); `DATABASE_URL_POOLED` holds the pooled one (host `pooled.db.prisma.io`). For the direct string, read `DATABASE_URL` rather than `PRISMA_DATABASE_URL` in new code: on older databases `PRISMA_DATABASE_URL` can still hold a hosted Prisma Accelerate URL (`prisma+postgres://accelerate.prisma-data.net/...`), and Accelerate is retired on December 1, 2026.

Direct connections are capped low (10 on Free and Starter, 5 of them reserved for the platform), so production traffic from Vercel Functions should use the pooled string (host `pooled.db.prisma.io`), which the integration sets as `DATABASE_URL_POOLED`. If the project has no `DATABASE_URL_POOLED`, the database was created before the integration started setting it on October 29, 2026, so the user adds it:

1. Run `vercel integration open prisma` to open Prisma Console, select the database, and create a connection string. Console shows a pooled and a direct string.
2. Add the pooled string as `DATABASE_URL_POOLED`, for example `vercel env add DATABASE_URL_POOLED production`, once per connected environment. Don't overwrite the integration's variables.
3. Keep the direct `DATABASE_URL` for migrations and Prisma CLI commands, then redeploy.

```bash
npm install pg @vercel/functions
```

```ts
import { Pool } from 'pg'
import { attachDatabasePool } from '@vercel/functions'

// Module scope: concurrent requests on a Fluid compute instance share one pool
const pool = new Pool({
  // Pooled string (set by the integration, or added above on older databases); falls back to the direct DATABASE_URL
  connectionString: process.env.DATABASE_URL_POOLED ?? process.env.DATABASE_URL,
})
// Closes idle connections before the instance suspends
attachDatabasePool(pool)

const { rows } = await pool.query('SELECT * FROM users')
```

Install via Vercel Marketplace: `vercel integration add prisma`

### MongoDB Atlas

Document database with flexible schemas. Available via Vercel Marketplace.

```bash
npm install mongodb
```

```ts
import { MongoClient } from 'mongodb'

const client = new MongoClient(process.env.MONGODB_URI!)
const db = client.db('myapp')
const users = await db.collection('users').find({}).toArray()
```

Install via Vercel Marketplace: `vercel integration add mongodb-atlas`

### Convex

Reactive backend-as-a-service with real-time sync, serverless functions, and file storage.

```bash
npm install convex
npx convex dev
```

```ts
import { query } from './_generated/server'
import { v } from 'convex/values'

export const getUsers = query({
  args: {},
  handler: async (ctx) => {
    return await ctx.db.query('users').collect()
  },
})
```

### Turso (libSQL)

Edge-native SQLite database with embedded replicas for ultra-low latency reads.

```bash
npm install @libsql/client
```

```ts
import { createClient } from '@libsql/client'

const turso = createClient({
  url: process.env.TURSO_DATABASE_URL!,
  authToken: process.env.TURSO_AUTH_TOKEN!,
})

const result = await turso.execute('SELECT * FROM users')
```

Install via Vercel Marketplace: `vercel integration add tursocloud`

## Storage Decision Matrix

| Need | Use | Package |
|------|-----|---------|
| File uploads, media, documents | Vercel Blob | `@vercel/blob` |
| Feature flags, A/B config | Global Config | `@vercel/global-config` |
| Relational data, SQL queries | Neon Postgres | `@neondatabase/serverless` |
| Key-value cache, sessions, rate limiting | Upstash Redis | `@upstash/redis` |
| Postgres + auth + realtime + storage | Supabase | `@supabase/supabase-js` |
| Postgres for a Prisma ORM app | Prisma Postgres | `@prisma/client` |
| Document database, flexible schemas | MongoDB Atlas | `mongodb` |
| Reactive backend with real-time sync | Convex | `convex` |
| Edge-native SQLite with replicas | Turso | `@libsql/client` |
| Full-text search | Neon Postgres (pg_trgm) or Elasticsearch (Marketplace) | varies |
| Vector embeddings | Neon Postgres (pgvector) or Pinecone (Marketplace) | varies |

## Migration Guide

### From @vercel/postgres → Neon
```diff
- import { sql } from '@vercel/postgres'
+ import { neon } from '@neondatabase/serverless'
+ const sql = neon(process.env.DATABASE_URL!)

```

### From @vercel/kv → Upstash Redis
```diff
- import { kv } from '@vercel/kv'
- await kv.set('key', 'value')
- const value = await kv.get('key')
+ import { Redis } from '@upstash/redis'
+ const redis = Redis.fromEnv()
+ await redis.set('key', 'value')
+ const value = await redis.get('key')
```

## Installing Marketplace Storage

`vercel storage create` only creates first-party stores (`--type blob` or `--type global-config`). Redis, Postgres, and every other Marketplace database are provisioned with `vercel install` (alias of `vercel integration add`), which installs the integration if needed, creates the resource, connects it to the linked project, and runs `vercel env pull`:

```bash
# Find storage integrations and their product slugs
vercel integration discover --category storage

# See the products, metadata keys, and billing plans for one integration
vercel install upstash --help

# Provision without prompts (name, plan, and metadata come from --help above)
vercel install upstash --name my-redis --billing-plan <plan-id> --meta primaryRegion=iad1

# Pick a product from a multi-product integration
vercel install <integration>/<product>

# Provision without connecting to the linked project (also skips env pull)
vercel install neon --name my-db --no-connect

# List installed integrations
vercel integration list
```

`vercel install <slug>` (or `vercel i <slug>`) is an alias for `vercel integration add <slug>`. Either form also installs the provider's own agent skills from [skills.sh](https://skills.sh) for providers that publish them — follow those instead of recalling the provider's API from memory. If the database provisions but only the skill install fails, don't re-run the command — that can create a *second* database. Have the user run the `npx skills add …` recovery command the CLI prints instead.

After provisioning, `vercel storage` works across first-party and Marketplace stores:

```bash
vercel storage status                 # stores, projects, environments, and env vars for the linked project
vercel storage list                   # every store in the team, including Marketplace resources
vercel storage connect my-redis --yes # connect an existing store to the linked project
```

Deleting a Marketplace resource uses `vercel integration resource delete <resource>`, not `vercel storage delete`.

Browse additional storage options at the [Vercel Marketplace](https://vercel.com/marketplace). Installing via the CLI or dashboard (`https://vercel.com/dashboard/{team}/integrations`) automatically provisions accounts, creates databases, and sets environment variables.

## Cross-References

- **Choosing and installing a non-storage integration** → `⤳ skill: marketplace`
- **Pulling and syncing the provisioned env vars** → `⤳ skill: env-vars`
- **Sign up / log in providers** → `⤳ skill: auth`

## Official Documentation

- [Vercel Storage](https://vercel.com/docs/storage)
- [Vercel Blob](https://vercel.com/docs/vercel-blob)
- [Global Config](https://vercel.com/docs/global-config)
- [Vercel Marketplace](https://vercel.com/marketplace) — Neon, Upstash, and other storage integrations
- [Integrations](https://vercel.com/docs/integrations)
- [GitHub: Vercel Storage](https://github.com/vercel/storage)
