Ghost Blog Starter
One-click deploy on Railway!
A professional publishing platform built on Node.js, featuring MySQL database support, Cloudinary image storage, and Mailgun email integration
This boilerplate is a pre-configured Ghost blog setup optimized for deployment on Railway. It includes a complete backend and admin dashboard, with support for MySQL database, Cloudinary image storage, and Mailgun email integration. The project is ready to use as-is when hosted on Railway.
Updated to version 5.112.0 🥳
- MySQL Database: Robust and reliable database storage
- Cloudinary Integration: Cloud-based image storage with local fallback
- Mailgun Integration: Professional email delivery service
- Admin Dashboard: Full-featured content management system
- SEO Optimized: Built-in SEO tools and features
- Use the one-click deploy template:
- Railway will automatically configure the following environment variables:
DB_HOST="${MySQL.MYSQLHOST}"
DB_NAME="${MySQL.MYSQLDATABASE}"
DB_USER="${MySQL.MYSQLUSER}"
DB_PASSWORD="${MySQL.MYSQLPASSWORD}"
PUBLIC_URL="https://${RAILWAY_PUBLIC_DOMAIN}"
NODE_ENV="production"- Optional: Configure additional integrations:
# Cloudinary Configuration (optional)
CLOUDINARY_URL="" # Example: cloudinary://<id>:<secret>@<cloud-name>
# Mailgun Configuration (recommended for member signups & magic links)
# Option 1: Mailgun API (RECOMMENDED - more reliable on Railway)
MAILGUN_API_KEY="" # Example: key-xxxxxxxxxxxxx
MAILGUN_DOMAIN="" # Example: mg.yourdomain.com or yourdomain.com
# Option 2: Mailgun SMTP (fallback if API not configured)
MAILGUN_SMTP_LOGIN="" # Example: postmaster@yourdomain.com
MAILGUN_SMTP_PASSWORD=""
MAILGUN_SMTP_HOST="" # Optional: smtp.mailgun.org (default)
MAILGUN_SMTP_PORT="" # Optional: 2525 (default), also try 587Important: The Mailgun API configuration is preferred over SMTP as it's more reliable for member signups, magic links, and password resets. SMTP ports may be blocked by some hosting providers.
While the project is ready to use as-is on Railway, if you need to make customizations:
- Deploy to Railway first (using button above)
- Use Railway's "Eject to Git Repository" feature to create your own repository
- Clone your ejected repository locally
This approach ensures your local development remains connected to Railway's CI/CD pipeline.
After cloning your ejected repository:
-
Install dependencies:
npm install
-
Set up your environment configuration:
- Copy
.env.exampleto.env:cp .env.example .env
- Configure your
.envfile with appropriate values:# Basic Configuration PUBLIC_URL=http://localhost:2368 PORT=2368 # Database Configuration DB_HOST=localhost DB_USER=your_database_user DB_PASSWORD=your_database_password DB_NAME=ghost # Mail Configuration (optional) MAILGUN_SMTP_LOGIN=postmaster@your-domain.mailgun.org MAILGUN_SMTP_PASSWORD=your_mailgun_password # Cloudinary Configuration (optional) CLOUDINARY_URL=cloudinary://your_api_key:your_api_secret@your_cloud_name CLOUDINARY_FOLDER=ghost-blog-images # Webhook Configuration (Cloudflare Access Service Tokens) - optional CLOUDFLARE_WEBHOOK_CLIENT_ID=your_client_id CLOUDFLARE_WEBHOOK_CLIENT_SECRET=your_client_secret
- Copy
-
Run post-installation setup:
npm run postinstall
-
Start the development server:
npm run dev
- Railway Account for deployment
- MySQL Database (automatically provisioned by Railway)
- Cloudinary Account (optional, falls back to local storage)
- Mailgun Account (optional, for email delivery)
npm install- Install dependenciesnpm run postinstall- Run post-installation setupnpm run dev- Start development servernpm start- Start production server