Publishing & Newsletter⭐ 49k+ GitHubLicense: MIT

How to Self-Host Ghost with Docker Compose

Open-Source Alternative to: Substack & Medium

Ghost allows publishers, journalists, and media creators to run newsletters and subscription publications. Unlike Substack which takes 10% of gross earnings, self-hosted Ghost charges 0%.

MINIMUM HARDWARE
1 GB RAM, 1 vCPU, 15 GB Disk
ESTIMATED SAVINGS
Zero 10% platform cuts on revenue
OFFICIAL REPOSITORY
github.com/TryGhost/Ghost ↗

Production Docker Compose File

Copy this tested configuration directly into your server's directory:

🐳 docker-compose.yml
version: '3.8'
services:
  ghost:
    image: ghost:5-alpine
    restart: always
    ports:
      - '2368:2368'
    environment:
      - url=https://your-blog-domain.com
      - database__client=mysql
      - database__connection__host=ghost-db
      - database__connection__user=ghost
      - database__connection__password=secret_db_pass
      - database__connection__database=ghost
    volumes:
      - ghost_content:/var/lib/ghost/content
  ghost-db:
    image: mysql:8.0
    environment:
      - MYSQL_ROOT_PASSWORD=root_pass
      - MYSQL_USER=ghost
      - MYSQL_PASSWORD=secret_db_pass
      - MYSQL_DATABASE=ghost
    volumes:
      - ghost_mysql:/var/lib/mysql
volumes:
  ghost_content:
  ghost_mysql:

Quick Deployment Steps

1. docker compose up -d 2. Open http://localhost:2368/ghost 3. Set up your administrator profile and launch your publication.

Key Advantages & Trade-Offs

✓ Why Self-Host Ghost?

  • Zero transaction take-rate (you keep 100% of Stripe payments)
  • Clean, distraction-free markdown and rich media card editor
  • Built-in email newsletter sending and member tier paywalls

⚠ What to Keep in Mind

  • Bulk email delivery requires linking Mailgun or Amazon SES
  • Self-hosting node updates requires occasional npm CLI maintenance

More Self-Hosted Alternatives

Knowledge & Workspace
AppFlowy
Replaces Notion ($10/seat/mo)
Project Management
Plane
Replaces Jira ($8.50/seat/mo) & Linear
No-Code Database
NocoDB
Replaces Airtable ($20/seat/mo)