Back to templates
Directus icon

Deploy Directus on Sealos

Composable data platform and headless CMS for managing SQL databases with APIs, auth, files, and an admin app.

Low-Code
Deploy Directus in a few clicks from the Sealos App Store.Run a self-hosted open-source service on Kubernetes-backed infrastructure.Get automatic HTTPS, routing, and resource management from Sealos.Avoid manual YAML while keeping control of the deployed workload.

Why deploy on Sealos

Sealos makes deploying any app effortless, secure, and production-ready. From one-click launch to ongoing operations, we handle the heavy lifting so you can focus on what matters.

One-Click Deploy
Sealos logo
Compute
Networking
Storage
Security
Observability
Your Application is Live

One-Click Deployment

Deploy any app template in seconds. No compose setup, manual configure, and go live.

Managed Kubernetes Reliability

Built on Sealos Managed Kubernetes for high availability, auto-scaling, and self-healing by default.

Automatic HTTPS & Security

Every deployment includes a secure domain with automatic SSL. We handle certificates and text protection for you.

Persistent Storage

Attach persistent volumes with ease. Your data stays safe, durable, and always accessible.

Scale when needed

Adjust resources as your app grows, no downtime required.

You Get the Whole Stack

Sealos provisions and connects every resource your application needs. Everything is ready to use.

One-click, fully provisionedSecure by defaultProduction ready

App Service

Your application is running and ready to serve requests.

Public HTTPS URL

Secure, global endpoint to access your application.

Database

Managed database instance for your application.

Persistent Volume

Durable storage for uploads and application data.

Environment Variables

Configuration and secrets injected securely into your app.

Logs & Metrics

Centralized logs and basic metrics are enabled.

README

README.md

Deploy and Host Directus on Sealos

Directus is a composable data platform and headless CMS that adds an admin application, REST and GraphQL APIs, authentication, permissions, files, and automation to a SQL database. This template deploys Directus 12 with Redis and lets you choose the database and file-storage topology at deployment time.

Directus collection backed by PostgreSQL and Sealos S3

What This Template Deploys

  • Directus 12.1.1 as a single-replica StatefulSet on port 8055
  • Redis 7.2.7 through KubeBlocks for cache and rate limiting
  • Managed PostgreSQL 16.4.0 by default, with embedded SQLite as a lightweight option
  • Persistent local uploads by default, with private Sealos S3-compatible object storage as an option
  • Persistent extensions storage at /directus/extensions
  • Public HTTPS through a Sealos-managed Service and Ingress
  • Startup, readiness, and liveness probes on /server/ping

The template keeps PostgreSQL and object storage independent. You can use any of these combinations:

DatabaseFile storageRecommended use
PostgreSQLLocal persistent volumeGeneral single-replica deployment
PostgreSQLSealos S3Production-oriented file storage and future horizontal scaling
SQLiteLocal persistent volumeEvaluation and small single-replica projects
SQLiteSealos S3Lightweight database with durable object storage

Common Use Cases

  • Headless CMS for websites and applications
  • Internal data administration and operational tools
  • REST or GraphQL backend with authentication and permissions
  • Structured content, user, and file management
  • Low-code workflows and dashboards

Deployment

  1. Open the Directus template in the Sealos App Store.
  2. Enter a strong initial administrator email and password.
  3. Choose the database and file-storage options.
  4. Click Deploy and wait for the Directus workload to become ready. A first deployment with managed PostgreSQL usually takes several minutes while KubeBlocks provisions the database.
  5. Open the HTTPS address shown by Sealos.

Deployment Parameters

ParameterDefaultDescription
admin_emailRequiredEmail for the first Directus administrator
admin_passwordRequiredPassword for the first Directus administrator
use_postgresqltrueCreates managed PostgreSQL; false uses SQLite at /directus/database/data.db
use_object_storagefalseCreates a private Sealos S3 bucket; false uses /directus/uploads

Administrator credentials are applied when Directus initializes a new database. Changing these values later does not reset an administrator stored in an existing database.

First Login

  1. Open the deployed Directus URL.
  2. Sign in with the configured admin_email and admin_password.
  3. On the first-run license screen, choose Core plan for the free, keyless tier or enter a license key for another eligible plan.
  4. Complete or skip the optional usage survey.
  5. Set the project owner or choose Remind Later.

The admin application opens at /admin. The same public host serves the APIs:

  • REST API: /items, /users, /files, and other resource paths
  • GraphQL API: /graphql
  • Unauthenticated health probe: /server/ping

Directus 12 restricts /server/health; use /server/ping for external uptime checks.

Database Options

Managed PostgreSQL

This is the default. The template creates a KubeBlocks PostgreSQL cluster and an idempotent initialization Job for the directus database. Directus reads the generated host, port, username, and password from Kubernetes Secrets.

Choose PostgreSQL for production workloads, larger datasets, and deployments that may later use multiple Directus replicas.

Embedded SQLite

Disable use_postgresql to store the database at /directus/database/data.db on a dedicated 1Gi persistent volume. SQLite reduces the deployment footprint and works well for evaluation and small single-replica projects.

Keep SQLite deployments at one Directus replica because the database file lives on a ReadWriteOnce volume.

File Storage Options

Local Persistent Storage

With use_object_storage disabled, uploaded files are stored at /directus/uploads on a dedicated 1Gi persistent volume.

Sealos S3 Object Storage

Enable use_object_storage to create a private ObjectStorageBucket. Directus uses the S3-compatible sealos storage location and stores objects under the uploads prefix. Bucket credentials are injected from Sealos-managed Secrets.

Private objects return 403 when requested directly. Users access files through Directus, where authentication and permissions are enforced.

Persistence

Path or servicePurposeProvisioned when
PostgreSQL volumeDirectus system and application datause_postgresql=true
/directus/databaseSQLite database fileuse_postgresql=false
/directus/uploadsLocal uploaded filesuse_object_storage=false
Sealos S3 bucketObject-backed uploaded filesuse_object_storage=true
/directus/extensionsDirectus extensionsAlways
Redis volumesCache and rate-limiter dataAlways

Resource Defaults

The Directus container uses the official minimum memory requirement and the nearest Sealos CPU tier:

ComponentCPU limitMemory limitCPU requestMemory request
Directus500m512Mi50m51Mi
PostgreSQL500m512Mi50m51Mi
Redis500m512Mi50m51Mi
Redis Sentinel500m512Mi50m51Mi
Startup and initialization containers100m128Mi10m12Mi

Increase Directus memory for large schemas, heavy API traffic, transformations, or extension workloads.

Scaling

The template starts with one Directus replica. Before horizontal scaling:

  1. Use managed PostgreSQL.
  2. Enable Sealos S3 object storage so every replica shares the same file backend.
  3. Distribute the same extensions to every replica.
  4. Keep Redis enabled for shared cache and rate-limiter state.
  5. Adjust the StatefulSet replica and resource settings in Sealos Canvas.

Troubleshooting

The application is still starting

Open the Directus, PostgreSQL, and Redis resource cards in Sealos Canvas. On the first deployment, the wait containers hold Directus until the backing services are ready. PostgreSQL provisioning can take several minutes.

The initial administrator cannot sign in

Use the email and password entered during deployment. These values create the first administrator only when the database is initialized. An existing database keeps its stored users and passwords.

An S3 file returns 403

This is expected for the private bucket. Access the file through the Directus /assets/{id} endpoint with a user or token that has permission.

Geometry support warning appears

The managed PostgreSQL image does not include PostGIS, and SQLite does not include SpatiaLite. Standard CMS and API features continue to work. Use a compatible spatial database when the project requires geometry fields and spatial queries.

Extensions disappear after customization

Place persistent extensions under /directus/extensions. When using multiple replicas, make the same extension set available to every replica.

Documentation

License

Directus 12 is distributed under the Monospace Sustainable Core License 1.0 with a GPL future license (MSCL-1.0-GPL). Review the license and the Directus pricing page before production use. This repository provides the Sealos deployment template and does not change the Directus license.

Related templates

Explore more production-ready templates.

More