Skip to main content
RapidDev - Software Development Agency

Migrating Directus to Code: The Complete Playbook (2026)

Directus is actively maintained, and your data already lives in your own PostgreSQL database — making this one of the more portable BaaS migrations available. The primary migration trigger is the Monospace Sustainable Core License (MSCL): organizations crossing $5M revenue or 50 employees owe a commercial license. Flows (visual automation) require rewriting as Edge Functions. Budget 6–10 weeks.

4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members

Migration snapshot

Active

Platform

a Directus

Company: Monospace Inc. License changed: OSS → BSL 1.1 (2023) → Monospace Sustainable Core License (MSCL) with v12 (May 2025). Free Innovation Grant for organizations under $5M revenue AND under 50 employees; every version converts to GPLv3 after 4 years. Cloud add-on is $99/mo; Core tier caps at 3 seats and 25 collections.

Typical timeline

6–10 weeks

Typical cost

$13K–$25K (agency, fixed)

Why teams leave a Directus

Directus is a solid, actively-developed platform with real self-host options. Teams migrate primarily when the MSCL license threshold approaches or when tier pricing outpaces the value delivered.

MSCL license trap at growth thresholds

If your organization crosses $5M revenue OR 50 employees, the Innovation Grant expires and you owe a commercial license. Cost is unknown until a sales conversation. For fast-growing companies, this is an unpredictable cost exposure.

Seat and collection limits on Core tier

Core tier caps at 3 seats and 25 collections. The Team tier (SSO, SCIM) costs $499/mo annual. For growing teams, these escalate faster than the value of staying on Directus.

SSO and SCIM gated behind Team tier

Any enterprise procurement requiring SSO immediately hits a $499/mo annual commitment — before a single technical conversation.

Directus Cloud manages the database on non-Enterprise tiers

Self-hosting with your own DB requires migrating to a Directus-managed instance on Cloud tiers below Enterprise. If you want genuine DB ownership on Directus Cloud, you pay Enterprise pricing.

Custom extension lock-in

Directus's extension system (hooks, endpoints, panels) uses Directus-specific APIs. Custom extensions require rewrite even though the underlying code is TypeScript/Node.js — the API surface is Directus-proprietary.

What can you actually take with you?

Data portability is Directus's strongest suit — your data already lives in your own SQL database. The schema moves as-is (or minimal changes); only Flows and user password hashes create migration friction.

AssetCan you export it?HowNotes
DataYesYour data lives in your own PostgreSQL/MySQL/SQLite database. Standard SQL dump at any time — Directus is a layer over your DB, not the DB itself.This is the best-case data portability story in the BaaS category. If on Directus Cloud, export the DB dump before account termination.
Code (custom extensions)PartialDirectus core is open source (MSCL, self-hostable via Docker). Custom hooks, endpoints, and panels are standard TypeScript/Node.js code that you wrote — portable to any Node.js environment.The Directus engine itself is not portable, but your custom extension code is. Expect API-surface rewrites, not full rewrites.
Design/UINoThe Directus admin UI is the platform's own interface. Your frontend application is separate code you own and is not affected.If you need an admin panel after migration, options include building a minimal Next.js admin or using an open-source admin over Supabase.
Logic/Workflows (Flows)PartialFlows (visual automation) are stored as JSON in your database — exportable as data via SQL dump. However, they execute only on the Directus runtime and require rewriting as Edge Functions or pg_cron.Export all Flows from Settings → Flows → Export. The JSON is your only record of automation logic outside the Directus UI.
Users & AuthPartialUser records live in your SQL database and are exportable via DB dump. Directus uses your own DB, so all user table rows come out with the dump.Password hash export is NOT documented — plan a forced password reset for end-users after migrating to the new auth provider.
Custom TypeScript endpoints and hooksYesTypeScript custom endpoints and hooks are standard code you wrote — portable to Next.js API Routes or Supabase Edge Functions.Directus-specific API calls within extensions (useLogger, useCollection, useDatabase) need to be replaced with Supabase equivalents, but the business logic is yours.

Swipe the table sideways to see the full breakdown.

Where each piece moves in code

The target stack is Next.js (App Router) + Supabase (PostgreSQL). Because Directus already uses your PostgreSQL schema, the data migration can be minimal — primarily swapping the API and automation layers.

a Directus

Directus collections (your PostgreSQL tables)

In code

Supabase / PostgreSQL tables (already yours — schema is portable as-is)

If already on PostgreSQL, the schema migration is minimal or zero. Verify column types and indexes; apply RLS policies.

a Directus

Directus REST/GraphQL API

In code

Supabase auto-generated REST/GraphQL API or custom Next.js API Routes

Supabase auto-generates REST and GraphQL from your schema; custom business logic goes into API Routes.

a Directus

Directus Flows (visual automation)

In code

Supabase Edge Functions (Deno) or GitHub Actions / pg_cron

Flows are stored as JSON config, not runnable code. Each Flow becomes an Edge Function or a pg_cron job — a rewrite, not a migration.

a Directus

Directus custom endpoints (TypeScript)

In code

Next.js API Routes or Supabase Edge Functions

Your TypeScript code is largely portable; replace Directus-specific APIs (useLogger, useDatabase) with Supabase SDK equivalents.

a Directus

Directus Auth (JWT)

In code

Supabase Auth or Clerk

User records migrate from your SQL dump; password hashes are not documented as exportable — plan a password-reset campaign.

a Directus

Directus panels and extensions (admin UI)

In code

React components in a Next.js admin section

Only needed if your team manages content via the Directus admin. Lightweight open-source admin UIs exist over Supabase as alternatives.

a Directus

Directus Cloud hosting

In code

Supabase (DB + Auth + Edge Functions) + Vercel (Next.js frontend/admin)

Standard two-service split; Vercel handles frontend and API Routes, Supabase handles data and auth.

The migration roadmap

A 6–10 week migration where the data move is the simplest phase (your DB is already yours) and the Flows rewrite is the primary technical effort. Inventory Flows and custom extensions in Phase 1 before touching anything else.

1

Audit & Backup

3–5 days
  • Dump the full SQL database immediately — if on Directus Cloud, this is not automatic; do it today and store independently
  • Export all Flows from Settings → Flows → Export as JSON
  • Inventory all custom hooks and endpoints (TypeScript files in your extensions directory)
  • Count active collections, seats, and installed third-party extensions
  • Check your organization's revenue and headcount trajectory vs the $5M/50-employee Innovation Grant thresholds

Watch out: On Directus Cloud non-Enterprise tiers, Directus manages your database. Export the dump before account termination — you cannot retrieve it after.

2

Schema Assessment

2–4 days
  • Review exported schema: if already PostgreSQL and self-hosted, migration may be minimal
  • Verify column types, indexes, and foreign key constraints for Supabase compatibility
  • Design RLS policies to replace Directus's permission system
  • Document all Directus GraphQL queries used by your frontend — these change when moving to Supabase GraphQL
3

Data Migration

3–5 days
  • If on Directus Cloud managed instance, import DB dump to Supabase PostgreSQL
  • If self-hosted on your own Postgres, point-migrate or use pg_dump → pg_restore to Supabase
  • Validate row counts and data integrity across all collections
  • Apply RLS policies and test access patterns with sample queries
4

Logic Port

2–4 weeks
  • Translate each Directus Flow to an Edge Function or pg_cron job (Flows do not run outside Directus runtime)
  • Port TypeScript custom endpoints to Next.js API Routes (replace Directus-specific APIs with Supabase equivalents)
  • List all third-party extensions and find or build replacements
  • Build or configure a lightweight admin panel if needed

Watch out: Flows are the primary cost center. A complex automation workflow with branching logic can take as long to rewrite as a significant feature.

5

Auth Migration & Cutover

1 week
  • Import user records from SQL dump to the new auth provider
  • Configure Supabase Auth or Clerk with the same OAuth providers
  • Prepare password-reset campaign (hashes not documented as portable)
  • Parallel run: verify API parity, update frontend to new endpoints, switch DNS

Three ways to migrate — honestly

Every path has a real trade-off. Here is what each costs, how long it takes, and where it bites.

DIY (self-directed with AI tools)

$0–500 + time

3–6 months part-time

Fits

Self-hosted Directus teams on their own PostgreSQL where the data move is near-zero — the remaining work is Flows rewrite and TypeScript endpoint porting.

Risks

Flows have no code-export — every automation must be manually reconstructed from the JSON export or by inspecting the Directus UI. Custom extension API rewrites are mechanical but time-consuming.

Freelancer

$4K–10K

6–10 weeks

Fits

Teams with moderate Flow complexity (10–30 automations) and a developer available to own the GraphQL schema update and ongoing maintenance.

Risks

Flows are the least standard part of a Directus migration — verify the freelancer understands the runtime difference, not just the JSON structure.

Agency (RapidDev)

Done-for-you

$13K–25K fixed

6–10 weeks

Fits

Teams approaching the $5M/50-employee threshold who need a predictable migration before license costs become a surprise, or teams with complex Flows and custom extension logic.

Risks

Minimal — fixed price with scope agreed upfront. Free scoping call available at rapidevelopers.com.

The real risks — and how to defuse them

Surprise commercial license cost as org grows

Mitigation: Calculate your organization's trajectory against the $5M revenue and 50-employee Innovation Grant thresholds. Budget for commercial license costs or plan migration before you cross the threshold — don't wait for the sales conversation.

Flows not portable outside the Directus runtime

Mitigation: Flows are stored as JSON config, not runnable code. Inventory all Flows before scoping — each one requires a rewrite as an Edge Function or pg_cron job, which can significantly affect timeline.

Directus Cloud DB lock on non-Enterprise tiers

Mitigation: On non-Enterprise Cloud tiers, Directus manages the database. Export the SQL dump independently and store it outside Directus before beginning migration or account termination.

GraphQL query schema changes break frontend clients

Mitigation: Directus-generated GraphQL and Supabase-generated GraphQL have different schema structures. Document all active GraphQL queries; plan an API compatibility layer or update all client queries before cutover.

Should you actually migrate?

Migrating is a real project. Sometimes staying is the right call — here is the honest split.

Stay if

  • You're a small team (under 50 people, under $5M revenue) using self-hosted Directus on your own PostgreSQL — you have maximum ownership at zero license cost under the Innovation Grant.
  • Your primary use case is headless CMS or content API with a non-technical content team — Directus's editor UI is genuinely superior for content workflows compared to building a custom admin.
  • You have custom TypeScript extensions that are working well — they're portable code, so migration cost is a mechanical API rewrite, not a design exercise.
  • You're self-hosting under the 4-year GPLv3 conversion window — your future-dated open-source exit path exists, even if it's not today.

Migrate if

  • Your organization is approaching $5M revenue or 50 employees and cannot accept uncertain commercial license costs in your financial planning.
  • Team or Enterprise tier pricing ($499+/mo) exceeds what your internal tool or content API workload justifies.
  • You want guaranteed open-source permanence now — MSCL is not GPL; the 4-year conversion is future-dated insurance, not today's reality.

Our honest verdict

Directus is a solid, actively-developed platform. The migration case is almost entirely about the MSCL license threshold — a legitimate business decision, not a platform-quality concern. If you're nowhere near the thresholds and self-hosting, it's hard to justify migration costs.

Do this today: pre-migration checklist

Whatever path you choose, protect yourself first. Work through this before you touch a line of code.

Dump your SQL database immediately

If on Directus Cloud, this is not automatic. Export the dump today and store it independently — you cannot retrieve it after account termination.

Export all Flows from Settings → Flows → Export

The JSON export is your only record of automation logic. Flows don't run outside the Directus runtime, so this file is the spec for every rewrite.

Inventory all custom TypeScript hooks and endpoints

These are your most portable assets — standard TypeScript that migrates to Next.js API Routes with API-surface rewrites, not full rewrites.

Count active collections, seats, and tier limits

Confirms whether you're already over Core tier limits and reveals how close you are to requiring a tier upgrade before migration is even complete.

Check your organization's trajectory vs the $5M / 50-employee Innovation Grant thresholds

The license cost exposure is the primary migration trigger. Know your timeline before it becomes a surprise financial event.

Document all Directus GraphQL queries used by your frontend

Supabase GraphQL schema differs from Directus GraphQL. Every active query must be updated at cutover — missing one causes production errors.

List all third-party extensions installed and verify replacements exist

Community extensions that rely on Directus-specific APIs don't port automatically — identify gaps before scoping the migration.

Frequently asked questions

Can I export my Directus data?

Yes — and it's the best-case data portability story in the BaaS space. Your data already lives in your own PostgreSQL, MySQL, or SQLite database. A standard SQL dump is all you need. If you're on Directus Cloud, export the dump before account termination — Directus manages the instance but the data is yours.

Is Directus shutting down?

No. Directus is actively maintained by Monospace Inc. as of 2026. The migration case is about the MSCL license — not platform survival. The license change from OSS to MSCL happened with v12 in May 2025; organizations under $5M revenue and under 50 employees continue on a free Innovation Grant. Every version converts to GPLv3 after 4 years.

What is the Directus MSCL license and why does it matter for migration?

The Monospace Sustainable Core License (MSCL), introduced with Directus v12 in May 2025, offers a free Innovation Grant to organizations under $5M revenue AND under 50 employees. Once you cross either threshold, you owe a commercial license — the cost of which requires a sales conversation. Teams planning for growth migrate before they reach the threshold to avoid an unpredictable license event.

Can I export Directus Flows (automations)?

Partially. Flows are stored as JSON in your database and can be exported from Settings → Flows → Export. However, Flows only execute on the Directus runtime — the JSON is a config, not runnable code. Each Flow must be rewritten as a Supabase Edge Function or pg_cron job in the migration.

How long does a Directus migration take?

Typically 6–10 weeks. Data migration is the fastest phase if you're already on PostgreSQL (it can be near-zero). The Flow rewrite and GraphQL schema update are the primary timeline drivers. A backend with many complex Flows can fill the 10-week end of that range.

What happens to my users' passwords during migration?

Password hash export from Directus to a new auth provider is not documented. Plan a forced password-reset campaign for all end-users. Collect user emails from your SQL dump and prepare magic-link or password-reset emails to send at cutover.

What's the target stack after migrating from Directus?

Next.js (App Router) + Supabase (PostgreSQL) is the standard target. Directus collections map to Supabase tables (minimal schema changes if already on PostgreSQL); Flows become Edge Functions or pg_cron jobs; TypeScript custom endpoints port to Next.js API Routes; Directus Auth migrates to Supabase Auth or Clerk.

How much does a Directus migration cost if I hire an agency?

RapidDev offers fixed-price Directus migrations at $13K–$25K over 6–10 weeks, covering data export, Flow rewriting, extension porting, auth migration, and cutover. A free scoping call at rapidevelopers.com helps size your specific backend before you commit.

RapidDev

We migrate no-code apps to production code

  • Fixed price — $13K–$25K (agency, fixed)
  • No data loss, no downtime
  • You own 100% of the code
Get a fixed-price quote

30-min call. Quote within 48 hours.

Still weighing your options?

Talk to a team that ships on all of these platforms. A free consultation gets you an honest recommendation for your specific project — even if the answer is a tool, not us.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.