Skip to content

Self-host Directus

updated Jul 2026prices checked · Aug 2026Install verified on Ubuntu 26.04 · Jul 2026 · how we test

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~$55
You keep$245/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
Dockeryes
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.

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

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 Multi-Source-Copyleft License — free to self-host under $5M annual revenue, converts to GPL-3.0 four years after each release. 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

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.