Skip to content

Self-host Directus

updated Jul 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

Instant REST and GraphQL APIs plus a customizable admin app layered over any SQL database — a data platform for turning an existing or new database into a headless CMS/backend.

Firebase / yr$300
Self-hosted / yr~$283
You keep$17/yr
Pocket the difference — spin it up on a cheap VPS in minutes.Start free on Kamatera → (opens in new tab)

Key facts

LicenseMSCL-1.0
StackNode.js, TypeScript
Min RAM512 MB
Official imageyes
Measured idle RAM313 MB
Difficulty
Our recommendation

Pick Directus when you already have (or want) a plain SQL database and need instant REST/GraphQL APIs plus an admin app layered over it, rather than a new opinionated data store. It's the lightest-touch option here (512 MB, difficulty 2) if your data model is relational and you don't need Supabase's or Nhost's bundled auth-and-realtime stack.

Follow the Directus deploy guide →

What you need

  • Any VPS with at least 512 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install with Docker Compose

Save this as compose.yml and run docker compose up -d:

# Directus — official image with a Postgres backend
services:
  database:
    image: postgis/postgis:16-master
    environment:
      POSTGRES_USER: directus
      POSTGRES_PASSWORD: changeme
      POSTGRES_DB: directus
    volumes: ["./data/database:/var/lib/postgresql/data"]
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "directus"]
      interval: 10s
      timeout: 5s
      retries: 5
  directus:
    image: directus/directus:latest
    ports: ["8055:8055"]
    volumes: ["./uploads:/directus/uploads"]
    depends_on:
      database:
        condition: service_healthy
    environment:
      SECRET: replace-with-a-long-random-value
      ADMIN_EMAIL: admin@example.com
      ADMIN_PASSWORD: changeme
      DB_CLIENT: pg
      DB_HOST: database
      DB_PORT: 5432
      DB_DATABASE: directus
      DB_USER: directus
      DB_PASSWORD: changeme
# docker compose up -d  →  http://SERVER_IP:8055

What you take on

Directus is easy to run, but its licence is the first thing to get right before you build on it:

non-negotiableIt's MSCL-1.0, not OSI-approved open source. Directus relicensed from BSL to the Monospace Sustainable Core License — the free self-hosted Core tier is capped at 3 seats and 25 collections unless you qualify for the Open Innovation Grant (under $5M revenue and fewer than 50 employees), and each release converts to GPL-3.0 four years on. Larger orgs should read the licence text, not assume MIT/Apache terms.
non-negotiableIt layers on your database, it doesn't replace it. Directus's own tables plus your schema live in the same Postgres/MySQL instance — back that database up like any production database, because Directus has no separate data store of its own.
non-negotiableAdmin-app access is powerful by design. The same app that builds your API also edits data and permissions directly — lock down roles deliberately before you invite collaborators in.

An alternative to

Head-to-head

More in Backend & BaaS

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.