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.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.Directus secret
adminEmail and adminPassword are read on the first boot only:secrets.name to this name.Database credentials
username, password and database. PostgreSQL is initialized with it and Directus connects with it:postgres.config.credentialsSecretName to this name, or postgresHA.config.credentialsSecretName in HA mode.License key (optional)
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.Redis password and SMTP login (optional)
password for redis.redis.auth.fromSecret.name, one with the keys username and password for email.auth.secretName:S3 bucket and backup bucket (optional)
Installation
A default install needs only the names of the two secrets:UI
CLI
Terraform
Pulumi
Configuration
Directus
FROM the pinned one and set directus.image.
File Storage
Storage Setup
Only forstorage.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.
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
postgres and postgresHA. Backup settings for both are covered under Backing Up.
Redis
redis.redis.auth.fromSecret.enabled: true and its name.
Connecting
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 fromPOST /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. Setpostgres.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; withstorage.type: s3 they live in your bucket.
Scaling and Availability
Setdirectus.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
Deployment never starts and cpln logs is empty
Deployment never starts and cpln logs is empty
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.deactivated because maxScale is set to 0
deactivated because maxScale is set to 0
location, so Directus runs nothing. Set location to a location the GVC already has, and install into a GVC with one location.Render refuses with a directus.replicas error
Render refuses with a directus.replicas error
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.Uploads fail with S3 storage
Uploads fail with S3 storage
GET /server/health with an admin token (-H 'Authorization: Bearer TOKEN') writes a test file and names the failing check.API requests return 503 for a moment
API requests return 503 for a moment
Sign-in shows license or project-owner dialogs again
Sign-in shows license or project-owner dialogs again
Important Notes
- Never change
secretafter installing. It signs every session and token, so all of them stop working. Rotating any other secret needscpln workload force-redeployment RELEASE_NAME-directus --gvc GVC_NAME. - Local files are deleted on uninstall and are not snapshotted. Use
storage.type: s3for files that must outlive the release; switchingstorage.typelater does not move existing files. - Install into a GVC with one location and set
locationto it; the bundled PostgreSQL and Redis start in every GVC location. - The first
helm upgradecan briefly restart the single-instance PostgreSQL, and Directus with it; usepostgresHAwhen 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.