For users who do not wish to host their CMS backend on TinaCloud, we provide a self-hosting option. This allows you to run your own TinaCMS Backend, with the flexibility to provide your own database, authentication, and Git integration, independent of TinaCloud.
Want to jump into the code? Check out the Self-hosted Starter Docs.
The Tina Data Layer provides a GraphQL API that serves Markdown and JSON files backed by a database. You can think of the database as more of an ephemeral cache, since the single source of truth for your content is really your Markdown/JSON files.
Check out the blog post for more info
When you opt to self-host TinaCMS's backend, you'll be configuring a single API function to act as the backend service. This function will expose a GraphQL endpoint for your content and handle all aspects of authentication and authorization.
The TinaCMS backend is designed to be compatible with any Node.js serverless environment, such as Vercel or Netlify. We provide a Next.js starter that can be deployed to Vercel with a single click. You can also deploy to Netlify or any other serverless environment.
// pages/api/tina/[...routes].{ts,js}// ...import { TinaNodeBackend } from '@tinacms/datalayer'const tinaHandler = TinaNodeBackend({// ...})export default (req, res) => {return tinaHandler(req, res)}
Note: This is a Next.js example, but you can use TinaCMS with any framework.
The backend setup consists of three main, configurable modules:
Each module is designed to be standalone, meaning you have the option to replace any module with a different implementation or develop a custom solution to fit your specific needs.
Note: Some features are not available when self-hosting TinaCMS. See the Self-hosted Limitations section for more info.
Last Edited: July 6, 2023
Product
Resources
© TinaCMS 2019–2024