---
title: "Deploy Directus | Pinned, With Admin Credentials You Can Find"
description: "Pinned image, admin password in variables instead of the deploy log."
category: "CMS"
url: https://railway.com/deploy/directus-or-pinned-with-admin-credential
---

# Deploy Directus | Pinned, With Admin Credentials You Can Find

Pinned image, admin password in variables instead of the deploy log.

**[Deploy Directus | Pinned, With Admin Credentials You Can Find on Railway](https://railway.com/template/directus-or-pinned-with-admin-credential)**

- **Creator:** Pavel Volkov's Projects
- **Category:** CMS
- **Total deploys:** 1

## Template content

### PostGIS

- **Image:** postgis/postgis:17-3.5

### Redis

- **Image:** redis:8.6.5-alpine
- **Start command:** `/bin/sh -c 'redis-server --requirepass "$REDIS_PASSWORD" --appendonly yes --bind 0.0.0.0 :: --protected-mode no'`

### Directus

- **Image:** directus/directus:12.2.0
- **Public domain:** Yes

## Documentation

# Directus

The headless CMS on Postgres with PostGIS, Redis caching and a volume for uploads.
Every image pinned, and admin credentials you can actually find.

## What this fixes

The existing Directus template is well built - PostGIS and Redis are pinned, files
go to S3, caching and websockets are on. Two things are wrong with it.

**The Directus image itself is `:latest`** - the only unpinned image in a stack
that pins everything else. Two deploys a month apart are not the same CMS, and a
redeploy can change the application over a database it has already migrated.

**The administrator credentials only exist in the deploy log.** Directus creates
the first user on bootstrap; with no `ADMIN_EMAIL` and `ADMIN_PASSWORD` set it
generates them and prints them, so getting in means scrolling through logs - and
after the log rotates, or the volume is lost, that password is gone. Here both are
template variables: the password is generated, and it is in your service settings
where you can read it and change it.

## What you get

`directus/directus:12.1.1`, `postgis/postgis:17-3.5`, `redis:8.6.5-alpine`.
Log in at the domain with `admin@example.com` and the generated
`ADMIN_PASSWORD`.

## Verified

By using it. Deployed from this template, logged in with the generated password,
read back the administrator over the API, and created a collection - which is a
schema write, not a health check. A wrong password returns 401.

## Files

Uploads are on a volume at `/directus/uploads` rather than S3, so the template
has no external dependency and nothing to configure. For larger installations
switch `STORAGE_LOCATIONS` to S3 and point it at a bucket; Directus supports
both, and the variables are the ones in its own documentation.

## Configuration

Nothing to fill in. `KEY`, `SECRET`, the database password and the admin password
are all generated. `KEY` and `SECRET` should not be changed after first boot -
they sign sessions and tokens.

Source images and configuration follow the Directus documentation; Directus itself
is by Monospace Inc, under the Directus BSL.


## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — [Jul'26] Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Document management with OCR on Railway with PostgreSQL and Redis
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/directus-or-pinned-with-admin-credential
