Directus Self-Hosted

BeginnerWebsite

Self-hosted Directus headless CMS providing a REST and GraphQL API over your own PostgreSQL database.

Published 27 September 2026

Core Tools
PostgreSQL
PostgreSQL
Docker
Docker
Directus
Directus
Hosting
Hetzner
Railway
DigitalOcean
Render
Hostinger
+1
Reverse Proxy
Traefik
Caddy
NGINX
Self-Hosted PaaS
Coolify
Dokploy

About Directus Self-Hosted

Directus is a headless CMS and data platform that wraps a SQL database with REST and GraphQL APIs, plus a no-code admin app for content editors. Self-hosting it with PostgreSQL gives you a content and data API platform whose data stays in a database you own and can query directly.

Directus generates API endpoints from your database schema: create tables, and Directus immediately serves them with access control, filtering, sorting, and pagination. The admin app lets content teams manage records without touching the database, and role-based access control down to the field level decides what each user can see and edit. Flows add automations, and uploaded files go to local storage or an S3-compatible bucket.

Licensing depends on the organization. Under the Open Innovation Grant, organizations under $5 million in revenue and with fewer than 50 employees self-host with full access at no software cost; larger organizations get a free Core tier capped at 3 seats, 25 collections, and 5 flows, or pay for Team or Enterprise. The stack suits content-driven websites, internal tools, and data APIs where full data ownership matters.

Key Features

  • ✓Auto-generated REST and GraphQL APIs from the PostgreSQL schema
  • ✓No-code admin app for content editors and non-technical users
  • ✓Role-based access control with field-level permissions
  • ✓Flows for automations triggered by data events or schedules
  • ✓File and asset management with built-in image transforms, locally or on S3
  • ✓Real-time data subscriptions over WebSockets

When to Use Directus Self-Hosted

  • →Headless CMS for content teams managing website or app content in PostgreSQL
  • →Internal CRUD admin panels built on an existing database without custom development
  • →REST and GraphQL API layer for a relational database used by multiple frontend consumers
  • →Low-code back offices for SaaS products where non-technical staff manage configuration data
  • →Content-heavy websites where the editorial team needs a polished admin experience

Pros

  • No per-request cost, and no software cost at all for organizations that qualify for the grant
  • Auto-generated APIs remove custom endpoint work for standard CRUD patterns
  • Works over an existing schema, so the database design stays yours
  • Admin app is polished enough for non-technical content editors

Cons

  • Self-hosting requires server maintenance, updates, and backups
  • Organizations over the grant's thresholds face Core limits (3 seats, 25 collections, 5 flows) or a paid license
  • Complex business logic beyond CRUD needs custom extensions

Hosting Options for Directus Self-Hosted

Hetzner

Deploy Directus Self-Hosted on Hetzner

A flat-rate root VPS whose entry instance has 4 GB of memory for around €4-5/mo, room for the Directus container at its recommended 2 GB plus PostgreSQL. A volume for the uploads folder, or an S3-compatible bucket, keeps media separate from the server's disk.

Railway

Deploy Directus Self-Hosted on Railway

Directus publishes one-click Railway templates, a blank instance or a CMS starter, that bundle PostgreSQL, Redis, and S3-compatible storage: the most turnkey way to run this stack without a server. Railway's $5/mo Hobby plan plus usage covers a small instance, and the platform handles TLS, so the reverse proxy or PaaS choice doesn't apply.

DigitalOcean

Deploy Directus Self-Hosted on DigitalOcean

A root Droplet with snapshots and a cloud firewall in the panel: about $12/mo for 2 GB, or $24/mo for 4 GB with PostgreSQL on the same box. Managed PostgreSQL (from about $15/mo) and Spaces for file storage move the content and media off the Droplet.

Render

Deploy Directus Self-Hosted on Render

Render's guide deploys Directus from its Docker image with Render's managed PostgreSQL and TLS at the platform edge, so there's no reverse proxy to configure. Directus recommends 2 GB per container, which means the Standard instance (about $25/mo) plus the database, with uploads sent to S3 since Render's disks are per-instance.

Hostinger

Deploy Directus Self-Hosted on Hostinger

The budget VPS in the list: the entry KVM plan (about $6.50/mo on a two-year term) has 4 GB of memory, enough for Directus and PostgreSQL together. Fewer regions than the larger providers, and backups of both the database and the uploads folder are yours to set up.

Amazon Web Services

Deploy Directus Self-Hosted on Amazon Web Services

An EC2 instance at roughly $15-35/mo for 2-4 GB, next to the rest of an AWS-hosted product. RDS can hold the database, S3 is a native Directus storage location for uploads, and an Application Load Balancer with AWS Certificate Manager can handle TLS instead of the reverse proxy.

These are highlighted picks. To see all the tools, check the Hosting & Cloud category.

Reverse Proxy Options for Directus Self-Hosted

Traefik

Directus Self-Hosted with Traefik

Routes to the Directus container from Docker labels and renews Let's Encrypt certificates on its own. Set PUBLIC_URL to the public HTTPS address, since Directus builds asset URLs, password-reset links, and OAuth callbacks from it.

Caddy

Directus Self-Hosted with Caddy

Automatic HTTPS from a few lines of config, the simplest fit for one Directus container. Caddy passes WebSocket upgrades by default, which Directus's real-time subscriptions need, and has no request-size limit that would block large uploads.

NGINX

Directus Self-Hosted with NGINX

The most familiar proxy, with TLS through Certbot. Raise client_max_body_size so uploads through the admin app aren't rejected at NGINX's 1 MB default, and add the WebSocket upgrade headers if you use real-time subscriptions.

Self-Hosted PaaS Options for Directus Self-Hosted

Coolify

Directus Self-Hosted with Coolify

Free and self-hosted, with one-click Directus templates, including one with PostgreSQL, behind Coolify's bundled proxy with HTTPS. Mount the uploads folder as a persistent volume or configure S3 storage, or files vanish on redeploy.

Dokploy

Directus Self-Hosted with Dokploy

Free and self-hosted, with Directus in its template catalog behind its bundled Traefik and HTTPS from the dashboard. Its scheduled backups cover the PostgreSQL service; the uploads volume needs backing up too, since files aren't stored in the database.

Directus Self-Hosted Add-ons

Each addition below extends this stack with a capability the base stack works fine without. None are required: include the ones your product actually needs when building this stack, and skip the rest.

Tunnel Add-ons

Add a tunnel when you're self-hosting without a static IP or can't open inbound ports — a home server, a VPS behind restrictive network policies, or anywhere a reverse proxy alone can't reach the internet.

Cloudflare Tunnel

Directus Self-Hosted with Cloudflare Tunnel

Makes Directus reachable over HTTPS through an outbound-only connection, with no inbound ports or static IP, for a server inside a private network. Set PUBLIC_URL to the tunnel hostname, and note Cloudflare's 100 MB per-request limit on the free plan if editors upload large video.

ngrok

Directus Self-Hosted with ngrok

The quicker-start tunnel for pointing a frontend preview or a webhook at a Directus instance on your own machine. Its free-tier limits suit development rather than a production content API.

Frequently Asked Questions about Directus Self-Hosted

Directus self-hosted or Directus Cloud?

Directus Cloud is a $99/mo add-on on top of a license tier and removes the server work. Self-hosting has no hosting fee, and organizations under $5 million in revenue with fewer than 50 employees self-host with full access at no software cost through the Open Innovation Grant. Larger organizations get a free Core tier capped at 3 seats, 25 collections, and 5 flows, or pay for Team ($499/mo billed annually) or Enterprise. Self-hosting also wins on data residency and when Directus must sit next to databases on a private network; Cloud wins when nobody wants to own a server.

How does this compare to Strapi Self-Hosted?

Both are headless CMSes on PostgreSQL with a REST and GraphQL API, but they model content differently. Directus introspects an existing PostgreSQL schema and layers an admin UI and API over it, so your database design stays primary, which suits teams whose data model exists first. Strapi is schema-first: you define content types in Strapi's builder and it owns the database structure. Directus also leans more data-platform (any SQL database becomes a CMS); Strapi leans more editorial-team. If the content model should outlive the CMS, Directus; if the CMS is the product, Strapi.

How big a server does Directus need?

Directus's official self-hosting requirements are modest for the container itself: 0.25 vCPU and 512 MB of RAM required, with 1 vCPU and 2 GB recommended. Those figures cover only the Directus container; PostgreSQL on the same box and a real media library are what push an actual server past them, so a small 2 GB VPS is the practical floor for this stack, and under-provisioning is the failure mode the official docs specifically warn about.

What needs backing up in this stack?

The PostgreSQL database carries everything: content, Directus configuration, roles, and flows are all stored there, so pg_dump is the backbone of any backup plan. The Directus container itself is stateless and replaceable from its image. The one exception is uploaded files, which live in storage outside the database unless an S3-compatible bucket is configured, so the file store needs its own backup alongside the database.

How do upgrades and licensing work?

Directus ships frequent releases, and major versions apply schema changes to your database on startup, so back up first. Licensing is BSL 1.1 with tiers: the Open Innovation Grant covers smaller organizations completely, the free Core tier covers larger ones up to 3 seats, 25 collections, and 5 flows, and Team or Enterprise licenses lift those limits and add features such as SSO.

Scores

Popularity3/5

A leader in the open-source headless CMS space with strong GitHub traction, though the name registers mainly with people who went looking for a CMS.

Learning Curve2/5

Installing and running Directus is straightforward; the curve is data modeling and permissions design, which is the product rather than the infrastructure.

Flexibility4/5

Directus introspects an existing PostgreSQL schema and layers REST, GraphQL, and granular permissions over it: a data platform that doubles as a CMS.

Performance3/5

A small instance serves content APIs comfortably; heavy media management is the main thing that wants more resources.

Portability5/5

The content store is a plain PostgreSQL schema any tool can read — about as portable as content gets.

Tools in the Directus Self-Hosted Stack

Databases

DevOps & CI/CD

Hosting (choose one)

Reverse Proxy or PaaS (choose one)

Reverse Proxy

Self-Hosted PaaS

Add-ons (optional — add any, or none)

Tunnel

Directus Self-Hosted Pricing

From ~$5/mo Free to start

Self-hosted Directus has no hosting fee and PostgreSQL and Docker are free, so the server is the recurring cost. The license depends on the organization: free with full access under the Open Innovation Grant (under $5 million revenue and 50 employees), a free Core tier with caps above that, or Team at $499/mo. Directus Cloud is a $99/mo add-on if you'd rather not run the server.

Server (any provider)$5-25/mo

Directus recommends 2 GB of RAM per container (512 MB minimum); PostgreSQL on the same server makes 4 GB the comfortable size.

Directus licenseFree to $499/mo

Free with full access under the Open Innovation Grant; larger organizations get a capped free Core tier or pay for Team.

Exposure (reverse proxy or PaaS)Free (open source)

Traefik, Caddy, NGINX, Coolify, and Dokploy all self-host free.

Directus Self-Hosted System Requirements

source
CPU
0.25 vCPU required, 1 vCPU recommended (the Directus container itself)
RAM
512 MB required, 2 GB recommended (the Directus container itself)
Platform
Docker; the published figures are container resources, not the whole server

Official container floors from the self-hosting requirements page, which warns that under-provisioning is the common failure. PostgreSQL on the same box and large media libraries are what push a real server past them.