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. After you create the secret, the deployment recovers on its own within about 10 minutes; to skip the wait, 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.

Backup retention

The backup job only uploads; it never deletes old backups. To keep a fixed window, add a lifecycle rule on the bucket that expires objects under the backup prefix. Each backup is a complete, standalone copy, so expiring old ones never affects restoring a newer one. Set the window to at least your retention plus one backup interval, and note that an age rule keeps no minimum: if backups stop running, the last ones expire too. In wal-g mode (postgresHA.backup.mode: wal-g), a restore needs the newest full base backup plus the WAL files written after it, all under the same prefix and never rewritten. Older base backups and the WAL before them are not needed, so the same rule is safe as long as the window is longer than two base-backup intervals (postgresHA.backup.walg.intervalSeconds). If base backups stop while WAL archiving continues, the rule eventually expires the last base backup, so check that new basebackups_005/ entries keep appearing. The rules below use the default prefix directus/backups/; change it if you changed postgres.backup.<provider>.prefix (or postgresHA.backup.<provider>.prefix in HA mode). AWS S3. put-bucket-lifecycle-configuration replaces every existing rule on the bucket, so check for existing rules first and add them to the file:
Google Cloud Storage. --lifecycle-file also replaces the bucket’s existing rules; check with gcloud storage buckets describe gs://BUCKET_NAME --format='json(lifecycle_config)' first:
MinIO (adds a rule alongside existing ones; the access key needs s3:PutLifecycleConfiguration, which the built-in readwrite policy grants):
Lifecycle rules run in the background; objects are removed within about a day of reaching the age. The Noncurrent parts matter only on a versioned bucket, where expiry otherwise just adds a delete marker.

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.

Upgrading from 1.x

Highly available database (postgresHA.enabled: true). A plain upgrade works, and the cluster stays on PostgreSQL 17, the major it was created with; new HA releases start on PostgreSQL 18. Moving an existing cluster to 18 is a copy into a new release: see Upgrading an existing cluster to PostgreSQL 18 in the postgres-highly-available template. Single-instance database (postgres.enabled: true, the default). New installs run PostgreSQL 19. A 1.x release’s data directory was created by PostgreSQL 18 (or the major of the postgres.image it ran), and a data directory only opens with its own major. The chart never converts data in place: before PostgreSQL starts, a guard compares the two majors, and on a mismatch it does not start the server and changes nothing on the volume. RELEASE_NAME-postgres then stays not ready, Directus waits for its database, and the logs repeat [pg-guard] REFUSING TO START with the exact --set postgres.image=... to run.
Stay on PostgreSQL 18. Run the upgrade with the image pinned, and keep postgres.image: postgres:18 in your values file for every later upgrade (cpln helm upgrade does not reuse the installed values). The Console upgrade wizard keeps the installed image for you.
Move to PostgreSQL 19, side by side (Directus gets a new endpoint; writes pause during the copy):
  1. Install this version as a NEW release in the same GVC with the same secrets.name and postgres.config.credentialsSecretName (and the same storage settings with storage.type: s3). Directus initializes an empty project in it.
  2. With storage.type: local, copy the uploaded files through your machine while the old Directus is still running (do this in a quiet window: a file uploaded after this step is not copied):
  3. Stop writes to the old release, for example by stopping its Directus workload (cpln workload stop OLD_RELEASE-directus --gvc GVC_NAME; the database keeps running).
  4. Replace the new project’s database with the old one, from inside the new database container. The PostgreSQL 19 pg_dump reads the old server, and --clean --if-exists first drops what the new Directus created:
  5. Run cpln workload force-redeployment NEW_RELEASE-directus --gvc GVC_NAME so Directus reloads the copied schema, sign in to check your collections and files, point your front ends at the new endpoint (or move your custom domain), then uninstall the old release.

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.
  • Upgrading a 1.x release with the single-instance database needs postgres.image: postgres:18 in your values on that and every later upgrade, or the database refuses to start (data untouched); moving the data to PostgreSQL 19 is a dump and restore into a new release. See Upgrading from 1.x.
  • 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