
Deploy Ghost
Professional publishing platform for blogs, newsletters, and memberships.
Ghost
Just deployed
/var/lib/ghost/content
MySQL
Just deployed
/var/lib/mysql
Deploy and Host Ghost on Railway
Ghost is a powerful open-source publishing platform built for professional creators. It combines a fast, minimalist CMS with native memberships, paid subscriptions, newsletters, and SEO tooling, letting bloggers, journalists, and publishers run and monetize a modern publication without the bloat of traditional CMSs.
About Hosting Ghost
Hosting Ghost means running a Node.js application that serves your site on port 2368, backed by a MySQL 8 database — the only database Ghost supports in production. Ghost needs persistent storage for uploaded images, themes, and content files, plus a canonical url setting so it can generate correct links, RSS feeds, and sitemaps. On Railway, Ghost runs as one service with a persistent volume at /var/lib/ghost/content, connected over the private network to a MySQL 8.4 service with its own volume at /var/lib/mysql. Configuration is done entirely through environment variables — database connection, site URL, and mail — with no config files to manage. Railway handles TLS, the public domain, scaling, and restarts, so a production-grade Ghost deploy is a one-click operation.
Common Use Cases
- Independent blogs and editorial publications with built-in SEO and newsletters
- Membership and paid-subscription sites monetizing premium content
- Documentation, changelog, or content hub for a product or company
Dependencies for Ghost Hosting
- MySQL 8 (this template deploys
mysql:8.4.4; Ghost requires MySQL 8 in production) - Persistent volumes for Ghost content (
/var/lib/ghost/content) and MySQL data (/var/lib/mysql)
Deployment Dependencies
- Ghost self-hosting documentation
- Ghost configuration reference (env vars)
- Ghost on Docker Hub — official image (
ghost:6.54.0) - Ghost source repository
Implementation Details
- Two services:
Ghost(imageghost:6.54.0) andMySQL(imagemysql:8.4.4), each with a persistent volume. - Ghost is configured entirely via environment variables:
database__client=mysql,database__connection__host=${{MySQL.RAILWAY_PRIVATE_DOMAIN}}(private networking),database__connection__user=root,database__connection__password=${{MySQL.MYSQL_ROOT_PASSWORD}},database__connection__database=${{MySQL.MYSQL_DATABASE}},url=https://${{Ghost.RAILWAY_PUBLIC_DOMAIN}},security__staffDeviceVerification=false. - On first deploy, set the prompted variables:
MYSQL_ROOT_PASSWORD(any strong random string; Ghost references it automatically),MYSQL_DATABASE(useghost),database__client(mysql),database__connection__user(root), andsecurity__staffDeviceVerification(false). - A Railway-provided public domain targets Ghost's port
2368; the admin panel is served at/ghost. - Optional: add
mail__transport=SMTPplusmail__options__host,mail__options__port,mail__options__auth__user,mail__options__auth__pass, andmail__fromon the Ghost service to enable newsletters, magic links, and staff invites. Without mail config, Ghost sends no 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
Ghost
ghost:6.54.0MySQL
mysql:8.4.4