---
title: "Deploy Ghost"
description: "Ghost — self-hosted publishing platform for blogs and newsletters"
category: "CMS"
url: https://railway.com/deploy/ghost-3
---

# Deploy Ghost

Ghost — self-hosted publishing platform for blogs and newsletters

**[Deploy Ghost on Railway](https://railway.com/template/ghost-3)**

- **Creator:** INAPP
- **Category:** CMS
- **Total deploys:** 2

## Template content

### ghost

- **Image:** ghost:latest
- **Public domain:** Yes

### ghost-mariadb

- **Image:** mariadb:11.0

## Documentation

# Ghost

[![Deploy to Railway](https://railway.app/button.svg)](https://railway.com/deploy/ghost-1)

A self-hosted [Ghost](https://ghost.org) blogging platform, deployed on Railway with MariaDB.

## Features

- Self-hosted Ghost blogging platform (v6.54+)
- MariaDB database backend for reliable data storage
- Persistent volume for database data
- Automatic HTTPS with Railway
- Health monitoring via Railway proxy

## Deploy and Host

Click the Deploy to Railway button above to deploy Ghost to Railway in minutes. MariaDB database is provisioned automatically as a companion service.

## About Hosting

This template runs Ghost on Railway, a cloud platform that handles infrastructure, scaling, and HTTPS. All data is stored on a MariaDB persistent volume for durability.

## Why Deploy

- Self-host your blog content on infrastructure you control
- No lock-in — Ghost is open source and fully exportable
- Fully managed — Railway handles updates, scaling, and backups
- Production-ready with MariaDB from day one

## Common Use Cases

- Personal blog or newsletter
- Professional portfolio and publishing
- Membership site with paid subscriptions
- Corporate blog and content marketing

## Dependencies for

- Ghost 6.54 — Node.js blogging platform
- MariaDB 11.0 — Relational database

### Deployment Dependencies

| Dependency | Description |
|------------|-------------|
| MariaDB companion service | Database backend with persistent volume at `/var/lib/mysql` |
| Railway account | Must have access to 2+ services |

## Quick Start

1. Click the Deploy to Railway button above
2. MariaDB database is provisioned automatically as a companion service
3. Wait for provisioning (~3 minutes)
4. Access your Ghost blog at the deployed URL
5. Create your admin account at `/ghost/`

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `PORT` | Yes | Ghost application port (default: 2368) |
| `database__client` | Yes | Database type (`mysql`) |
| `database__connection__host` | Yes | MariaDB hostname (auto-configured) |
| `database__connection__port` | Yes | MariaDB port (auto-configured) |
| `database__connection__user` | Yes | MariaDB username |
| `database__connection__password` | Yes | MariaDB password |
| `database__connection__database` | Yes | MariaDB database name |
| `url` | Yes | Ghost public URL (auto-configured) |

## Architecture

Two-service deployment:
- **Ghost** — Official Ghost Docker image on port 2368
- **MariaDB** — MariaDB 11.0 database with persistent volume at `/var/lib/mysql`

## Deploy

1. Provision a Railway project with the Ghost template
2. MariaDB database companion is auto-configured
3. Ghost connects to MariaDB using internal Railway networking
4. Access your Ghost blog at the deployed URL
5. Complete setup at `/ghost/`

## Database

Ghost requires MySQL/MariaDB. A MariaDB companion service is included in the template with:
- Auto-generated secure passwords
- Persistent volume for data durability
- Automatic service discovery via Railway private networking


## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Paperless-ngx — document management with OCR and full-text search
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/ghost-3
