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.
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. Inwal-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:
--lifecycle-file also replaces the bucket’s existing rules; check with gcloud storage buckets describe gs://BUCKET_NAME --format='json(lifecycle_config)' first:
s3:PutLifecycleConfiguration, which the built-in readwrite policy grants):
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; 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
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.
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.
-
Install this version as a NEW release in the same GVC with the same
secrets.nameandpostgres.config.credentialsSecretName(and the samestoragesettings withstorage.type: s3). Directus initializes an empty project in it. -
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): -
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). -
Replace the new project’s database with the old one, from inside the new database container. The PostgreSQL 19
pg_dumpreads the old server, and--clean --if-existsfirst drops what the new Directus created: -
Run
cpln workload force-redeployment NEW_RELEASE-directus --gvc GVC_NAMEso 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
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. - Upgrading a 1.x release with the single-instance database needs
postgres.image: postgres:18in 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 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.