---
title: "Deploy ghost_docker"
description: "A template for ghost with mysql on railway that uses api for email delivery"
category: "Other"
url: https://railway.com/deploy/ghostdocker
---

# Deploy ghost_docker

A template for ghost with mysql on railway that uses api for email delivery

**[Deploy ghost_docker on Railway](https://railway.com/template/ghostdocker)**

- **Creator:** Ehis's Projects
- **Category:** Other

## Template content

### MySQL-bZW4 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`

### ghost:latest https://res.cloudinary.com/dpzorccnu/image/upload/v1759786857/ghost-logo-dark_no4g1y.png

- **Image:** ghost:latest
- **Health check:** /
- **Public domain:** Yes

## Documentation

# Deploy and Host ghost_docker on Railway

Ghost is a powerful open-source headless CMS built for modern publishing. This template deploys a production-ready Ghost instance with MySQL database, perfect for blogs, newsletters, and membership sites - all configured for migrant entrepreneur news platforms like Peakberg.

## About Hosting ghost_docker

This template provides a one-click deployment of Ghost CMS with MySQL on Railway. It includes pre-configured email support (Mailgun/API), automatic SSL certificates, and healthcheck monitoring. Ghost boots in production mode with optimized performance settings. The setup supports custom domains, newsletter functionality, and member subscriptions out of the box. Perfect for content creators, publishers, and founders who want to launch quickly without infrastructure headaches. All environment variables are templated for easy customization. 
NB: api not smtp as railway not support smtp

## Common Use Cases


    News and Media Platforms - Launch TechCrunch-style publications with breaking news, articles, and analysis
    Newsletter Publications - Build Substack alternatives with native email newsletter features and paid subscriptions
    Professional Blogs - Create SEO-optimized content sites with custom themes and integrated analytics
    Membership Communities - Offer premium content with built-in member authentication and payment processing
    Company Blogs - Professional corporate blogs with team collaboration and content workflow


## Dependencies for ghost_docker Hosting

    MySQL Database - Required for Ghost's content storage (posts, users, settings). Railway's MySQL service auto-connects via MYSQL_URL.
    Email Service - Mailgun API-based services recommended for Railway.
    Node.js Runtime - Ghost runs on Node.js 18+ (included in Ghost Docker image, no separate setup needed).


### Deployment Dependencies


    Ghost Official Documentation - Complete Ghost setup and configuration guide
    Mailgun - Recommended email service with HTTP API support
    Postmark - Excellent for transactional emails (magic links)
    Ghost Themes - Free and premium themes for customization
    Ghost Content API - Headless CMS integration documentation


### Implementation Details 

# Core Configuration
NODE_ENV=production
url=https://yourdomain.com

# Database (Railway MySQL)
database__client=mysql2
database__connection__connectionString=${{MySQL.MYSQL_URL}}

# Server
server__port=2368
server__host=0.0.0.0

# Email - Mailgun API (Recommended)
mail__transport=Mailgun
mail__options__auth__apiKey=your-mailgun-api-key
mail__options__auth__domain=yourdomain.com
mail__from=noreply@yourdomain.com

## Why Deploy ghost_docker 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_docker 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.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/ghostdocker
