Deploy Ghost

Ghost 6 blog, newsletter and membership platform with MySQL 8

Deploy Ghost

/var/lib/ghost/content

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

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 url to https://YOUR-DOMAIN.
  • Email: add mail__transport=SMTP, mail__options__host, mail__options__port, mail__options__secure, mail__options__auth__user, mail__options__auth__pass and mail__from to 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

More templates in this category

View Template
Libredesk - Complete Setup
Complete self-hosted omnichannel customer support desk.

codestorm
2
View Template
Paperless-ngx
Paperless-ngx — document management with OCR and full-text search

INAPP
1
View Template
Instatic CMS - Postgres
Design, build and manage powerful static sites from state-of-the-art CMS

Instatic
169