---
title: "Deploy strapi-source-20260617"
description: "Strapi v5 CMS with private Postgres and persistent uploads."
category: "CMS"
url: https://railway.com/deploy/strapi-source-20260617
---

# Deploy strapi-source-20260617

Strapi v5 CMS with private Postgres and persistent uploads.

**[Deploy strapi-source-20260617 on Railway](https://railway.com/template/strapi-source-20260617)**

- **Creator:** leodev
- **Category:** CMS

## Template content

### strapi

- **Image:** node:22-slim
- **Start command:** `/bin/sh -lc 'set -e
export HOME=/tmp
if [ ! -f /srv/app/package.json ]; then
  apt-get update
  apt-get install -y git python3 make g++ ca-certificates
  rm -rf /var/lib/apt/lists/*
  npm config set fetch-retry-maxtimeout 600000 -g
  npx --yes create-strapi-app@latest /srv/app --no-run --install --use-npm --skip-cloud --no-git-init --non-interactive --dbclient postgres --dbhost "$DATABASE_HOST" --dbport "$DATABASE_PORT" --dbname "$DATABASE_NAME" --dbusername "$DATABASE_USERNAME" --dbpassword "$DATABASE_PASSWORD" --dbssl false
fi
cd /srv/app
npm config set fetch-retry-maxtimeout 600000 -g
npm install
npm run build
exec npm run start'`
- **Public domain:** Yes

### postgres

- **Image:** postgres:17

## Documentation

# Deploy and Host Strapi v5 + Postgres on Railway

Strapi is an open-source headless CMS for building content APIs and admin workflows. This Railway template deploys a Strapi v5 project backed by a private Postgres database, generated production secrets, and persistent local uploads.

Published marketplace code: `strapi-source-20260617`

Published template ID: `72befc61-0842-4ab3-9500-8bfa151cc545`

## About Hosting Strapi v5 + Postgres

Strapi does not publish official Docker images, so this template uses the official Strapi project generator inside a Node.js runtime and persists the generated Strapi app on a Railway volume. The first boot creates a Strapi v5 app configured for Postgres; later restarts reuse the persisted app and database.

The Strapi service is public on port `1337`. Postgres is private inside the Railway project network.

## Why Deploy Strapi v5 + Postgres on Railway

Railway can provision the Strapi runtime, private Postgres database, generated secrets, persistent uploads, and public HTTPS routing in one deploy flow. This gives teams a durable Strapi v5 starting point while leaving production-specific storage and email providers configurable after deploy.

## Common Use Cases

- Headless CMS for websites and apps
- Content API backend for frontend teams
- Admin panel for editors
- REST and GraphQL-ready content platform
- Starter Strapi v5 deployment with Postgres persistence

## Dependencies for Strapi v5

### Deployment Dependencies

- Node.js 22 runtime
- Strapi v5 generated with `create-strapi-app`
- Postgres 17 for Strapi content and admin state
- Persistent Strapi app/uploads volume at `/srv/app`
- Generated Strapi secrets: `APP_KEYS`, `API_TOKEN_SALT`, `ADMIN_JWT_SECRET`, `JWT_SECRET`, `TRANSFER_TOKEN_SALT`, and `ENCRYPTION_KEY`

## Post-Deploy Setup

Open `/admin` on the public Strapi URL and create the first admin user. Then create content types, configure roles/permissions, and add storage/email providers if needed.

This template does not bundle S3/R2 credentials, SMTP credentials, or a prebuilt custom Strapi schema.

## Persistence

Strapi content/admin state persists in Postgres. The generated Strapi project and local uploads persist on the Strapi service volume at `/srv/app`. For production media at scale, configure an external upload provider such as S3 or Cloudflare R2 after deploy.

## Validation Evidence - 2026-06-17

- Fresh Strapi marketplace search justified the build: legacy `strapi` had 2,840 deploys/96 health; visible `Strapi 5` had 308 deploys/84 health; several v5/S3 results had low deploy counts or missing images.
- Source project `strapi-source-20260617` deployed `strapi` and `postgres` to `SUCCESS`.
- Source Strapi `/_health` returned HTTP 204 after first app generation/build.
- Source `/admin` returned HTTP 200 and `/admin/init` reported `hasAdmin: false` before setup.
- Source first admin registration and login returned HTTP 200.
- Source `/_health` returned HTTP 204 after a `strapi` restart; `/admin/init` reported `hasAdmin: true`; admin login still returned HTTP 200.
- Public-template test project `strapi-test` deployed both services to `SUCCESS`.
- Public-template Strapi `/_health` returned HTTP 204 after first app generation/build.
- Public-template `/admin` returned HTTP 200 and `/admin/init` reported `hasAdmin: false` before setup.
- Public-template first admin registration and login returned HTTP 200.
- Public-template `/_health` returned HTTP 204 after a `strapi` restart; `/admin/init` reported `hasAdmin: true`; admin login still returned HTTP 200.
- Source and public-template test projects were deleted after validation; cleanup audit returned `[]`.


## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Paperless-ngx — document management with OCR and full-text search
- [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/strapi-source-20260617
