Skip to content
Now accepting Q2 projects — limited slots available. Get started →
CMS · Updated Apr 30, 2026

What is Directus?

Directus is an open-source headless CMS that wraps any SQL database with a REST and GraphQL API.

What is Directus?

Directus is an open-source, self-hostable headless CMS that sits on top of an existing SQL database and instantly generates both REST and GraphQL APIs from the schema. Originally released in 2004 as a PHP project, it was fully rewritten in Node.js (v9) in 2021 and has been on a rapid release cadence since — the current stable line is v11.x as of early 2026. Unlike schema-first CMS platforms like Strapi, Directus is database-first: it mirrors your existing tables rather than generating them from a content model. This means you can connect it to a production Postgres, MySQL, MariaDB, SQLite, MS SQL, or CockroachDB instance without altering the schema. We've shipped Directus on 20+ client projects, mostly paired with Postgres and a Next.js or Astro frontend. It's our go-to when the client needs a self-hosted data studio — not just a blog CMS.

How it works

Directus runs as a Node.js application (typically deployed via Docker) that connects to your SQL database using Knex.js under the hood. On startup it introspects every table, column, and relation, then exposes:

  • REST API at /items/<collection> with filtering, sorting, deep field selection, and aggregation.
  • GraphQL API at /graphql with equivalent query power.
  • Real-time subscriptions via WebSockets (added in v10.4).

The admin app — called "Data Studio" — is a Vue 3 SPA bundled with the server. It gives non-technical editors a polished interface for CRUD, roles, permissions, file management, and Flows (a built-in automation engine similar to n8n or Zapier).

Permissions are granular. You define rules per role, per collection, per CRUD action, down to individual fields and row-level filters. A typical config looks like:

{
  "role": "editor",
  "collection": "articles",
  "action": "update",
  "fields": ["title", "body", "status"],
  "permissions": { "_and": [{ "author": { "_eq": "$CURRENT_USER" } }] }
}

This rule lets editors update only their own articles, and only the title, body, and status fields. No code needed — this is configured entirely in the Data Studio UI.

Extensibility is handled through Extensions SDK: custom endpoints, hooks, modules, interfaces, displays, layouts, and operations (for Flows). Extensions are written in TypeScript and loaded at runtime.

When to use it

Directus excels when the data model already exists or when content management is only one concern alongside operational data.

Use Directus when:

  • You have an existing Postgres (or other SQL) database and need an admin UI + API without rewriting your schema.
  • You need fine-grained, row-level permissions — editorial workflows, multi-tenant data, internal tools.
  • Self-hosting is a requirement (compliance, data residency, cost control).
  • You want a single tool for content, file/asset management, and lightweight workflow automation.

Skip Directus when:

  • You want a fully managed SaaS with zero ops burden — Directus Cloud exists but costs more than competitors like Sanity or Contentful at scale.
  • Your content is document-oriented or deeply nested — Sanity's GROQ or a document database will serve you better.
  • You need edge-cached content delivery out of the box — you'll need to layer a CDN or use ISR on the frontend.

Directus vs alternatives

Feature Directus Strapi Sanity Contentful
Open source Yes (BSL 1.1 → GPLv3) Yes (MIT community) No (proprietary) No (proprietary)
Database approach Database-first (mirrors existing) Schema-first (generates tables) Document store (hosted) Document store (hosted)
API types REST + GraphQL + WebSocket REST + GraphQL GROQ + GraphQL REST + GraphQL
Self-hosted Yes Yes No No
Built-in Flows/automation Yes No (needs plugins) No (needs webhooks) No (needs webhooks)
Admin framework Vue 3 React (Strapi 5) React (Sanity Studio) Proprietary

Note on licensing: Directus switched from GPLv3 to BSL 1.1 in v11 for the core, with the SDK and extensions remaining MIT. This matters if you're building a competing hosted CMS. For end-user projects it changes nothing.

Real-world example

We built an internal asset management platform for a media company with ~50,000 image and video records in an existing Postgres 15 database. Instead of writing a custom admin panel, we pointed Directus at the live database. Within a day we had a working Data Studio with role-based access for editors, reviewers, and admins. Flows handled automated thumbnail generation (calling a Cloudflare Worker via webhook) and Slack notifications on new uploads. The Next.js 14 frontend consumed the REST API with on-demand ISR, keeping page loads under 1.2s on a 90th-percentile Lighthouse performance score. Total time from kickoff to production: 3 weeks. Our initial estimate for a custom-built admin was 10 weeks.

Frequently asked questions about Directus

Is Directus the same as Strapi?
No. Both are open-source headless CMS platforms, but they take opposite approaches to the database. Strapi is schema-first — you define content types in Strapi and it creates database tables for you. Directus is database-first — you point it at an existing SQL database and it introspects the schema automatically. This makes Directus the better choice when you already have a production database you don't want to restructure. Strapi (v5, React-based) tends to be simpler for greenfield blog-style projects. Directus offers built-in Flows for automation, which Strapi lacks natively. Licensing also differs: Strapi community edition is MIT, while Directus v11 core uses BSL 1.1.
When did Directus become a standard headless CMS option?
Directus has been around since 2004 as a PHP-based database GUI, but it became a serious headless CMS contender with the v9 rewrite in 2021, which moved the entire stack to Node.js, TypeScript, Vue 3, and Knex.js. That release introduced the modern REST + GraphQL dual-API architecture. The addition of Flows (built-in automation) in v10 (2023) and real-time WebSocket subscriptions in v10.4 further solidified its position. By 2024-2025 it had surpassed 30,000 GitHub stars and was widely adopted in agencies and enterprises needing self-hosted content infrastructure.
What's the alternative to Directus for self-hosted CMS?
Strapi is the most direct alternative — also open-source, also Node.js, also supports Postgres. If you want something lighter and code-first, Payload CMS (TypeScript, MongoDB or Postgres) is worth evaluating — it's gained significant traction since its v2 release. For non-JS stacks, Ghost (Node but blog-focused) and WordPress (PHP, ubiquitous) remain options, though neither is truly headless by default. If self-hosting isn't required, Sanity and Contentful are the dominant managed alternatives. We typically reach for Directus when there's an existing database and for Payload when starting from scratch with complex access control requirements.
Can Directus handle large-scale production workloads?
Yes, but you need to architect for it. Directus itself is stateless — you can run multiple instances behind a load balancer. The bottleneck is always the underlying SQL database, so standard Postgres tuning applies: connection pooling (PgBouncer), read replicas, proper indexing. For file storage, Directus supports S3-compatible backends, Google Cloud Storage, and Azure Blob out of the box, so assets scale independently. We've run Directus on projects with 100K+ rows and 200+ concurrent admin users without issues, using a managed Postgres instance on AWS RDS and Directus running on ECS with 3 containers. Caching at the API layer (Redis) and frontend layer (ISR or CDN) is essential for public-facing read traffic.
Get in touch

Let's build
something together.

Whether it's a migration, a new build, or an SEO challenge — the Social Animal team would love to hear from you.

Get in touch →