Payload CMS
Payload CMS is an open-source headless CMS built on TypeScript and Express.js. Unlike Strapi (auto-generated admin) or Sanity (cloud-hosted), Payload CMS gives developers complete control over the admin panel, database schemas, and API behavior through code. It's TypeScript-native and designed for developers who want full-stack CMS customization without fighting abstractions.
§ 1 Definition
Payload CMS is an open-source, self-hosted Headless CMS built entirely in TypeScript on top of Express.js and MongoDB or PostgreSQL. Released in 2021, Payload has rapidly gained adoption among developers who want more control than Strapi provides and more data ownership than cloud-hosted options like Sanity. Payload's defining characteristic is its code-first philosophy. Unlike Strapi where content types are primarily defined through the admin UI, Payload expects you to define everything in TypeScript. Collections (Post, Page, Product), fields, hooks, access control, and admin UI components are all configured in code. This makes Payload exceptionally flexible for complex content architectures but requires TypeScript proficiency.
§ 2 Code-First CMS Architecture
Payload treats the CMS backend like any other TypeScript application. You define a Payload config that specifies: - Collections: Your content types (Posts, Pages, Products). Each collection has fields, hooks, access control, and admin configuration. - Globals: Singleton content like site settings, navigation, or footer text. - Fields: Types like text, richText, relationship, array, blocks, and custom field types. - Hooks: Before/after operations (beforeValidate, afterChange, beforeDelete) that run custom logic. - Access control: Granular permission functions that run per-request. - Admin UI: Custom React components for the dashboard panels. Because everything is code, Payload projects are version-controlled, testable, and deployable through standard CI/CD pipelines. Schema changes are database migrations, not clicking buttons in an admin UI. This makes Payload popular among development teams that treat their CMS as infrastructure rather than a black box.
§ 3 Payload vs Strapi vs Sanity
Payload occupies a unique position in the headless CMS landscape: Payload vs Strapi: Both are self-hosted and open source. Payload is TypeScript-native and code-first. Strapi has a more approachable admin UI for non-developers. Payload gives you finer-grained control over the admin panel (custom React components) and API behavior (hooks and access control). Strapi has a larger plugin ecosystem. Payload's codebase is more modern and better architected. Payload vs Sanity: Sanity is cloud-hosted and treats content as data in a Content Lake. Payload is self-hosted and treats the CMS as a TypeScript application. Sanity's GROQ query language is powerful but proprietary to Sanity. Payload uses standard REST and GraphQL APIs. Payload gives you more control over infrastructure and data. Sanity provides a better real-time collaboration experience. Payload vs Contentful: Contentful is the enterprise cloud option. Payload is the self-hosted developer option. Contentful provides governance and SLAs. Payload provides code-level control and data ownership. They serve fundamentally different needs. Atomic Glue uses Payload CMS for projects where the client has strong TypeScript engineering resources and needs a CMS they can fully customize. It's particularly strong for projects that need complex field relationships, custom admin workflows, or integration with existing TypeScript codebases.
§ 4 Payload CMS in Production
Payload runs on Node.js and supports PostgreSQL (recommended for production) and MongoDB. Key production considerations: Hosting: Runs on any Node.js host. Common deployments include VPS (DigitalOcean, Linode), PaaS (Railway, Render), Docker containers, and serverless (Vercel with MongoDB). Payload Cloud is also available for managed hosting. Admin Panel: Payload's admin panel is built with React and is fully customizable. You can replace any admin component with a custom React component. The admin panel is automatically generated from your collection definitions but can be extended with custom views, custom fields, and custom UI elements. Performance: Payload is fast. REST and GraphQL APIs are generated from your collection definitions. Database queries are efficient. Caching and CDN configuration follow standard Node.js patterns. Payload's architecture is significantly more performant than Strapi for complex queries and large datasets. Community: Payload's community is smaller than Strapi's but growing quickly. The maintainers are active and responsive. Payload has a Discord community, GitHub discussions, and regular releases.
§ 5 In code
// Define a Payload CMS collection in TypeScript
import { CollectionConfig } from 'payload/types'
export const Posts: CollectionConfig = {
slug: 'posts',
admin: {
useAsTitle: 'title',
defaultColumns: ['title', 'author', 'publishedAt'],
},
access: {
read: () => true,
},
fields: [
{ name: 'title', type: 'text', required: true },
{ name: 'slug', type: 'text', required: true, unique: true },
{ name: 'content', type: 'richText' },
{
name: 'author',
type: 'relationship',
relationTo: 'authors',
},
{ name: 'publishedAt', type: 'date' },
],
}§ 6 Common questions
- Q. Is Payload CMS free?
- A. Yes. Payload is MIT-licensed open source. You can use it for any project for free. Payload Cloud (managed hosting) is a paid service.
- Q. What databases does Payload support?
- A. Payload supports PostgreSQL (recommended) and MongoDB. PostgreSQL offers better performance and reliability for production use.
- Q. Is Payload CMS good for ecommerce?
- A. Yes. Payload's field types (arrays, blocks, relationships) are well-suited for complex product catalogs. It's commonly paired with Next.js for headless ecommerce with platforms like Medusa or Shopify Plus.
- Payload CMS is a TypeScript-native, code-first headless CMS with complete developer control over the admin panel and API behavior.
- It offers more flexibility than Strapi and more data ownership than Sanity, at the cost of requiring TypeScript proficiency.
- Collections, fields, hooks, and access control are all defined in code, enabling full CI/CD workflows.
- Payload is ideal for development teams that want to own their CMS infrastructure and customize every aspect of the admin experience.
We use Payload CMS for clients who need a TypeScript-native CMS with complete control over infrastructure and admin experience. Custom collection configurations, rich text field customization, and headless frontend integration. Get in touch about your Payload CMS project.
Get in touchPayload CMS is an open-source headless CMS built on TypeScript and Express.js. Unlike Strapi (auto-generated admin) or Sanity (cloud-hosted), Payload CMS gives developers complete control over the admin panel, database schemas, and API behavior through code. It's TypeScript-native and designed for developers who want full-stack CMS customization without fighting abstractions.
Category: Cms (also: Software Engineering)
Author: Atomic Glue Editorial Team
## Definition
Payload CMS is an open-source, self-hosted [Headless CMS](/glossary/headless-cms) built entirely in TypeScript on top of Express.js and MongoDB or PostgreSQL. Released in 2021, Payload has rapidly gained adoption among developers who want more control than [Strapi](/glossary/strapi) provides and more data ownership than cloud-hosted options like [Sanity](/glossary/sanity). Payload's defining characteristic is its code-first philosophy. Unlike Strapi where content types are primarily defined through the admin UI, Payload expects you to define everything in TypeScript. Collections (Post, Page, Product), fields, hooks, access control, and admin UI components are all configured in code. This makes Payload exceptionally flexible for complex content architectures but requires TypeScript proficiency.
## Code-First CMS Architecture
Payload treats the CMS backend like any other TypeScript application. You define a Payload config that specifies: - **Collections:** Your content types (Posts, Pages, Products). Each collection has fields, hooks, access control, and admin configuration. - **Globals:** Singleton content like site settings, navigation, or footer text. - **Fields:** Types like text, richText, relationship, array, blocks, and custom field types. - **Hooks:** Before/after operations (beforeValidate, afterChange, beforeDelete) that run custom logic. - **Access control:** Granular permission functions that run per-request. - **Admin UI:** Custom React components for the dashboard panels. Because everything is code, Payload projects are version-controlled, testable, and deployable through standard CI/CD pipelines. Schema changes are database migrations, not clicking buttons in an admin UI. This makes Payload popular among development teams that treat their CMS as infrastructure rather than a black box.
## Payload vs Strapi vs Sanity
Payload occupies a unique position in the headless CMS landscape: **Payload vs Strapi:** Both are self-hosted and open source. Payload is TypeScript-native and code-first. Strapi has a more approachable admin UI for non-developers. Payload gives you finer-grained control over the admin panel (custom React components) and API behavior (hooks and access control). Strapi has a larger plugin ecosystem. Payload's codebase is more modern and better architected. **Payload vs Sanity:** Sanity is cloud-hosted and treats content as data in a Content Lake. Payload is self-hosted and treats the CMS as a TypeScript application. Sanity's GROQ query language is powerful but proprietary to Sanity. Payload uses standard REST and GraphQL APIs. Payload gives you more control over infrastructure and data. Sanity provides a better real-time collaboration experience. **Payload vs Contentful:** Contentful is the enterprise cloud option. Payload is the self-hosted developer option. Contentful provides governance and SLAs. Payload provides code-level control and data ownership. They serve fundamentally different needs. Atomic Glue uses Payload CMS for projects where the client has strong TypeScript engineering resources and needs a CMS they can fully customize. It's particularly strong for projects that need complex field relationships, custom admin workflows, or integration with existing TypeScript codebases.
## Payload CMS in Production
Payload runs on Node.js and supports PostgreSQL (recommended for production) and MongoDB. Key production considerations: **Hosting:** Runs on any Node.js host. Common deployments include VPS (DigitalOcean, Linode), PaaS (Railway, Render), Docker containers, and serverless (Vercel with MongoDB). Payload Cloud is also available for managed hosting. **Admin Panel:** Payload's admin panel is built with React and is fully customizable. You can replace any admin component with a custom React component. The admin panel is automatically generated from your collection definitions but can be extended with custom views, custom fields, and custom UI elements. **Performance:** Payload is fast. REST and GraphQL APIs are generated from your collection definitions. Database queries are efficient. Caching and CDN configuration follow standard Node.js patterns. Payload's architecture is significantly more performant than Strapi for complex queries and large datasets. **Community:** Payload's community is smaller than Strapi's but growing quickly. The maintainers are active and responsive. Payload has a Discord community, GitHub discussions, and regular releases.
## In code
// Define a Payload CMS collection in TypeScript
import { CollectionConfig } from 'payload/types'
export const Posts: CollectionConfig = {
slug: 'posts',
admin: {
useAsTitle: 'title',
defaultColumns: ['title', 'author', 'publishedAt'],
},
access: {
read: () => true,
},
fields: [
{ name: 'title', type: 'text', required: true },
{ name: 'slug', type: 'text', required: true, unique: true },
{ name: 'content', type: 'richText' },
{
name: 'author',
type: 'relationship',
relationTo: 'authors',
},
{ name: 'publishedAt', type: 'date' },
],
}## Common questions
Q: Is Payload CMS free?
A: Yes. Payload is MIT-licensed open source. You can use it for any project for free. Payload Cloud (managed hosting) is a paid service.
Q: What databases does Payload support?
A: Payload supports PostgreSQL (recommended) and MongoDB. PostgreSQL offers better performance and reliability for production use.
Q: Is Payload CMS good for ecommerce?
A: Yes. Payload's field types (arrays, blocks, relationships) are well-suited for complex product catalogs. It's commonly paired with Next.js for headless ecommerce with platforms like Medusa or Shopify Plus.
## Key takeaways
- Payload CMS is a TypeScript-native, code-first headless CMS with complete developer control over the admin panel and API behavior.
- It offers more flexibility than Strapi and more data ownership than Sanity, at the cost of requiring TypeScript proficiency.
- Collections, fields, hooks, and access control are all defined in code, enabling full CI/CD workflows.
- Payload is ideal for development teams that want to own their CMS infrastructure and customize every aspect of the admin experience.
## Related entries
- [Headless CMS](atomicglue.co/glossary/headless-cms)
- [Strapi](atomicglue.co/glossary/strapi)
- [Sanity](atomicglue.co/glossary/sanity)
- [Contentful](atomicglue.co/glossary/contentful)
- [CMS](atomicglue.co/glossary/cms)
Last updated July 2025. Permalink: atomicglue.co/glossary/payload-cms