Deploy Directus

Headless CMS and data platform with Postgres, Redis and S3 bucket storage

Deploy Directus

Just deployed

/data

/var/lib/postgresql/data

Just deployed

Bucket

Bucket

Just deployed

Deploy and Host Directus on Railway

Directus is a data platform and headless CMS. It sits on top of a SQL database, gives your team a no-code app for managing content and files, and generates REST and GraphQL APIs for the same data. Directus 12 is source-available under the MSCL-1.0-GPL licence.

About Hosting Directus

Hosting Directus means running its Node.js server next to a SQL database, with durable storage for uploaded files and a shared cache. This template runs the official directus/directus 12.6.1 image, pinned by digest, with Railway's PostgreSQL, Redis for caching, rate limiting and websocket sync, and a Railway bucket for uploads and extensions, so the Directus service keeps no local state. On first boot Directus creates its tables and an administrator from the email you enter and a generated password. Database, Redis and bucket credentials are wired in with Railway reference variables, and a /server/ping health check gates every deploy.

Common Use Cases

  • Headless CMS for websites and apps built with Next.js, Nuxt, Astro or mobile frameworks
  • Admin app plus REST and GraphQL APIs over a PostgreSQL database
  • Digital asset library, internal tools and content workflows with roles and permissions

Dependencies for Directus Hosting

  • PostgreSQL 18 (Railway's postgres-ssl image, with a volume)
  • Redis 8.2 (cache, rate limiter and websocket sync, with a volume)
  • Railway bucket (S3-compatible storage for uploads and extensions)

Deployment Dependencies

Implementation Details

First sign-in. Open your Railway domain and sign in with ADMIN_EMAIL and the generated ADMIN_PASSWORD (Directus service → Variables), then change the password in your user profile. Directus creates this admin only on the first boot, so changing ADMIN_PASSWORD later has no effect. Because the admin exists from the start, a stranger can't use Directus's first-run setup screen to claim your new instance.

Licence. Directus 12 is licensed under MSCL-1.0-GPL. Instances without a licence key run on the Core tier, which has plan limits on user seats and collections. Individuals and organisations with under $5M annual revenue and fewer than 50 employees can get a free licence key through the Open Innovation Grant. Features such as SSO, custom permission rules and higher limits need a licence. Add a key under Settings → License.

Settings. The start command sets these defaults: Postgres client, IP_TRUST_PROXY=true, Redis-backed cache (with auto-purge), rate limiter and sync store, websockets on, and S3 storage for files (STORAGE_LOCATIONS=s3) and extensions (EXTENSIONS_LOCATION=s3). To override any of them except the database client, add a service variable with the same name.

Email. No mail server is configured, so password-reset and invite emails won't be sent. To enable them, set EMAIL_TRANSPORT=smtp, EMAIL_FROM and the EMAIL_SMTP_* variables.

Health check. Since Directus 12, /server/health requires a signed-in user, so the template checks /server/ping.

Why Deploy Directus on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Directus on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


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