Skip to content
Dashboard

Introducing storage on Vercel

Vercel KV, Vercel Postgres, Vercel Blob, and Vercel Edge Config are now available.

The Vercel KV and Vercel Postgres products have been sunset. You can now deploy alternative storage solutions for KV and Postgres through the Vercel Marketplace Storage, with automatic account provisioning and unified billing.

Link to headingWhy now?

Link to headingVercel KV: A durable Redis database

user-prefs.ts
import kv from '@vercel/kv';
export async function getPrefs() {
const prefs = await kv.get('prefs');
return prefs || {};
}
export async function updatePrefs(prefs: Record<string, string>) {
return kv.set('prefs', prefs);
}

Link to headingVercel Postgres: Complex data made easy

app/page.tsx
import { sql } from '@vercel/postgres';
import { redirect } from 'next/navigation';
async function create(formData: FormData) {
'use server';
const { rows } = await sql`
INSERT INTO products (name)
VALUES (${formData.get('name')})
`;
redirect(`/product/${rows[0].slug}`);
}
export default function Page() {
return (
<form action={create}>
<input type="text" name="name" />
<button type="submit">Submit</button>
</form>
);
}

Use Vercel Postgres with Next.js Server Actions (to be announced Thursday)

Link to headingVercel Blob: Easy file storage at the edge

app/profile/route.ts
import { put } from '@vercel/blob';
export async function PUT(request: Request) {
const form = await request.formData();
const file = form.get('file') as File;
const blob = await put('avatars/user-42.png', file, { access: 'public' });
return Response.json(blob);
}

Link to headingGetting started

Get started with KV

Try Vercel KV with our Next.js starter template.

Open template

Get started with Postgres

Try Vercel Postgres with our Next.js starter template.

Open template