Deploy Ghost CMS + MySQL
Ghost 6 with MySQL 8, volumes, private networking, and safer startup.
mysql
Just deployed
/var/lib/mysql
ghost
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: officialghost:6-alpineimage exposed on port2368mysql: officialmysql:8.4image 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 URLdatabase__connection__host: private MySQL hostdatabase__connection__user: MySQL application userdatabase__connection__password: generated MySQL application passwordMYSQL_PASSWORD: generated MySQL passwordMYSQL_ROOT_PASSWORD: generated MySQL root password
After Deploy
- Open the Ghost public URL.
- Complete Ghost's first-admin setup.
- Add SMTP variables if newsletters or transactional email are needed.
- 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
mysql
mysql:8.4ghost
ghost:6-alpine