Skip to main content

Overview

Directus is a headless CMS and data platform. It puts an instant REST and GraphQL API and the Data Studio admin app on top of PostgreSQL, so editors manage content in a web UI and your sites and apps read it over the API. This template deploys Directus 12 with a bundled PostgreSQL (single instance by default, highly available behind one flag), file storage on a shared volume or an S3 bucket, and optional Redis for running multiple replicas. Directus 12 is licensed MSCL-1.0-GPL. Without a license key it runs on the free Core tier: 3 Data Studio users, 25 collections and 5 flows. Going over a cap starts a grace period, after which the project is downgraded until you get back under the caps or add a key. A key is free on registration for small organizations and paid otherwise. Directus also sends usage telemetry to Directus by default, and the template leaves that default in place.
This template deploys into an existing GVC that you already have — it does not create one. Directus runs in the one location named by location, which must already be a location of that GVC; a location the GVC does not have simply starts nothing. The bundled PostgreSQL and Redis start in every location the GVC has, so use a GVC with a single location.

What Gets Created

Prerequisites

Two secrets must exist before you install, in a GVC with one location. Secrets are org-level, so no GVC flag is involved. They hold credentials, so they are prerequisite secrets rather than values.
1

Directus secret

A dictionary secret with the token signing secret and the first administrator. adminEmail and adminPassword are read on the first boot only:
Set secrets.name to this name.
2

Database credentials

A dictionary secret with keys username, password and database. PostgreSQL is initialized with it and Directus connects with it:
Set postgres.config.credentialsSecretName to this name, or postgresHA.config.credentialsSecretName in HA mode.
If either secret is missing, the install reports success and then waits silently: cpln logs shows nothing, and the missing secret is named only in status.versions[].message of cpln workload get-deployments RELEASE_NAME-directus --gvc GVC_NAME -o yaml. A secret created after installing is not picked up on its own; run cpln workload force-redeployment RELEASE_NAME-directus --gvc GVC_NAME.
Optional features need setup before you install:
1

License key (optional)

An opaque secret holding your Directus license key:
Set license.secretName to this name. With a key set this way the license can no longer be changed in the Data Studio; without one you can enter a key under Settings, License. Activation is bound to the public URL, so check Settings, License after changing directus.publicUrl.
2

Redis password and SMTP login (optional)

Dictionary secrets: one with the key password for redis.redis.auth.fromSecret.name, one with the keys username and password for email.auth.secretName:
3

S3 bucket and backup bucket (optional)

File storage in S3 needs a bucket and, on AWS, a Control Plane cloud account and IAM policy. See Storage Setup. Database backups are covered under Backing Up.

Installation

A default install needs only the names of the two secrets:
Or install using your preferred method:

UI

Browse, install, and manage templates visually

CLI

Manage templates from your terminal

Terraform

Declare templates in your Terraform configurations

Pulumi

Declare templates in your Pulumi programs

Configuration

Directus

Extensions are not persisted. To use them, build your own image FROM the pinned one and set directus.image.

File Storage

Storage Setup

Only for storage.type: s3. Both paths set storage.s3.bucket and storage.s3.region. AWS S3 (keyless) — create the bucket and a Control Plane cloud account for the AWS account, and set storage.s3.cloudAccountName. Create this IAM policy (replace YOUR_BUCKET_NAME), set storage.s3.policyName to its name, and leave storage.s3.auth.secretName empty.
S3-compatible (MinIO and others) — create the bucket, set storage.s3.endpoint with its scheme and fully qualified host (for example http://MINIO_WORKLOAD_NAME.GVC_NAME.cpln.local:9000), set storage.s3.forcePathStyle: true, then create the keys secret and set storage.s3.auth.secretName to it:

Cache and Email

Access

Database

Enable exactly one of postgres and postgresHA. Backup settings for both are covered under Backing Up.

Redis

Redis is required for 2 or more Directus replicas and stays a single node. To require a password, create the secret from Prerequisites, then set redis.redis.auth.fromSecret.enabled: true and its name.

Connecting

Read credentials back with cpln secret reveal SECRET_NAME -o yaml. To verify the install, request the anonymous info endpoint through the public endpoint:

First Run

Sign in to the Data Studio at the endpoint with the admin email and password. On first sign-in Directus asks for a license key (choose I’m using Core plan or Skip without one) and to register a project owner (Remind Later skips it); both dialogs return until answered. The API takes a token from POST /auth/login, or a static token you set on a user in the Data Studio:
adminPassword is read on the first boot only. Change the password in the Data Studio, or reset a forgotten one in the container (read keeps it out of your shell history):

Operations

Backing Up

Database backups are scheduled by the bundled database template and write to your bucket. Set postgres.backup.enabled: true (single instance, a scheduled pg_dump; provider is aws, gcp or minio, default schedule 0 2 * * *) or postgresHA.backup.enabled: true (HA; mode is logical or wal-g). The full backup blocks are in the shipped values.yaml and pass straight through; the bucket, cloud account and IAM policy setup are on the postgres and postgres-highly-available pages. A database backup does not include uploaded files. With storage.type: s3, protect the bucket as well with versioning or replication. Local uploads are not snapshotted.

Restoring a Backup

Restore the database by following the restore steps on the postgres or postgres-highly-available page for the mode you installed. Restoring uploaded files is not covered by this template; with storage.type: s3 they live in your bucket.

Scaling and Availability

Set directus.replicas between 1 and 10. Replicas are interchangeable and roll one at a time with no unavailable replica. Two or more replicas need redis.enabled: true; the chart refuses to render otherwise. For near-zero-downtime upgrades and failover, combine directus.replicas: 2, redis.enabled: true and postgresHA.enabled: true. Directus runs in one location only. To change it, set location to another location of the same GVC.

Troubleshooting

A prerequisite secret does not exist. Read status.versions[].message from cpln workload get-deployments RELEASE_NAME-directus --gvc GVC_NAME -o yaml, create the secret, then run cpln workload force-redeployment RELEASE_NAME-directus --gvc GVC_NAME.
The GVC does not have the location named by location, so Directus runs nothing. Set location to a location the GVC already has, and install into a GVC with one location.
Two or more replicas need redis.enabled: true. Without Redis each replica would keep its own cache, rate limits and scheduled-flow clock. Enable Redis or set directus.replicas: 1.
The IAM policy or keys usually do not cover the bucket. GET /server/health with an admin token (-H 'Authorization: Bearer TOKEN') writes a test file and names the failing check.
The single Redis node is restarting. Requests recover when Directus reconnects.
Both dialogs return until answered. Enter a key or choose the Core plan, and register or choose Remind Later.

Important Notes

  • Never change secret after installing. It signs every session and token, so all of them stop working. Rotating any other secret needs cpln workload force-redeployment RELEASE_NAME-directus --gvc GVC_NAME.
  • Local files are deleted on uninstall and are not snapshotted. Use storage.type: s3 for files that must outlive the release; switching storage.type later does not move existing files.
  • Install into a GVC with one location and set location to it; the bundled PostgreSQL and Redis start in every GVC location.
  • The first helm upgrade can briefly restart the single-instance PostgreSQL, and Directus with it; use postgresHA when that matters.
  • A replica restart empties the shared data cache in Redis; Directus rebuilds it on demand.
  • Changing the public URL (directus.publicUrl) changes where a license key is activated; recheck Settings, License.

External References

Directus Documentation

Official Directus product documentation

Configuration Reference

The environment options this template sets

Licensing and the Core Tier

License tiers, caps and the free registration key

Directus on GitHub

Source code and release notes

Directus Template

View the source files, default values, and chart definition