Your SQL Database Already Holds the Truth — Wrap It in an API You Own
Most teams do not suffer from a shortage of databases. They suffer from the brittle glue code, admin dashboards, and per-seat SaaS wrappers piled on top of clean relational tables.
Directus reverses that equation by sitting directly over your existing SQL database—PostgreSQL, MySQL, MariaDB, SQLite, MS SQL Server, CockroachDB, or OracleDB—and reflecting every table, column, and foreign key into live REST, GraphQL, and MCP endpoints within seconds. Your schema stays native, your rows never leave your server, and non-technical operators gain a visual Studio without you hand-rolling CRUD forms.
Relational integrity works automatically across one-to-many, many-to-many, and polymorphic many-to-any associations because Directus reads foreign-key constraints directly from the database catalog. Instead of maintaining a fragile sync worker between a headless SaaS CMS and your application database, both human editors and backend services read and write the exact same source of truth.
Every modern engineering team eventually hits the same architectural fork: keep bolting proprietary SaaS backends onto your stack, or host one unified data layer directly atop SQL you already trust. When you deploy Directus on a VPS under your own root control, the database stops being locked behind vendor UIs and becomes an instant, policy-governed API platform.
Because the official container image ships all optional database drivers and runtime dependencies out of the box, bootstrapping takes a single verified configuration rather than hours of dependency debugging. A minimal container fits inside 0.25 vCPU and 512 MB of RAM for light prototypes, while a 2 vCPU / 4 GB RAM / 50 GB disk VPS gives production teams comfortable headroom for concurrent Studio editors, image transformations, and heavy GraphQL joins.
Beyond automatic REST and GraphQL generation, Directus exposes four native extension points inside the exact same runtime: custom API endpoints, database lifecycle hooks, custom Studio field interfaces, and full-page Studio modules. Teams never hit a dead end when standard CRUD endpoints need bespoke domain validation, payment webhooks, or specialized internal dashboards.
Once the instance boots, you can verify database introspection, API health, and active extensions immediately from any terminal or CI check before opening Studio to teammates.
# Verify live Directus container health and introspected runtime info
curl -fsS https://your-instance.example.com/server/health
curl -fsS https://your-instance.example.com/server/info | jq '{ version: .data.project.directus_version, project_name: .data.project.project_name }'
The sections below walk through why rented backends break at modest team scale, four real production workflows with concrete SQL and API snippets, live security and domain routing mechanics from the instance control panel, and the exact export architecture that keeps you portable.
Why Rented SaaS Backends Break Small Teams First
Hosted headless CMS platforms and low-code database clouds sell speed on day one. By month six, however, the operational friction shifts from building features to working around artificial boundaries set by someone else's product roadmap.
Small teams feel those constraints harder than enterprises because they lack dedicated platform engineers to build sync workers around every limitation. Three structural bottlenecks show up repeatedly across indie products, agencies, and internal tooling teams.
1. Per-Seat Metering Punishes Cross-Functional Collaboration
A healthy product operation involves more than three backend engineers. Product managers inspect order flags, support leads check customer records, copywriters draft release notes, and automated agents query inventory.
When a SaaS backend meters every collaborator seat or role tier, teams resort to dangerous workarounds. People share static admin logins, pass CSV files over chat, or build brittle Slack bots just to avoid adding another named user to the dashboard.
Self-hosting Directus eliminates collaborator rationing at the infrastructure layer. You create granular roles and field-level policies for editors, contractors, warehouse staff, and automated MCP clients without asking a vendor permission to invite one more person.
That freedom changes how teams model internal workflows. Instead of restricting dashboard access to a tiny administrative clique, you can grant regional editors, finance reviewers, and external translators tightly scoped views over the exact rows they own.
Temporary contractors and seasonal reviewers illustrate why seat-free access matters operationally. Rather than sharing a dangerous super-admin account or exporting sensitive CSV spreadsheets over email, you spin up a role-restricted login with an expiration date and revoke it in one click when the engagement ends.
2. Schema You Do Not Control Creates Permanent Translation Tax
Proprietary backend services rarely store your data as clean, idiomatic SQL tables with standard foreign-key constraints. Instead, they wrap records inside nested JSON documents, custom field IDs, and opaque internal identifiers.
That abstraction looks harmless until you need a multi-table aggregate report, a batch backfill in SQL, or a direct BI connection from Metabase or Grafana. Suddenly your own operational data requires an ETL pipeline just to answer basic relational questions.
Directus does not invent a proprietary storage engine or hide your rows inside an undocumented blob. Your columns keep standard SQL types, your indexes remain pure SQL indexes, and Directus tracks its UI presentation metadata in separate directus_* tables.
Bulk operations show the contrast clearly. Running a backfilling UPDATE across fifty thousand rows takes milliseconds in native PostgreSQL, whereas pushing the same batch through a rate-limited cloud API forces paginated HTTP loops and retry queues.
3. API Rate Limits and Payload Throttling Hurt Real Traffic
Cloud CMS and backend vendors enforce strict burst ceilings, request-per-second caps, and monthly API call quotas to protect multi-tenant clusters. A legitimate storefront traffic spike, a static site rebuild across four thousand pages, or an AI indexing job can trigger HTTP 429 responses at the worst possible moment.
On your own 2 vCPU / 4 GB VPS, throughput is bounded by real hardware and database indexing rather than arbitrary tenant quotas. When a query slows down, you add a composite SQL index, adjust connection pooling, or attach an optional Redis instance for horizontal scaling.
Predictable local latency also changes frontend engineering choices. Static site generators and mobile clients can fetch deeply nested relational payloads or run filtered aggregations in parallel without tripping vendor burst-window penalties mid-deploy.
4. Multi-Tenant Residency Complicates Privacy and Audit Compliance
European and US teams handling customer records, order histories, or partner contracts face strict expectations around where data resides and who can inspect it. Storing operational tables inside shared multi-tenant SaaS clouds adds subprocessor layers and opaque log retention policies.
Hosting Directus on a VPS you control keeps every SQL row, authentication session, and uploaded media file inside a single-tenant server boundary. You decide the region, encrypt traffic end-to-end with your own domain certificate, and inspect every system revision directly in SQL.
Audit teams also appreciate that Directus stores user actions, IP metadata, and field-level diffs inside standard relational tables. Exporting an access-history report for a quarterly security review requires a single SQL query rather than filing a support ticket with a SaaS vendor.
"The moment your business logic lives inside a vendor's proprietary schema and rate-limited API gateway, you no longer own your backend—you rent access to your own records. Wrapping standard SQL on a VPS you control flips that dependency permanently."
Moving away from rented SaaS backends is not about nostalgia for managing Linux packages by hand. It is about keeping your canonical SQL schema portable, enforcing policy down to individual columns, and controlling when and how upgrades ship.
Four Production Workflows Directus Solves Out of the Box
Abstract architecture diagrams only matter when they survive real production requirements. Below are four end-to-end workflows showing how small engineering and operations teams attach Directus to SQL databases they already own and ship faster without SaaS glue code.
Each workflow uses native Directus primitives—SQL introspection, field-level access policies, storage adapters, Flows, custom extensions, and the built-in MCP server—running inside a single self-hosted container.
Workflow 1: Storefront Product Catalog and Live Inventory Over PostgreSQL
Modern e-commerce storefronts need crisp product pages, filtered collection queries, and accurate stock counts without maintaining a separate CMS copy of every SKU. By pointing Directus at your PostgreSQL catalog schema, your storefront queries live inventory through GraphQL while merchandisers edit descriptions and media inside the visual Studio.
Media assets route through Directus's storage-adapter pattern, letting you start on local VPS disk and switch to any S3-compatible bucket via environment variables when image volume grows. Built-in query parameters handle on-the-fly resizing and WebP conversion without deploying a separate media proxy.
Notice how little glue code this requires. Your storefront executes a single typed GraphQL request against /graphql while Directus compiles the field selection into parameterized SQL and strips unauthorized columns before serialization.
Because the tables remain pure PostgreSQL, your checkout worker can decrement available_qty inside an ACID database transaction while Directus serves updated counts immediately. Switching media storage from local disk to S3-compatible object storage takes four environment variables.
You can also define named transformation presets—such as card-thumb or pdp-hero—so storefront templates never expose arbitrary image-resizing parameters that bots could abuse to spike CPU. Asset responses carry clean cache headers ready for any edge CDN sitting in front of your custom domain.
-- Standard PostgreSQL DDL introspected directly by Directus
CREATE TABLE products (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
slug text UNIQUE NOT NULL,
title text NOT NULL,
status text NOT NULL DEFAULT 'draft',
cost_cents integer NOT NULL, -- Hidden from public storefront policy
supplier_id integer NOT NULL -- Restricted to purchasing role only
);
# Storefront GraphQL query against introspected PostgreSQL tables
query ActiveCatalog($category: String!) {
products(filter: { status: { _eq: "active" }, category: { slug: { _eq: $category } } }, limit: 24) {
id
slug
title
hero_image { id, width, height }
skus {
sku_code
retail_cents
inventory_levels { available_qty }
}
}
}
Merchandising copy lived in a SaaS CMS while stock counts sat in PostgreSQL. Webhook drift caused out-of-stock SKUs to stay purchasable until nightly cron jobs reconciled both systems.
Copy, pricing, and inventory live in one PostgreSQL schema on your VPS. Storefront GraphQL reads live stock with field-level masking on cost columns, while merchandisers edit safely in Studio.
Workflow 2: Internal Ops Console Layered Over a Legacy SQL Database
Every established business runs critical workloads on an older MySQL, MariaDB, or MS SQL Server database that nobody dares rewrite. Support agents still ask engineering to run manual SQL updates for refunds, address corrections, or account overrides because no internal admin UI exists.
Directus attaches cleanly to that existing database without renaming your primary keys, breaking legacy stored procedures, or touching existing indexes. It stores UI layout preferences, saved bookmarks, and role policies in dedicated directus_* system tables while leaving business tables structurally untouched.
When an ops lead updates a refund state in Studio or via a custom module extension, Directus records the exact actor, timestamp, and before/after field diff in directus_revisions. A custom TypeScript hook can intercept items.update on refund_requests to trigger your payment gateway refund call and enforce business invariants before committing.
Operators can also save queue presets directly in Studio—such as "Pending High-Value Refunds" or "Delayed Carrier Shipments"—without asking engineering to deploy frontend React views. If support needs a specialized button to re-dispatch a warehouse label, a custom interface or endpoint extension plugs straight into the same Directus container.
For legacy databases containing sensitive financial tables, you can even expose read-only SQL views alongside writable operational collections. Directus surfaces those views in Studio Insights dashboards for live reporting without granting write paths to underlying ledger rows.
// Custom Directus hook extension: validate refund transitions against legacy SQL
export default ({ filter, action }) => {
filter('refund_requests.items.update', async (payload, meta, { database }) => {
if (payload.status !== 'approved') return payload;
const [order] = await database('orders').where({ id: meta.keys[0] }).select('settled_cents');
if (!order || order.settled_cents <= 0) {
throw new Error('Cannot approve refund on unsettled legacy order.');
}
return payload;
});
};
Support engineers filed Jira tickets asking developers to run raw UPDATE queries in production psql shells, leaving zero standardized audit trail and consuming hours of engineering time weekly.
Support leads filter legacy orders in Directus Studio, see only permitted columns, trigger validated refund hooks, and leave an automatic revision log with zero changes to legacy batch scripts.
Workflow 3: Headless Content API and Rebuild Pipeline for Static Sites
Content-heavy documentation portals, multi-brand marketing sites, and editorial blogs thrive on structured relational blocks rather than giant Markdown blobs. Directus lets editors compose modular page sections using native many-to-any (M2A) relationships, preview drafts against staging branches, and publish on your own domain over HTTPS.
Because Directus Flows are built right into the core container, publishing an article can automatically dispatch a signed webhook to GitHub Actions, Cloudflare Pages, or an incremental static regeneration endpoint. There is no external workflow subscription required just to trigger a rebuild.
Static frameworks fetch deeply nested blocks in a single REST request by specifying exact relational paths in the fields parameter. That keeps build times fast and avoids over-fetching unused columns across thousands of pages.
Draft previews work cleanly with zero duplicate infrastructure. You assign your preview deployment a static token whose policy permits status IN ('draft', 'published'), while your production CI build token reads only status = 'published'.
Multilingual editorial teams benefit from Directus's native translations interface on the same relational model. Storing localized headlines and body fields in a clean pages_translations child table lets editors translate side-by-side in Studio while static builds query specific language codes in a single API call.
# Fetch published landing pages with nested polymorphic content blocks
curl -sS "https://cms.yourdomain.com/items/pages\
?filter[status][_eq]=published\
&fields=slug,seo_title,meta_desc,sections.collection,sections.item.*\
&sort=sort_order" \
-H "Authorization: Bearer $DIRECTUS_BUILD_TOKEN"
# Sample Flow webhook body dispatched to CI when status changes to published
{
"event": "pages.items.update",
"collection": "pages",
"keys": ["1042"],
"payload": { "status": "published", "slug": "self-host-directus" }
}
Parallel static builds throttled against multi-tenant API quotas, forcing engineers to build local JSON caches and pay overage fees whenever marketing edited high-traffic pages.
CI runners pull clean relational JSON directly from your dedicated VPS at full local database speed, with Flows webhooks coordinating every publish cycle.
Workflow 4: Policy-Gated AI Agent Operations via Native MCP Server
Connecting AI coding and triage agents to live production data usually forces an uncomfortable choice: hand the agent a broad database password, or spend weeks writing bespoke REST wrappers for every prompt. Directus ships a native Model Context Protocol (MCP) server built right onto the same access-control engine that governs human users.
Instead of inventing a shadow permission system for bots, you assign each AI agent a dedicated Directus role and policy. An agent reading customer support queues can inspect ticket bodies and write draft replies while remaining cryptographically blocked from reading payout IBANs or deleting historical records.
Every write performed by an MCP agent passes through Directus validation rules and activity logging just like a human click in Studio. If an agent hallucinates an out-of-policy mutation, the core engine rejects it before SQL execution.
Even if an upstream prompt injection tries to coerce the assistant into dumping unrelated collections or altering billing fields, the policy AST enforced inside Directus never grants access beyond the token's declared role. Operators review agent-authored ai_draft_reply values right inside Studio before any customer message leaves your system.
Best practice is issuing one narrow MCP token per agent workflow rather than reusing a single broad automation key. A support-triage token sees open tickets only, whereas a catalog-enrichment token sees product descriptions and alt-text fields without touching customer tables at all.
# Example MCP client configuration targeting your HTTPS Directus instance
{
"mcpServers": {
"directus-ops": {
"url": "https://api.yourdomain.com/mcp",
"headers": {
"Authorization": "Bearer ${DIRECTUS_MCP_AGENT_TOKEN}"
}
}
}
}
Teams wired LLM agents directly to read-only SQL replicas or custom Python microservices, exposing sensitive PII columns and breaking whenever table names evolved.
Agents connect over Directus's native MCP endpoint under strict row and column policies, writing drafts back into Studio for fast human sign-off.
Operational Readiness & Request Architecture at a Glance
Understanding how Directus behaves under load starts with tracing a single request from TLS termination down to SQL compilation. Because the container ships all optional database drivers and core extensions in one image, operational complexity stays flat as your schema grows.
The two infographics below map the runtime request pipeline and SQL engine readiness across the seven LTS database families Directus supports.
Operational Readiness Scorecard
Teams evaluating self-hosted backends care about six day-two engineering dimensions: schema safety, permission granularity, API completeness, extensibility, container footprint, and exit portability. The grid below summarizes how Directus scores across those production gates.
Zero proprietary wrapper tables over your data; existing SQL clients and BI tools keep querying undisturbed.
Restrict read, create, update, and delete permissions by row condition and individual field for humans and bots.
Register custom endpoints, lifecycle hooks, field interfaces, and full Studio modules inside the same runtime.
Container boots on 0.25 vCPU / 512 MB minimum, while 2 vCPU / 4 GB handles image transforms and concurrent Studio sessions comfortably.
AI assistants connect via the built-in MCP server under identical row filters, column allowlists, and revision audits as humans.
Standard pg_dump archives, YAML schema snapshots, and docker-compose.yml move between hosts without lock-in.
Notice what happens when you scale beyond a single container. Most teams run comfortably on one 2 vCPU / 4 GB VPS for years, keeping Redis completely disabled so there is one fewer stateful service to monitor.
When traffic eventually justifies two or more stateless Directus containers behind a load balancer, attaching Redis flips schema cache sync, distributed rate limiting, and real-time WebSocket pub/sub across nodes in minutes without refactoring your SQL schema.
Choosing the Right SQL Engine for Your Deployment
Although Directus supports seven LTS SQL dialects uniformly, choosing the right engine shapes your long-term tuning options. PostgreSQL remains the default recommendation for new greenfield projects thanks to native UUIDs, JSONB indexing, transactional DDL, and mature backup tooling.
MySQL and MariaDB fit smoothly when your team already runs managed LAMP or WooCommerce workloads and wants Directus Studio layered on top without migrating data. SQLite excels for single-node embedded sites, internal prototypes, and read-heavy documentation portals where zero external database processes keep memory overhead minimal.
For regulated enterprises already standardized on MS SQL Server, CockroachDB, or OracleDB, Directus acts as an immediate GraphQL and Studio bridge over existing data warehouses. Instead of commissioning a custom middleware team, engineers expose vetted collections through strict field-level policies in a single afternoon.
Platform Depth: Raw Unmanaged VPS vs. Managed Instance Control Plane
Running Directus yourself does not require hand-compiling Node dependencies or nursing Nginx config files at midnight. The real split in operational workload sits between provisioning a naked Linux server from scratch and launching a verified Directus instance with built-in telemetry, domain routing, and brute-force protection.
Think about where engineering hours actually go over twelve months of production uptime. Spinning up Docker Compose takes twenty minutes on day one, whereas certificate renewals, auth-log monitoring, container crash recovery, and staging clones tax your team every single month afterward.
Inside the Instance Control Panel: Every Tab Tied to Directus
On deployinstant.com, the Directus verified template provisions a 2 vCPU / 4 GB RAM / 50 GB disk instance wrapped in a focused operations panel. Each control-panel tab removes a specific class of manual Linux maintenance around your Directus deployment.
SSE Security Tab — Active Protection for Exposed APIs: Real-time security monitoring runs by default on every instance without installing Fail2ban or tuning log shippers. A system daemon starts automatically at boot, restarts itself if interrupted, and streams an authenticated Server-Sent Events (SSE) feed of security events straight to the panel.
That daemon tails the host auth log for SSH brute-force attempts and attack bursts, flags CPU or memory surges before API latency climbs, and sends quiet alerts to Telegram or email—throttled so an active probe cannot flood your inbox. Because a public Directus REST, GraphQL, or /auth/login endpoint attracts automated scanners the moment DNS propagates, having zero-setup brute-force detection and resource-spike alerts on the box turns security monitoring into a one-click alert destination choice.
Resource-surge warnings solve a subtler failure mode specific to self-hosted APIs. When an unauthenticated GraphQL client or a misconfigured integration triggers deep nested joins against an unindexed table, the SSE daemon flags CPU and RAM spikes immediately so you can add an index or tighten a rate limit before Studio editors feel latency.
Domain Tab — Clean HTTPS for Studio, GraphQL, and MCP: Every instance starts with an auto-managed default subdomain backed by a managed A record (TTL 300) so you can log into Directus Studio immediately. When you are ready for production traffic, the Domain tab shows exact values to point a single A record at your registrar—or delegate nameservers—complete with a live DNS check button and auto-renewing free SSL.
Terminating HTTPS cleanly in front of Directus matters more than cosmetic branding. Both static site webhooks and AI MCP clients require valid TLS certificates on your custom hostname, and automatic renewal prevents silent certificate expirations from breaking storefront checkouts.
In practice, you verify your catalog or ops tables on the managed subdomain first, then point api.yourdomain.com or studio.yourdomain.com using the exact A record displayed in the Domain tab. Once the DNS check button confirms propagation and SSL activates, updating Directus's PUBLIC_URL ensures OAuth callbacks, password-reset links, and S3 asset signatures resolve cleanly under your own domain.
Live Overview, Ops & Health, and Activity History: From the Overview tab you inspect live CPU and RAM cards, copy the public IP or SSH command, open the Studio URL, or run clean stop/restart controls. Under Ops & Health, auto-healing restarts crashed services automatically while opt-in auto-updates let conservative teams pin Directus releases during critical launches; meanwhile, the Activity tab preserves an exact chronological record of start, stop, and reboot executions.
That chronological Activity log eliminates guesswork during incident reviews across small teams. Instead of wondering whether a teammate restarted the server or a watchdog recovered a stalled process, operators see exact provider-level start, stop, and reboot events exactly as they executed.
On the Ops & Health tab, separating auto-healing from opt-in auto-updates gives engineering leads precise control over stability versus patch velocity. You leave auto-healing permanently active so unexpected process exits recover automatically, while keeping auto-updates opt-in until staging checks pass.
Clone, Notes, and Honest Backups: Before testing a major Directus extension or relational migration, Clone to New Instance spins up a separate copy while per-instance notes hold environment-specific reminders for teammates. Note one important transparency detail on the Backups tab: provider-side snapshots and one-click restore are currently listed as coming soon, so scheduled SQL exports (pg_dump or mysqldump) and compose backups remain the verifiable recovery path today.
Cloning turns risky database upgrades into low-stress routines. You clone production to a temporary instance, test your ALTER TABLE migration or new TypeScript hook against realistic row counts, record the checklist inside per-instance notes, and destroy the clone once production rolls forward cleanly.
Day-One Launch Sequence on the Control Panel
Going from fresh VPS provisioning to a locked-down production Directus endpoint follows four quick panel steps. First, launch the verified 2 vCPU / 4 GB Directus template and verify Studio loads on the auto-managed default subdomain with TTL 300.
Second, open the SSE Security tab and pick Telegram or email as your quiet alert destination so brute-force bursts and CPU or memory surges trigger throttled notifications right away. Third, visit the Domain tab, add the single A record at your registrar, click the DNS check button, and confirm automatic SSL is active.
Fourth, lock down initial admin credentials, configure your first field-level policies for editors and API tokens, and verify a scheduled SQL dump script writes cleanly to off-box storage. Once those four checks pass, your team owns a production-grade API layer with predictable day-two maintenance.
Operational Comparison: Raw Unmanaged Server vs. Managed Instance
The table below compares twelve operational dimensions across a raw unmanaged VPS and a panel-managed Directus instance, focusing strictly on engineering workflow rather than pricing.
| Operational Dimension | Raw Unmanaged Server | Managed Directus Instance |
|---|---|---|
| Deployment speed | Manual OS hardening, Docker setup, reverse proxy wiring, and env tuning before Studio boots. | Verified 2 vCPU / 4 GB Directus template launches ready on a managed subdomain with HTTPS. |
| IT overhead | Ongoing shell maintenance for Nginx configs, firewall rules, log rotation, and daemon restarts. | Power controls, live CPU/RAM cards, DNS check button, and opt-in updates live in one browser panel. |
| Continuity / auto-healing | Requires writing custom systemd unit restart policies and external uptime probes yourself. | Built-in auto-healing plus boot-persistent security daemon and instant Clone to New Instance for staging. |
| Data protection | DIY cron scripts for pg_dump, volume tarballs, and off-box object sync. |
Standard SQL dumps and compose exports verified today; panel snapshots/restore explicitly coming soon. |
| Security / GDPR posture | Data residency on your VPS, but Fail2ban, SSH log alerts, and TLS ciphers depend on manual config. | Single-tenant VPS residency paired with default SSE brute-force detection and auto-renewed HTTPS. |
| Operational predictability | Silent disk fill, expired certs, or unmonitored memory spikes surface only when API clients fail. | Resource spike warnings flag CPU/RAM surges early; Activity tab logs every power action chronologically. |
| Self-service onboarding | New teammates need SSH keys, docker-compose docs, and server IP spreadsheets to inspect health. | Shared Overview cards, per-instance notes, and live activity feed onboard operators without root guesswork. |
| Maintenance friction | Every Directus release or OS security patch requires SSHing in to pull images and watch logs. | Opt-in auto-updates handle routine patches when enabled, or stay paused during release freezes. |
| Vendor independence / export | Full portability via raw SQL dump and Docker Compose files stored on disk. | Identical full portability: standard SQL database, docker-compose.yml, and SSH access stay yours. |
| Day-2 load over 12 months | Cumulative drift across custom scripts, Certbot hooks, and ad-hoc hotfixes slows handoffs. | Consistent template baseline keeps day-365 upgrades, cloning, and security monitoring uniform. |
| Custom domain & SSL routing | Manual DNS record guessing, Nginx/Caddy configuration, and ACME challenge troubleshooting. | Domain tab displays exact A record (TTL 300) or nameserver values, verifies DNS, and renews free SSL. |
| Brute-force & spike telemetry | Invisible unless you manually deploy fail2ban, Prometheus, and custom Telegram alert scripts. | Live SSE Security tab catches SSH bursts and CPU/RAM spikes out of the box with throttled alerts. |
Strategic Freedom, Source-Available Licensing, and Zero Lock-In
Every infrastructure decision eventually faces an exit test: if you decide to move your workload off a provider or swap out your admin layer three years from now, how painful is the extraction? With proprietary SaaS backends, extraction means writing custom paginators against throttled endpoints, remapping nested JSON blobs back into normalized tables, and re-uploading every binary asset.
Self-hosting Directus on a VPS you control avoids that trap at both the storage layer and the orchestration layer. Because your canonical records stay in standard SQL tables and your uploaded files live in a local directory or S3-compatible bucket you own, leaving requires zero data transformation.
Schema Separation Without Data Mangling
When Directus boots against your database, it reads your existing information_schema catalog and creates a clean set of system tables prefixed with directus_. Those tables store Studio display templates, saved presets, Flows definitions, webhooks, revision diffs, and field-level access policies.
Your own application tables—customers, orders, products, or articles—retain their native column types, check constraints, triggers, and indexes. Any SQL migration tool, Rails or Prisma worker, or analytics warehouse connected to the same database continues functioning without knowing Directus exists.
Exact Licensing Clarity: MSCL 1.0 Source-Available Model
Teams planning long-term self-hosted infrastructure deserve unambiguous licensing facts rather than vague marketing labels. Starting with Directus 10, Directus core transitioned from GPL to a BSL-style license and is now source-available under the Monospace Sustainable Core License (MSCL) 1.0, derived from the Fair Core License.
Under that structure, Directus maintains a free core tier for everyone alongside an Open Innovation Grant that makes it free for organizations under $5M in annual revenue and 50 employees. Above those thresholds—when running advanced or enterprise features—a commercial license applies, while the source remains public and includes a scheduled change date that converts covered code to a GPL-compatible license.
For indie developers, agencies, and growing product teams below those thresholds, this license guarantees predictable self-hosting rights without surprise seat metering or locked source repositories. Even as an organization scales past the grant ceiling, the time-delayed conversion to a GPL-compatible license ensures the underlying codebase remains auditable and durable.
Verifiable Export & Backup Workflow Today
Because panel-side snapshot restores on the Backups tab are still marked as coming soon, disciplined operators treat database dumps and Compose manifests as their primary recovery chain. Running a consistent backup script via cron or SSH takes five lines and guarantees you can restore onto a fresh clone or a different provider within minutes.
In addition to full database dumps, Directus provides a native schema snapshot command that exports collection definitions, relationships, and field metadata into a clean YAML file you can commit alongside application code in Git. Before applying staging schema edits onto production, running a dry-run diff catches renamed fields or destructive column drops early.
# 1. Export consistent PostgreSQL dump (includes app tables + directus_* metadata)
docker compose exec -T postgres pg_dump -U directus -Fc directus_prod > backups/directus_$(date +%F).dump
# 2. Capture declarative Directus schema snapshot and inspect diffs before applying
docker compose exec -T directus npx directus schema snapshot --yes /directus/snapshots/schema.yaml
docker compose exec -T directus npx directus schema diff /directus/snapshots/schema.yaml
# 3. Archive Compose definition, env configuration, custom extensions, and local uploads
tar -czf backups/directus_stack_$(date +%F).tar.gz docker-compose.yml .env extensions/ uploads/
Restoring that stack onto a freshly cloned staging instance or a bare-metal server takes under five minutes. You load the custom-format SQL dump with pg_restore, extract the extensions and compose files, and start Directus—recovering every user role, field-level policy, Flow automation, and business record identically.
Custom extensions stay just as portable as your database rows. Because custom endpoints, lifecycle hooks, field interfaces, and Studio modules compile into standard Node/ESM packages inside the mounted extensions/ directory, checking them into Git guarantees your business logic never gets trapped inside proprietary cloud scripts.
Storage independence completes the exit story. By configuring Directus's storage adapter against any S3-compatible provider—or keeping files on a dedicated local mount synced via rclone—you avoid proprietary asset CDNs that rewrite URLs or hold media hostage during migrations.
Put together, standard SQL tables, declarative YAML schema snapshots, Git-tracked extensions, and portable object storage mean your organization never faces a forced platform rewrite. Directus earns its place in your stack through daily developer and editor utility rather than lock-in.
When you also want horizontal scaling across multiple Directus containers behind a load balancer, you do not have to abandon this simple layout. Attaching an optional Redis service via environment variables coordinates distributed rate limiting, schema cache invalidation, and WebSocket events across replicas while keeping the exact same PostgreSQL and S3 storage backbone.
# Minimal production docker-compose.yml snippet (Redis added only if scaling horizontally)
services:
directus:
image: directus/directus:latest
restart: unless-stopped
ports:
- "127.0.0.1:8055:8055"
environment:
DB_CLIENT: pg
DB_HOST: postgres
DB_DATABASE: directus_prod
STORAGE_LOCATIONS: s3
STORAGE_S3_DRIVER: s3
REDIS: "redis://redis:6379" # Optional: omit on single-node 2 vCPU / 4 GB VPS
Frequently Asked Questions
Common architectural, licensing, security, and day-two operational questions from teams moving internal tools and content APIs onto self-hosted Directus.
1. Can Directus wrap our existing SQL database without rewriting tables or breaking legacy apps?
Yes. Directus supports LTS releases of PostgreSQL, MySQL, MariaDB, SQLite, MS SQL Server, CockroachDB, and OracleDB, and introspects existing tables non-destructively.
Your business tables keep their original column names, primary keys, and foreign-key constraints, while Directus isolates its UI layouts, Flows, and access policies inside prefixed directus_* tables.
Existing applications, cron workers, and analytics tools continue reading and writing directly to the SQL engine with zero schema translation or dual-write lag.
2. How does the MSCL 1.0 source-available license work for small teams and growing companies?
Directus core is source-available under the Monospace Sustainable Core License (MSCL) 1.0, a BSL-style license derived from the Fair Core License that replaced GPL starting with Directus 10. Source code stays public and converts to a GPL-compatible license at each release's scheduled change date.
There is a free core tier for everyone, and under the Open Innovation Grant it remains free for organizations with under $5M in annual revenue and fewer than 50 employees. Commercial licensing applies only above those thresholds when deploying advanced or enterprise capabilities.
3. What VPS resources does Directus need, and is Redis required on day one?
The Directus container boots on a minimum of 0.25 vCPU and 512 MB RAM, with 2 vCPU / 2 GB recommended upstream and a 2 vCPU / 4 GB RAM / 50 GB disk baseline used on the verified template. The official Docker image already bundles all optional database drivers and runtime dependencies.
Media uploads use Directus's storage-adapter pattern, so you can begin on local filesystem volumes and switch to S3-compatible object storage via environment variables whenever asset volume grows.
Redis is completely optional on a single VPS deployment. You only need to introduce Redis when scaling Directus horizontally across multiple stateless containers that must share cache invalidation and rate-limit state.
4. How does the SSE Security tab protect an exposed Directus API from brute-force and surge risks?
Every instance runs a boot-persistent, self-restarting security daemon out of the box—streaming an authenticated SSE feed of host events, watching auth logs for SSH brute-force bursts, and detecting CPU or memory surges before your API slows down.
Alerts route quietly to Telegram or email and are automatically throttled so an ongoing bot scan cannot spam you. You configure zero log parsers; you only choose where quiet alerts land.
Having live auth-log telemetry and surge warnings already active keeps your public Directus REST, GraphQL, and Studio endpoints defended from day one without manual Fail2ban tuning.
5. How do we serve Directus Studio, REST, and GraphQL on our own custom domain with HTTPS?
Instances start on an auto-managed default subdomain backed by a managed A record (TTL 300), so Studio is reachable right after launch. To switch to your own hostname, open the Domain tab to view exact DNS values and add a single A record at your registrar or delegate nameservers.
Once propagation passes the panel's DNS check button, free SSL certificates issue and renew automatically in front of Directus Studio, REST, GraphQL, and MCP routes.
6. Are automated panel snapshots live on the Backups tab, or how should we verify backups today?
Provider-side snapshots and one-click restores are currently marked as coming soon on the Backups tab, so you should not rely on panel snapshots for recovery yet.
Today, the verifiable backup workflow is scheduled SQL dumps (pg_dump or mysqldump) paired with your docker-compose.yml, extension code, and local uploads/ or S3 bucket sync—plus Clone to New Instance before testing risky schema updates.
7. How can AI agents read and update Directus records safely through the native MCP server?
Directus includes a native Model Context Protocol (MCP) server that respects the same policy-based access control engine used by Studio editors and frontend API keys.
You assign each agent a dedicated role and field-level policy—allowing it to query open support tickets or draft summary fields while blocking access to private billing columns and destructive delete operations—with every action recorded in the activity audit trail.
Because policies evaluate at the query AST layer before SQL execution, prompt injections cannot trick an MCP session into exposing restricted tables or columns outside its assigned role.