Railway

Deploy Ghost

Self-hosted Ghost blogging platform with MariaDB on Railway

Deploy Ghost

Just deployed

/var/lib/mysql

ghost-mariadb

mariadb:11.0

Just deployed

/var/lib/mysql

Ghost

Deploy to Railway

A self-hosted Ghost 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

DependencyDescription
MariaDB companion serviceDatabase backend with persistent volume at /var/lib/mysql
Railway accountMust 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

VariableRequiredDescription
PORTYesGhost application port (default: 2368)
database__clientYesDatabase type (mysql)
database__connection__hostYesMariaDB hostname (auto-configured)
database__connection__portYesMariaDB port (auto-configured)
database__connection__userYesMariaDB username
database__connection__passwordYesMariaDB password
database__connection__databaseYesMariaDB database name
urlYesGhost 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

Template Content

ghost-mariadb

mariadb:11.0

More templates in this category

View Template
Libredesk - Complete Setup
[Jul'26] Complete self-hosted omnichannel customer support desk.

codestorm
1
View Template
Instatic CMS - Postgres
Design, build and manage powerful static sites from state-of-the-art CMS

Instatic
109
View Template
Strapi
A popular self-hosted CMS

Milo
7.7K