Astro and Directus make a strong pair for a business website: Directus gives your team a clean admin panel on top of your own SQL database, and Astro turns that content into fast, mostly plain HTML pages. Since Directus 12, the full platform is free to self-host for organisations under USD 5 million in yearly revenue and under 50 employees, with a registration key. Larger organisations can still use the free Core tier within its limits, or pay for Directus Cloud or a licence.
This guide is for business owners, marketing leads and agencies weighing up an Astro website with Directus behind it. It covers what Directus is, the licence, hosting choices, how Astro reads the content, images, preview, languages, roles, backups and upgrades, and when Directus is the wrong pick.
What Directus is, in plain words
Directus is a headless CMS: it stores and manages content, and sends it to your website through an API, but it does not build the public pages itself. What sets it apart is that it wraps a normal SQL database. Every collection you create in the admin is a real table, and every field is a real column.
For a business, that means your content is never locked in a vendor's format: any developer or reporting tool can read the database, and the same data can feed the website, an internal tool or an app.
According to the Directus database configuration docs (opens in a new tab), it supports PostgreSQL, MySQL, Oracle, Microsoft SQL Server, SQLite and CockroachDB. If you are unsure which to pick, our MySQL vs PostgreSQL guide explains the trade-offs.
Astro has no admin screen of its own, which is why a pairing like this exists. Astro handles the front end, and Directus handles editing. Our guide to the best headless CMS for Astro compares Directus with the other options we use.
The Directus 12 licence and the registration key
Directus 12 moved to a new licence called the Monospace Sustainable Core License (MSCL), which is source-available rather than open source. The Directus v12 licence announcement (opens in a new tab) sets out how it works:
| Situation | What you get | Registration |
|---|---|---|
| Under USD 5M yearly revenue and under 50 employees | Full platform free through the Innovation Grant | Registration key needed |
| Over either threshold, using the free tier | Free Core tier, within its limits | No registration |
| Paid tiers | Enterprise features and support | Registration key needed |
| Any version, after 4 years | That version becomes GPLv3 open source | Not applicable |
The only use the licence forbids is building and selling a product that directly competes with Directus. Hosting Directus for a client, building products on it and selling services around it are allowed. The SDKs stay under the MIT licence, so the code in your Astro site that talks to Directus carries no extra conditions.
On a self-hosted install, the key goes in an environment variable. The Directus general configuration docs (opens in a new tab) describe LICENSE_KEY, which is activated against the Directus licensing service on first use and checked again from time to time, and LICENSE_TOKEN for offline use. You set one or the other, never both, or Directus refuses to start.
Self-hosting vs Directus Cloud
You can run Directus on your own server or rent it from Directus. Both work well with Astro, because Astro only needs the API URL.
| Self-hosted | Directus Cloud | |
|---|---|---|
| Software cost | Free under the Innovation Grant (or free Core tier) | Paid plan; Core is listed at USD 89 a month billed yearly, USD 99 billed monthly |
| What is included | Whatever your server gives you | Core card: 3 user seats, 25 collections, 5 flows, community support |
| Server, backups, updates | You or your developer | Handled by Directus |
| Data location | Wherever you choose | Directus's hosting |
| Trial | Not needed | 14 days on Core and Team |
Those figures are from the plan cards on the Directus pricing page (opens in a new tab) in November 2026. The FAQ on the same page gave different figures for some plans when we checked, and it was not fully clear which prices include Cloud hosting, so ask Directus for a written quote before you budget.
Self-hosting is a good fit for a business that qualifies for the grant and has someone to look after a server. A modest VPS running Directus in Docker can be enough for a marketing site, because the public traffic goes to the Astro site, not to Directus. If you would rather not look after the server yourself, our VPS and cloud server management service covers setup, security, backups and updates.
How Astro reads content from Directus
Astro talks to Directus through the official JavaScript SDK, @directus/sdk. The Directus guide to fetching data with Astro (opens in a new tab) uses a small helper file and then reads collections in any page:
// src/lib/directus.ts
import { createDirectus, rest, readItems } from '@directus/sdk';
const directus = createDirectus(import.meta.env.DIRECTUS_URL).with(rest());
export async function getPosts() {
return directus.request(
readItems('posts', {
fields: ['slug', 'title', 'summary', 'image'],
sort: ['-published_date'],
})
);
}Two details catch people out: collections are not public by default, so the site needs read access or a read-only token, and readItems returns only the first 100 items unless you set a limit.
For a static Astro build, pages are generated at build time with getStaticPaths(), and the site is rebuilt when content changes. Directus Flows, its built-in automation tool, has a Webhook / Request URL operation (opens in a new tab) that "makes a request to another URL", so a flow can call your host's deploy hook when an editor publishes. For content that must change instantly, such as stock levels or event places, individual Astro routes can render on demand instead.
Wiring that rebuild hook, the token and the preview route together is the fiddly part of the project. If you would rather hand it over, our Astro website development team sets up the full Directus connection for you.
Images through the assets endpoint
Directus serves uploaded files from /assets/<file-id>, and it can resize and convert images on request. According to the Directus image transformation docs (opens in a new tab), you add query parameters such as width, height, fit and quality, and format=auto sends WebP or AVIF to browsers that support them and JPEG to the rest. Each variant is generated once, stored and reused.
In practice, an Astro component builds the URL, for example /assets/<id>?width=800&format=auto, with a srcset of two or three widths. We also create named presets (such as a card image and a hero image) and lock down other transformations, so nobody can request a huge size and slow the server.
Live preview for editors
Live preview lets an editor see an unpublished change on the real site design before it goes live. The Directus live preview docs (opens in a new tab) explain the setup: you set a Preview URL on each collection, using a field such as the slug, and editors see the rendered page beside the form after saving, on desktop or mobile widths.
On the Astro side, the Directus Astro live preview guide (opens in a new tab) uses one on-demand route that checks for a preview flag and a secret token, then fetches the draft straight from Directus. Public visitors still get the fast static page. If you use content versions, Directus passes the version key in the preview URL too, so editors can preview a draft version of a live page.
Multi-language content
Directus has translations built in. The Directus translations docs (opens in a new tab) describe a Generate Translations wizard that creates a languages collection and a translations collection (for example articles_translations) for the fields you choose to translate. Editors then switch between languages on each item while editing.
Astro reads the right language with a filter on the translations field, and builds a route per language such as /en/ and /de/. Fields you do not translate, such as a price or a date, stay shared across languages.
Roles and permissions for editors
Directus starts closed: according to the Directus access control docs (opens in a new tab), a new user starts with no permissions until a policy gives them access. Access is built from policies (sets of permissions) assigned to roles or directly to users, and permissions only ever add access. You can go beyond all-or-nothing with filters, for example letting a branch manager edit only their own branch's pages, or letting a writer create posts but not publish them.
A typical business setup has three or four roles:
- Administrator: your developer and one named person at your company.
- Editor: creates and publishes pages, posts and media.
- Contributor: writes drafts and uploads images, but cannot publish.
- Public: read-only access for the Astro site, limited to published items and the fields the site needs.
Backups and upgrades
Self-hosting Directus means backups and upgrades are your job, so plan them before launch. Directus stores everything that matters in two places: the database and the uploaded files. A nightly database dump plus a copy of the uploads folder, kept off the server, is the minimum. Our website backup and disaster recovery plan explains how often to back up and how to test a restore.
For upgrades, the Directus upgrading guide (opens in a new tab) says new versions arrive about once a month, database migrations are handled automatically, and you should read the breaking changes list before every upgrade. With Docker, you change the image tag. Our routine:
- Read breaking changes
- Back up database and uploads
- Upgrade on staging
- Test Astro build and preview
- Upgrade live
Pin an exact version tag rather than latest, so a container restart never upgrades the CMS by surprise.
When Directus is not the right pick
Directus is our favourite, but it is not the answer to every brief.
- A small brochure site with one editor: a Git-based CMS like Keystatic is simpler and needs no database or server. See our Astro and Keystatic guide.
- No one to look after a server, and no Cloud budget: a hosted CMS such as Sanity removes the upkeep. Our Astro and Sanity guide covers the trade-offs.
- Your team already lives in a Node.js CMS with plugins you rely on: Strapi may be the smoother move; our Astro and Strapi guide compares the two.
- An organisation above the licence thresholds that needs the full platform: budget for a paid licence or Cloud plan from the start.
A simple next step
Write down who will edit the site, how many languages you need, whether you qualify for the Innovation Grant, and who will look after the server. Those four answers decide most of the setup and the running cost; our Astro website cost guide helps with the rest of the budget.
When you are ready, we can model your content in Directus, build the Astro front end and set up hosting, backups and upgrades as one project. Tell us about your site on our Astro website development page, or see our wider headless CMS development work.
Frequently asked questions
Is Directus free to use with Astro?
Yes, if your organisation qualifies. Under the Directus 12 licence, organisations under USD 5M in yearly revenue and under 50 employees can self-host the full platform free through the Innovation Grant, with a registration key. Larger organisations can use the free Core tier within its limits or pay for a licence or Directus Cloud.
Do we need a server to run Directus?
Only if you self-host. Directus needs a server and a SQL database, which a small VPS can provide. If you do not want to manage one, Directus Cloud hosts it for you on a paid plan; the pricing page lists Core at USD 89 a month billed yearly, and we suggest asking Directus for a written quote.
Can we use our existing database with Directus?
If you self-host, yes. The Directus existing database page (opens in a new tab) says it can sit on top of an existing database and map its structure, so you get an admin panel over your tables without moving the data. Have a developer check the schema first.
Does an Astro site update when we publish in Directus?
It can, in two ways. A static Astro site is rebuilt automatically when Directus calls your host's deploy hook after a publish. Pages that must change instantly can be rendered on demand and read Directus on every visit.
Is Directus open source?
Not in the strict sense since version 12. Directus now uses the Monospace Sustainable Core License, which lets you read and self-host the code, with each version becoming GPLv3 open source four years after release. The SDKs, including the one Astro uses, remain MIT.
Sources
The facts in this article were checked against these pages, last reviewed 26 November 2026.
- Directus v12 licence change, Directusdirectus.com/resources/directus-v12-license-change
- Directus pricing, Directusdirectus.com/pricing
- Configuration: general (licence keys), Directus docsdirectus.com/docs/configuration/general
- Database configuration, Directus docsdirectus.com/docs/configuration/database
- Existing database, Directusdirectus.com/features/existing-database
- Flow operations, Directus docsdirectus.com/docs/guides/flows/operations
- Access control, Directus docsdirectus.com/docs/guides/auth/access-control
- Fetch data from Directus with Astro, Directus docsdirectus.com/docs/frameworks/astro/data-fetching
- Image transformations, Directus docsdirectus.com/docs/guides/files/transform
- Live preview, Directus docsdirectus.com/docs/guides/content/live-preview
- Translations, Directus docsdirectus.com/docs/guides/content/translations
- Upgrading Directus, Directus docsdirectus.com/docs/self-hosting/upgrading




