Deploy Directus

Headless CMS & data platform: Directus, PostGIS, Redis, persistent uploads.

Deploy Directus

Directus

Just deployed

/directus/uploads

Just deployed

/var/lib/postgresql/data

Just deployed

/data

Bucket

Bucket

Just deployed

Deploy and Host Directus on Railway

Directus is an open-source headless CMS and data platform. It wraps any SQL database in an instant REST and GraphQL API and gives your team a polished no-code admin app to manage the content. This template runs a production-shaped stack: Directus, a PostGIS (PostgreSQL) database, and Redis.

About Hosting Directus

Hosting Directus means running the Node.js application alongside a PostgreSQL database and, ideally, a Redis instance for caching, rate-limiting, and realtime websocket synchronization. On first boot Directus runs its database migrations and bootstraps an initial admin account, then serves both the API and the admin app on a single port. The main operational concern is file storage: uploaded assets are written to a local uploads directory, which must live on a persistent volume or an external object store, or they are lost on every redeploy.

This template wires all of that together: PostGIS on a persistent volume, Redis for caching and websockets, a pinned Directus image, and a dedicated uploads volume that Directus can actually write to — the first admin is created for you so you can log in immediately.

Why Deploy Directus on Railway?

Railway provisions the three services, their private networking, and the volumes from this single template in one click, so there is no Docker Compose to manage. Compared with other Directus templates, this one fixes the two things people most often hit:

  • Uploads persist. The uploads directory is on its own volume, and the service runs so Directus can write to Railway's root-owned volumes — many templates skip this, and their uploaded files disappear on the next deploy.
  • You can log in right away. The first admin is created on first boot from the ADMIN_EMAIL and ADMIN_PASSWORD variables, with no CLI step.

Redis caching and websockets are pre-wired, PostGIS enables geospatial fields, and the image is pinned for reproducible deploys.

Common Use Cases

  • A headless CMS backing a website, mobile app, or storefront
  • A central content and asset API shared across multiple front-ends
  • An internal admin panel over existing or new PostgreSQL data

Dependencies for Directus Hosting

  • A PostgreSQL-compatible database (PostGIS is bundled here)
  • Redis for caching, rate-limiting, and websocket sync (bundled here)
  • A persistent volume or external object storage for uploaded files

Deployment Dependencies

Implementation Details

On first login, use the ADMIN_EMAIL value (default admin@example.com) and copy ADMIN_PASSWORD from the Directus service's Variables tab, then change both under Settings → Users. Uploads are stored on the attached volume at /directus/uploads. To use S3, R2, or a Railway bucket instead, set the STORAGE_* variables per the Directus storage docs and detach the volume.


Template Content

More templates in this category

View Template
Libredesk - Complete Setup
Complete self-hosted omnichannel customer support desk.

codestorm
2
View Template
Paperless-ngx
Paperless-ngx — document management with OCR and full-text search

INAPP
1
View Template
Instatic CMS - Postgres
Design, build and manage powerful static sites from state-of-the-art CMS

Instatic
168