惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LangChain Blog
博客园 - 【当耐特】
I
InfoQ
腾讯CDC
人人都是产品经理
人人都是产品经理
H
Help Net Security
Y
Y Combinator Blog
B
Blog
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 叶小钗
D
Docker
博客园 - 聂微东
B
Blog RSS Feed
G
Google Developers Blog

Railway Blog

Where Railway is, and where it's going (Summer 2026) PaaS vs IaaS vs SaaS: What Each Means and Who Should Pick What in 2026 The Best Continuous Deployment Tools in 2026 The Best PaaS for Multi-Region Deployments in 2026 The Best Platforms for Monorepo Deployments in 2026 Compliance Isn't a Feature, It's a Posture What is BYOC (Bring Your Own Cloud)? A Developer's Guide for 2026 The Best Managed Kubernetes Hosting in 2026 The Best Container Registries in 2026 The Vanilla Cloud Tax: What Rolling Your Own on AWS Actually Costs What is a PaaS? A Developer's Guide for 2026 The Best Cloud Observability and Logging Tools in 2026 The Best PostgreSQL Hosting for Developers in 2026 The Best Multi-Region Hosting Platforms in 2026 The Best Platforms to Deploy AI Apps in 2026 (Not the Models, the Apps Around Them) Incident Report: May 19, 2026- GCP Account Suspension Counting to 3 with a new builder processing 50M+ monthly builds Railway iOS preview now available via TestFlight Kill your onboarding: selling to 10,000+ new users a day Your AI wants to nuke your database. Guardrails fix that. Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI Moving Railway's Frontend Off Next.js One command deploys, there's a Stripe APP for that From registrar to deployed: buying a domain inside Railway A letter to open source builders who deserve more Networking is a black box, we used eBPF to open it Heroku Walked So Railway Can Run Security Features Your Security Team Will Love Railway Runs Open Source, Now We're Funding It Railway raises $100M Series B to unburden the builders
Deploy Ghost on Railway
Faraz Patankar · 2021-06-11 · via Railway Blog

In this post, we go over the process of deploying and maintaining a Ghost (a free and open-source publishing platform) instance connected to a MySQL database on Railway!


Ghost is an open-source publishing platform for building and running blogs, magazines, and journals. You can choose from an array of free and paid themes from their marketplace or even build your own. Ghost also allows you to send newsletters and monetize your blog by setting up subscriptions using Stripe.

The company behind Ghost offers a hosted version starting at $9/month but you can also self-host Ghost. At Railway, we provide a free one-click deploy for Ghost using a MySQL database which we automagically provision for you.

Deploying with Railway

Deploy on Railway

To deploy your Ghost instance on Railway, simply click the button above (source code), enter the mentioned environment variables and hit deploy. The required MySQL database will be automagically provisioned and the required database migrations will be run for you.

The environment variables we ask you to enter are all optional but we highly recommend entering them to run a full-fledged Ghost blog.

  • CLOUDINARY_URL: Railway's filesystem is ephemeral. Which means that any changes to the filesystem are not persisted between deploys. This is why we've set up Cloudinary for the Ghost blog. All the media in your blog post will be stored on your Cloudinary account and served via their CDN.
  • MAILGUN_SMTP_LOGIN and MAILGUN_SMTP_PASSWORD: Mailgun is the default email provider that works with Ghost. Adding these environment variables allows you to email your subscribers whenever you publish a new post and also to invite additional team members to publish posts and manage the blog.

Changing the theme

By default, we've bundled two themes (Casper and Lyra) with the Ghost starter. If you'd like to use a different theme (take Pico as an example), here are the steps you need to follow:

  • First, add the theme as a dependency to the package.json file.
{
	...
	dependencies: {
		"pico": "github:TryGhost/Pico#main"
		...
	}
}
  • Next, add the theme name to the list of themes in the themes.sh file.
themes=(
	casper
	lyra
	pico
)
...
  • Push your changes to Github and your project should be redeployed automatically.

💡 Do not add a theme directly using the Ghost UI. While it will appear to work initially, the install will not persist due to Railway's ephemeral filesystem.

Homepage of a Ghost blog deployed on Railway
Homepage of a Ghost blog deployed on Railway

Closing

And with that you should have all the information you need to set up your blog on Railway using Ghost. You should be able to write and publish posts, invite teammates, set up a newsletter and subscriptions. You can even attach a custom domain to your Ghost instance.

If you have any suggestions for more open-source self-hosted solutions you'd like to see guides for, let us know on Discord. Or even better, submit a pull request to our starters repository on Github!