Deploy Ghost
Self-hosted Ghost blogging platform with MariaDB on Railway
ghost
Just deployed
/var/lib/mysql
ghost-mariadb
Just deployed
/var/lib/mysql
Ghost
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
| Dependency | Description |
|---|---|
| MariaDB companion service | Database backend with persistent volume at /var/lib/mysql |
| Railway account | Must have access to 2+ services |
Quick Start
- Click the Deploy to Railway button above
- MariaDB database is provisioned automatically as a companion service
- Wait for provisioning (~3 minutes)
- Access your Ghost blog at the deployed URL
- 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
- Provision a Railway project with the Ghost template
- MariaDB database companion is auto-configured
- Ghost connects to MariaDB using internal Railway networking
- Access your Ghost blog at the deployed URL
- 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
ghost:latestghost-mariadb
mariadb:11.0