Deploy Ghost CMS + MySQL
Ghost CMS with MySQL 8, persistent volumes, and private networking.
mysql
Just deployed
/var/lib/mysql
ghost
Just deployed
/var/lib/ghost/content
Deploy and Host Ghost CMS + MySQL on Railway
Ghost is an open-source publishing platform built for modern blogs, newsletters, memberships, and editorial sites. This template packages Ghost 6 with MySQL 8, persistent volumes, and Railway private networking so you get a clean, production-ready starting point without hand-wiring database connections or storage.
About Hosting Ghost CMS + MySQL
This template deploys Ghost on the official Docker image and MySQL 8 on a separate private Railway service. Ghost content persists on a dedicated volume, MySQL data persists on its own volume, and the app is configured to use Railway's public domain plus private service-to-service networking. Database passwords are generated automatically for each deployment, so you can launch quickly and then customize themes, email, and custom domains after the initial boot.
Common Use Cases
- Launch a self-hosted blog with Ghost's built-in editor and membership features
- Run a newsletter publication with subscriber management and paid tiers
- Power a company blog or editorial site without managing servers manually
- Start a client publication stack that can be customized with themes and integrations
Dependencies for Ghost CMS + MySQL Hosting
- Ghost 6 via the official Docker image
- MySQL 8 for Ghost content and admin data
- Railway volumes for persistent Ghost uploads and database storage
- Railway private networking for app-to-database traffic
Deployment Dependencies
- Ghost docs: https://docs.ghost.org/
- Ghost Docker image: https://hub.docker.com/_/ghost
- Railway volumes: https://docs.railway.com/guides/volumes
- Railway private networking: https://docs.railway.com/networking/private-networking
Implementation Details
url="https://${{RAILWAY_PUBLIC_DOMAIN}}"
PORT="2368"
server__host="0.0.0.0"
server__port="2368"
database__client="mysql"
database__connection__host="${{mysql.RAILWAY_PRIVATE_DOMAIN}}"
database__connection__port="3306"
database__connection__user="${{mysql.MYSQL_USER}}"
database__connection__database="${{mysql.MYSQL_DATABASE}}"
database__connection__password="${{mysql.MYSQL_PASSWORD}}"
MySQL defaults:
MYSQL_DATABASE="ghost"
MYSQL_USER="ghost"
MYSQL_PASSWORD="${{secret(32)}}"
MYSQL_ROOT_PASSWORD="${{secret(32)}}"
Why Deploy Ghost CMS + MySQL 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 CMS + MySQL 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
mysql
mysql:8.4ghost
ghost:6-alpine