---
title: "Deploy ghost-cms-v2"
description: "Ghost 6 + MySQL with persistent content volume and HTTPS"
category: "CMS"
url: https://railway.com/deploy/ghost-cms-v2
---

# Deploy ghost-cms-v2

Ghost 6 + MySQL with persistent content volume and HTTPS

**[Deploy ghost-cms-v2 on Railway](https://railway.com/template/ghost-cms-v2)**

- **Creator:** Visitera
- **Category:** CMS

## Template content

### Ghost

- **Image:** ghost:6-alpine
- **Start command:** `sh -c 'node -e "const n=require(\"net\");const h=process.env.database__connection__host;const p=+(process.env.database__connection__port||3306);const t=Date.now();(function w(){const s=n.connect(p,h,()=>{s.end();console.log(\"mysql ready\");process.exit(0)});s.on(\"error\",()=>{if(Date.now()-t>120000)process.exit(1);setTimeout(w,2000)})})()" && node current/index.js'`
- **Public domain:** Yes

### MySQL https://devicons.railway.app/i/mysql.svg

- **Image:** mysql:9.4
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G`

## Documentation

# Deploy and Host Ghost CMS on Railway

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

## About Hosting Ghost CMS

Ghost is an open-source publishing platform for blogs, newsletters, and membership sites. This template provisions a production Ghost service from the official `ghost:6-alpine` image, pairs it with Railway MySQL over private networking, and mounts a persistent volume at `/var/lib/ghost/content` so themes and uploads survive deploys. Ghost waits for MySQL before boot to avoid first-boot migration races.

## Common Use Cases

- Self-hosted blogs and publications
- Newsletters and membership sites
- Headless CMS via Ghost Content API
- Marketing sites with Ghost themes

## Dependencies for Ghost CMS Hosting

- Railway MySQL (included) for posts, members, and settings
- Ghost content volume for themes, images, and settings
- Optional SMTP provider for member auth and newsletters

### Deployment Dependencies

- Ghost Docker image: `ghost:6-alpine`
- MySQL connection variables: `MYSQLHOST`, `MYSQLPORT`, `MYSQLDATABASE`, `MYSQLUSER`, `MYSQLPASSWORD`
- Public URL: `https://${{RAILWAY_PUBLIC_DOMAIN}}`
- Volume mount: `/var/lib/ghost/content`

## Why Deploy Ghost CMS on Railway?

Railway hosts Ghost, MySQL, volumes, and HTTPS in one project so you can publish without managing servers, TLS, or database networking yourself.


## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — [Jul'26] Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Document management with OCR on Railway with PostgreSQL and Redis
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/ghost-cms-v2
