Railway

Deploy Ghost CMS + MySQL

Ghost 6 with MySQL 8, volumes, private networking, and safer startup.

Deploy Ghost CMS + MySQL

Just deployed

/var/lib/mysql

Just deployed

/var/lib/ghost/content

Deploy and Host Ghost CMS + MySQL on Railway

Run Ghost 6 on Railway with MySQL 8, persistent content storage, persistent database storage, private networking, and a Railway public domain.

About Hosting Ghost CMS + MySQL on Railway

  • ghost: official ghost:6-alpine image exposed on port 2368
  • mysql: official mysql:8.4 image on Railway private networking
  • Persistent Ghost content volume at /var/lib/ghost/content
  • Persistent MySQL volume at /var/lib/mysql
  • Generated MySQL application and root passwords
  • Ghost configured with Railway's public domain and private MySQL host

Why Deploy Ghost CMS + MySQL on Railway

The validated local template waits for MySQL before Ghost starts, which prevents first-boot migration failures when the app beats the database online. It also avoids a Railway HTTP healthcheck path because Ghost redirects common public paths to the canonical site URL while Railway healthchecks need a direct 200.

Current live note: the published ghost-cms-mysql marketplace template still needs this reliability fix applied in the Railway template editor. Do not replace it with a new template unless preserving the existing URL and earnings history is no longer required.

Validation Proof

  • Fixed source validation project: ghost-cms-mysql-fix-20260523
  • Fixed Ghost deployment reached SUCCESS
  • Final fixed deployment: 5fd6cd70-9abb-4614-9aa4-9f6d62f7cdc2
  • Public Ghost URL returned HTTP 200
  • Temporary validation project and draft were deleted after verification

Common Use Cases

  • Self-hosted blogs and publications
  • Editorial sites
  • Newsletter-backed Ghost installs
  • Membership and audience experiments
  • Ghost evaluation environments

Dependencies for Ghost CMS + MySQL Hosting

Ghost stores content in MySQL and uploaded media/themes on the Ghost content volume. MySQL stays private; only the Ghost web service receives a public domain.

Deployment Dependencies

  • url: Railway public Ghost URL
  • database__connection__host: private MySQL host
  • database__connection__user: MySQL application user
  • database__connection__password: generated MySQL application password
  • MYSQL_PASSWORD: generated MySQL password
  • MYSQL_ROOT_PASSWORD: generated MySQL root password

After Deploy

  1. Open the Ghost public URL.
  2. Complete Ghost's first-admin setup.
  3. Add SMTP variables if newsletters or transactional email are needed.
  4. Keep Ghost as a single app instance unless storage, sessions, and queueing are redesigned for horizontal scale.

Support Checklist

If a deploy fails, include the ghost and mysql deployment IDs, the first 80 lines of ghost logs, and whether the public URL reaches the Ghost setup page.


Template Content

More templates in this category

View Template
Pixelfed
Explore + Share beautiful photos and videos on the Fediverse

Evan Boehs
View Template
NodeBB
Node.js based forum software built for the modern web

Six
View Template
WordPress + MySQL
Zero Config | One click | WordPress | Docker | MySQL

YAV.AI
1.3K
Deploy