Deploy Ghost
Ghost 6 blog, newsletter and membership platform with MySQL 8
Just deployed
/var/lib/ghost/content
MySQL
Just deployed
/var/lib/mysql
Deploy and Host Ghost on Railway
Ghost is an open-source publishing platform for blogs, newsletters and paid memberships. It combines a fast editor, built-in SEO, email newsletters and member subscriptions with Stripe, so writers and publishers can run and grow a publication on their own server without a pile of plugins.
About Hosting Ghost
Hosting Ghost means running its Node.js server next to a MySQL 8 database, the only database Ghost supports in production. Ghost keeps uploaded images, themes and files in a content folder, which needs a persistent volume, and it needs its public URL to build links, feeds and sitemaps. This template deploys Ghost 6.77.0 from a GitHub repo that pins the official image, plus MySQL 8.4, each with its own volume. The site URL, database connection and passwords are filled in for you. Open /ghost/ after the deploy to create the owner account. Email (newsletters, staff invites) is optional and needs SMTP settings.
Common Use Cases
- Personal or company blogs with built-in SEO, RSS and sitemaps
- Email newsletters and paid membership sites
- Product changelogs, documentation hubs and editorial publications
Dependencies for Ghost Hosting
- MySQL 8 (this template deploys
mysql:8.4.13) - Persistent volumes for Ghost content (
/var/lib/ghost/content) and MySQL data (/var/lib/mysql)
Deployment Dependencies
- Ghost documentation and configuration reference
- Official Ghost image on Docker Hub
- Ghost releases
- Template repo: aalfath/ghost-cms-railway-template
Implementation Details
- Ghost builds from the template repo, so you get an update notice on Railway when the pinned Ghost version changes. Read the repo's CHANGELOG and back up the MySQL volume before applying one: Ghost runs database migrations on start.
- The public domain targets Ghost's port 2368. Railway's health check probes a small endpoint on
PORT(8080) that answers once Ghost does, because Ghost redirects plain HTTP to https. - Custom domain: add it on the Ghost service, then set
urltohttps://YOUR-DOMAIN. - Email: add
mail__transport=SMTP,mail__options__host,mail__options__port,mail__options__secure,mail__options__auth__user,mail__options__auth__passandmail__fromto the Ghost service. Staff device verification (security__staffDeviceVerification) is off by default because it needs email.
Why Deploy Ghost 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 Ghost 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