Tina Docs
Home
Blog
Showcase
Community
Introduction
Overview
Introduction To TinaCMS
Getting Started
Using the Tina Editor
FAQ
Core Concepts
Content Modeling
Data Fetching
Visual Editing
Querying Content
Overview
Writing custom queries
Editing
Overview
Markdown & MDX
Block-based editing
Single Document Collections
Customizing Tina
Overview
Validation
Custom Field Components
Custom List Rendering
Format and Parse Input
Filename Customization
Before Submit function
Going To Production
Overview
Tina Cloud
Self-Hosted
Drafts
Overview
Draft Fields
Editorial Workflow
Guides
Overview
Framework Guides
Separate Content Repo
Querying Tina Content at Runtime
Internationalization
Migrating From Forestry
Further Reference
Overview
Config
Schema
The "tina" folder
The TinaCMS CLI
Media
Search
Content API
Tina's edit state
The "tinaField" helper
Self-Hosted Components
Overview
Backend Host
Git Provider
Database Adapter
Overview
Vercel KV
Mongo DB
Bring Your Own Database Adapter
Auth Provider
Table of Contents

The Vercel KV database adapter allows you to use the Vercel KV database with Tina. This adapter uses the Upstash Redis client, allowing it to also work with Upstash Redis as well.

Looking for the code? Check out the GitHub repository.

To get started, you will need to set up some environment variables.

First copy your values from the Vercel or Upstash dashboard.

Vercel Dashboard

Then add the following environment variables to your project:

KV_REST_API_URL=***
KV_REST_API_TOKEN=***

Create the database adapter

//...
import { RedisLevel } from 'upstash-redis-level'
export default isLocal
? createLocalDatabase()
: createDatabase({
// ...
databaseAdapter: new RedisLevel({
namespace: branch,
redis: {
url: process.env.KV_REST_API_URL || 'http://localhost:8079',
token: process.env.KV_REST_API_TOKEN || 'example_token',
},
debug: process.env.DEBUG === 'true' || false,
}),
})

Product

Showcase
TinaCloud
Introduction
How Tina Works
Roadmap

Resources

Blog
Examples
Support
Media

Whats New
TinaCMS
TinaCloud
Use Cases
Agencies
Documentation
Teams
Jamstack CMS
Benefits
MDX
Markdown
Git
Editorial Workflow
Customization
SEO
Comparisons
TinaCMS vs Storyblok
TinaCMS vs Sanity
TinaCMS vs DecapCMS
TinaCMS vs Contentful
TinaCMS vs Builder.io
TinaCMS vs Strapi
Integrations
Astro
Hugo
NextJS
Jekyll