What is Payload CMS?
Payload CMS is a self-hosted, headless content management system built on Node.js with a code-first configuration approach.
What is Payload CMS?
Payload CMS is a self-hosted, open-source headless content management system built on Node.js and TypeScript. It launched in 2021, picked up steam with the 2.0 release in 2023, and really hit its stride with 3.0 in 2024. That version brought native Next.js integration—you can run your CMS and frontend in a single Next.js app now.
It's code-first. You define collections, fields, hooks, and access control in TypeScript config files instead of clicking through some GUI. Supports MongoDB and Postgres (via Drizzle ORM). The admin panel is React-based and auto-generated from your config.
Payload's a good fit for teams that want to own their data, need complex relational content modeling, and prefer defining schema in code rather than a third-party dashboard. We've used it on projects where clients needed self-hosting with tight auth integration and custom workflows.
How it works
Payload's architecture centers on a single payload.config.ts file. You define collections (think database tables), globals (singleton data like site settings), and fields with full TypeScript types. Here's a minimal collection:
import { CollectionConfig } from 'payload';
export const Posts: CollectionConfig = {
slug: 'posts',
admin: {
useAsTitle: 'title',
},
access: {
read: () => true,
},
fields: [
{ name: 'title', type: 'text', required: true },
{ name: 'content', type: 'richText' },
{ name: 'author', type: 'relationship', relationTo: 'users' },
{ name: 'publishedDate', type: 'date' },
],
};
From this config, Payload auto-generates:
- A full REST API and GraphQL API
- An admin UI with forms, list views, and filters
- TypeScript types for your frontend code
- Database migrations (when using Postgres)
Payload 3.0 runs as a Next.js plugin. You install it into an existing Next.js project, and the admin panel gets served from /admin as a Next.js route. Your CMS and site share a single deployment, a single auth system, a single codebase.
Hooks (beforeChange, afterRead, etc.) let you run server-side logic at every lifecycle point—sending emails, transforming data, syncing to external services. Access control is function-based: each collection and field can have granular read/create/update/delete functions that receive the authenticated user and return a boolean or a MongoDB/SQL query constraint.
When to use it
Payload fits a specific profile. Here's when it makes sense and when it doesn't:
Use Payload when:
- You want full ownership of your data and hosting (no vendor lock-in)
- Your team's comfortable writing TypeScript config rather than using a visual schema builder
- You need deep customization—custom endpoints, hooks, access control per field
- You're already in the Next.js ecosystem and want CMS + frontend in one deploy
- You need to support both REST and GraphQL from the same data layer
Skip Payload when:
- Your content team needs to manage the schema themselves without developer involvement—a managed CMS like Sanity or Contentful is better
- You don't want to manage hosting and infrastructure at all
- You've got a simple blog or marketing site where a lighter tool like Keystatic or even MDX files would do
- Your team isn't on Node.js/TypeScript
We've shipped Payload on 12+ client projects where self-hosting was a hard requirement. It's been our go-to self-hosted headless CMS since 2023.
Payload CMS vs alternatives
| Feature | Payload CMS | Strapi | Sanity | Contentful |
|---|---|---|---|---|
| Hosting | Self-hosted | Self-hosted | Managed (cloud) | Managed (cloud) |
| Config approach | Code-first (TypeScript) | GUI + code | Code + Studio (React) | GUI only |
| Database | MongoDB, Postgres | MySQL, Postgres, SQLite | Proprietary (hosted) | Proprietary (hosted) |
| Next.js integration | Native (runs inside Next.js) | External API | Plugin-based | External API |
| Open source | Yes (MIT) | Yes (MIT with EE) | Partially (Studio is OSS) | No |
| Pricing | Free (self-hosted) | Free (self-hosted) + paid cloud | Free tier, pay per usage | Free tier, pay per usage |
| Rich text | Lexical-based | Custom blocks | Portable Text | Structured (proprietary) |
The biggest difference from Strapi is Payload's code-first approach and native Next.js embedding. Strapi leans more on its admin GUI for schema creation. Compared to managed options like Sanity and Contentful, Payload trades convenience for full control.
Real-world example
One of our e-commerce clients needed a product catalog with 8,000+ SKUs, role-based access for regional editors, and a custom approval workflow before products went live. We deployed Payload 3.0 inside their existing Next.js 14 app on a single Railway instance backed by Postgres.
Collections included Products, Categories, Regions, and a custom Approvals collection with lifecycle hooks that sent Slack notifications and blocked publishing until an admin approved. The admin panel loaded in under 1.2s. The auto-generated REST API served product pages via ISR with a 60-second revalidation window.
Total CMS infrastructure cost: ~$20/month on Railway. Compared to their previous Contentful setup, they cut CMS costs by over 90% and gained the ability to write custom server-side logic without a separate backend service.