Deploy strapi-source-20260617
Strapi v5 CMS with private Postgres and persistent uploads.
strapi
Just deployed
/srv/app
postgres
Just deployed
/var/lib/postgresql/data
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, andENCRYPTION_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
strapihad 2,840 deploys/96 health; visibleStrapi 5had 308 deploys/84 health; several v5/S3 results had low deploy counts or missing images. - Source project
strapi-source-20260617deployedstrapiandpostgrestoSUCCESS. - Source Strapi
/_healthreturned HTTP 204 after first app generation/build. - Source
/adminreturned HTTP 200 and/admin/initreportedhasAdmin: falsebefore setup. - Source first admin registration and login returned HTTP 200.
- Source
/_healthreturned HTTP 204 after astrapirestart;/admin/initreportedhasAdmin: true; admin login still returned HTTP 200. - Public-template test project
strapi-testdeployed both services toSUCCESS. - Public-template Strapi
/_healthreturned HTTP 204 after first app generation/build. - Public-template
/adminreturned HTTP 200 and/admin/initreportedhasAdmin: falsebefore setup. - Public-template first admin registration and login returned HTTP 200.
- Public-template
/_healthreturned HTTP 204 after astrapirestart;/admin/initreportedhasAdmin: true; admin login still returned HTTP 200. - Source and public-template test projects were deleted after validation; cleanup audit returned
[].
Template Content
strapi
node:22-slimHOST
PORT
APP_KEYS
NODE_ENV
JWT_SECRET
DATABASE_HOST
DATABASE_NAME
DATABASE_PORT
API_TOKEN_SALT
ENCRYPTION_KEY
DATABASE_CLIENT
ADMIN_JWT_SECRET
DATABASE_PASSWORD
DATABASE_USERNAME
TRANSFER_TOKEN_SALT
postgres
postgres:17PGDATA
POSTGRES_DB
POSTGRES_USER
POSTGRES_PASSWORD