Custom Datalayer

Loading last updated info...

Setting up your own datalayer gives you complete control over how TinaCMS interacts with your content. This guide provides an overview of the key components and concepts.

Core Components

When self-hosting the TinaCMS datalayer, you'll need to configure four main components:

1. Backend Host

The backend host is where your datalayer API will run. Common options include:

  • Next.js API routes
  • Vercel Serverless Functions
  • Netlify Functions

2. Database Adapter

The database adapter determines where your content index is stored. Options include:

  • MongoDB
  • Vercel KV
  • Custom database solutions

Learn more in the official Database Adapter documentation.

3. Git Provider

The Git provider manages how your content files are stored and retrieved. Options include:

  • GitHub
  • Custom Git providers

Learn more in the official Git Provider documentation.

4. Auth Provider

The auth provider handles user authentication for your CMS. Options include:

  • Auth.js (formerly NextAuth.js)
  • Clerk
  • TinaCloud auth
  • Custom auth solutions

Learn more in the official Auth Provider documentation.

Getting Started

For complete step-by-step instructions on configuring your own datalayer, we recommend following the official TinaCMS Self-Hosting documentation.

The official documentation provides detailed examples, code snippets, and best practices for setting up each component of your custom datalayer.

Last Edited: July 15, 2025