Strapi
A popular self-hosted CMS
Postgres
railwayapp-templates/postgres-ssl:14
Just deployed
/var/lib/postgresql/data
Strapi
railwayapp-templates/strapi
Just deployed
/public/uploads
Deploy and Host Strapi on Railway
Strapi is an open-source headless CMS that empowers developers to create stunning, content-rich applications with ease. The leading open-source headless CMS, 100% JavaScript/TypeScript, flexible and fully customizable.
About Hosting Strapi
With Strapi, you can manage your content in a customizable admin panel, which can be easily adapted to suit your specific needs. This powerful CMS provides you with complete control over your content, allowing you to create, edit, and publish content across multiple platforms and devices. With just one click, you can deploy your Strapi project to the Railway cloud platform, and in about 5 minutes of avg. build time: you get a template that gives you a foundation for your blogs and websites. When this template is running on Railway Strapi will connect to the Postgres Database through the private network, saving you on database egress fees.
Common Use Cases
- Content Management: Manage content for blogs and websites with a customizable admin panel
- Multi-platform Publishing: Create, edit, and publish content across multiple platforms and devices
- API Development: Build custom APIs, routes, and plugins for content delivery to any frontend
Dependencies for Strapi Hosting
The Railway template includes the required Node.js runtime and PostgreSQL database with pre-configured connections.
Deployment Dependencies
Implementation Details
Strapi Community Edition Features:
- Modern Admin Panel: Elegant, entirely customizable and a fully extensible admin panel
- Multi-database support: You can choose the database you prefer: PostgreSQL, MySQL, MariaDB, and SQLite
- Customizable: You can quickly build your logic by fully customizing APIs, routes, or plugins to fit your needs perfectly
- Blazing Fast and Robust: Built on top of Node.js and TypeScript, Strapi delivers reliable and solid performance
- Front-end Agnostic: Use any front-end framework (React, Next.js, Vue, Angular, etc.), mobile apps or even IoT
- Secure by default: Reusable policies, CORS, CSP, P3P, Xframe, XSS, and more
- Powerful CLI: Scaffold projects and APIs on the fly
Developing Locally:
When developing locally this Strapi template will connect to the Postgres server from its public TCP Proxy:
- Within the service settings of the Strapi service click the
Eject
button on the upstream repository - Clone that newly created repository locally
- Install Strapi's dependencies with
yarn install
ornpm install
- Install the Railway CLI with instructions found here
- If this is your first time using the CLI make sure to login with
railway login
- Within the local repository run
railway link
to link the local repository to the Strapi service on Railway - Start Strapi for development with
railway run yarn run develop
orrailway run npm run develop
- This command will run Strapi in development mode with the service variables available locally
- Open your browser to
http://127.0.0.1:1337/admin
Why Deploy Strapi 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 Strapi 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