Skip to main content
Connect Directus to Rocket and describe the content experience you want in chat. Rocket generates the pages, listing views, and dynamic layouts that pull directly from your Directus collections.Directus is an open-source headless CMS that wraps any SQL database with a real-time API and a visual admin panel.
You need a running Directus instance and an access token before connecting.

What you can use it for

Blog or content site

Publish articles, tutorials, and news posts managed entirely through Directus.

Product catalog

Display products with images, descriptions, pricing, and variant options from Directus.

Multi-language site

Serve content in multiple languages using Directus translations with a language switcher.

FAQ or knowledge base

Searchable help center powered by Directus content, grouped by category.

Rich media collections

Image-heavy collections like projects, case studies, or creative work with filtering and detail views.

Quick start

1

Get your Directus access token and URL

In Directus, open your User Profile, scroll to the Token field, and click Generate New Token. Note your project URL (e.g., https://your-project.directus.app).
2

Connect in chat

Open any Rocket project and type:
Connect Directus and build a blog listing page from my articles collection.
Paste your credentials when prompted. Rocket builds the feature instantly.
This connector is only available for Next.js TypeScript web build tasks.

Detailed setup

Get your Directus access token

Open Directus documentation to learn how to generate your access token.
  1. Open your Directus project and go to your User Profile.
  2. Scroll down to the Token field and click Generate New Token.
  3. Copy and save the token. You will paste it into Rocket during setup.
You will also need your Directus project URL (e.g., https://your-project.directus.app).
Never paste your Directus access token directly into Rocket chat. Always use the secure integration flow. If you believe your token has been exposed, regenerate it from your Directus User Profile.

Connect Directus to Rocket

There are two ways to connect Directus:Method 1: Use Rocket chat (fastest)In any project, open the chat panel and type:
  • Connect Directus and display blog posts from my CMS.
  • Connect Directus and build a product catalog from my collections.
A popup appears where you can paste your credentials.Method 2: From ConnectorsIn the preview toolbar, click the ... button and select Connectors. Click the Directus card.
When you connect Directus from Connectors, Rocket does not automatically create content flows. After saving your credentials, describe the content flow you want in chat.
Enter your Project URL and Access Token, then click Save. A green dot appears next to Directus when the connection is active.Update or disconnectClick the Directus integration again. Replace the existing credentials or click Disconnect to remove it.

Prompt cookbook

Copy-paste these prompts after connecting Directus to build common content experiences:
Use casePrompt
Blog listingShow all articles from my Directus posts collection with thumbnails and publish dates.
Detail pageWhen a user clicks an article, open a detail page with the full rich-text body from Directus.
Product catalogCreate a product grid from my Directus products collection with images, prices, and a detail modal.
Multi-languageAdd a language switcher that toggles content between English and Spanish from Directus translations.
FAQ pageBuild an FAQ accordion from my Directus faqs collection, grouped by category.
SearchAdd a full-text search bar to my Directus-powered blog listing page.
Media galleryDisplay images from my Directus media collection in a responsive grid with lightbox preview.
Filtered listingShow Directus products filtered by category with a sidebar navigation.
PaginationAdd pagination to my Directus blog listing, showing 10 posts per page.
Admin viewCreate a simple admin table for my Directus collection with inline editing and a delete button.

Tips and limitations

  • Licensing. Directus is licensed under BSL 1.1. Organizations with over $5 million in total finances require a commercial license. Smaller organizations and individuals can use Directus commercially without a license.
  • Your access token is stored securely. Rocket encrypts it at rest and never exposes it in client-side code.
  • Directus must be running and accessible. Your Directus instance needs to be reachable from the internet. Local-only instances will not work.
  • Deleting content must happen in Directus. Rocket can create and update records, but content and asset deletion should be managed directly in your Directus admin panel.
  • Role permissions matter. The access token inherits the permissions of the Directus user that generated it. Use a dedicated service account with scoped permissions for production apps.
  • One Directus project per Rocket project. Each Rocket project connects to one set of Directus credentials. Use different projects for different Directus instances.

What’s next?

Strapi

Comparing headless CMS options? See how Strapi works with Rocket.

Supabase

Pair Directus content with Supabase auth and user management.

Resend

Send notification emails when new content is published from Directus.

Netlify

Deploy your Directus-powered site to Netlify with one prompt.