Ghost Blog Starter
One-click deploy on Railway!
A professional publishing platform built on Node.js, featuring MySQL database support, Cloudinary image storage, and Railway-friendly source deployment
This boilerplate is a pre-configured Ghost blog setup optimized for deployment on Railway. It is based on the published standalone Ghost source package, includes the full backend and admin dashboard, and keeps the simple Railway deployment flow from the earlier template while updating the codebase to Ghost 6.
Updated to version 6.28.0
- Ghost 6 Source Build: Runs directly from source at the repo root, so Railway users can update by switching branches without changing root directory settings
- MySQL Database: Ready for Railway MySQL or local MySQL
- Cloudinary Integration: Cloud-based image storage with local fallback when
CLOUDINARY_URLis not set - Admin Dashboard: Full Ghost admin interface included
- Railway-Friendly Bootstrap:
npm startregeneratesconfig.production.jsonautomatically before boot
- Use the one-click deploy link:
- Railway should provide or let you configure:
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 integrations:
# Cloudinary Configuration
CLOUDINARY_URL="" # Example: cloudinary://<api_key>:<api_secret>@<cloud_name>
CLOUDINARY_FOLDER="ghost-blog-images"
# Mail Configuration
MAIL_FROM="" # Optional. Falls back to MAILGUN_SMTP_LOGIN or noreply@MAILGUN_DOMAIN
MAILGUN_API_KEY=""
MAILGUN_DOMAIN=""
# SMTP fallback
MAILGUN_SMTP_LOGIN=""
MAILGUN_SMTP_PASSWORD=""
MAILGUN_SMTP_HOST=""
MAILGUN_SMTP_PORT=""- Recommended Railway start command:
npm startIf an older deployment is still using:
npm run postinstall && npm run startthat should still work too. New projects should use npm start.
- Install dependencies:
npm install-
Copy
.env.exampleto.env -
Configure your local database and optional Cloudinary settings
-
Initialize the database once:
NODE_ENV=production npx knex-migrator-initWindows PowerShell:
$env:NODE_ENV='production'
npx.cmd knex-migrator-init- Start Ghost:
npm startFor development mode:
npm run devThis branch is designed so existing Railway projects based on the older template can update without needing to reconfigure Railway root directories. The intended upgrade flow is:
- switch the Railway project to this branch
- keep the same env var contract
- point the app at an upgraded or migrated MySQL database
- redeploy
If your live project is already using the older start command, it should continue to boot after upgrading. For new projects, use npm start.
This Ghost 6 setup has been validated on Ghost 6 with MySQL and Railway:
- production boot succeeded
/returned200 OK/ghost/returned200 OK/ghost/api/admin/site/returned200 OK- Cloudinary image upload works
- email delivery works
npm install- Install dependenciesnpm run postinstall- Generate runtime config and verify bootstrap filesnpm start- Regenerate config and start Ghost in production modenpm run dev- Start Ghost in development mode