Skip to main content
πŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy β€” plus the companion book on Leanpub & Amazon. Start Learning
Ghost CMS: Headless Publishing Platform on Kubernetes
Open Source

Ghost CMS: Headless Publishing Platform on Kubernetes

Run Ghost as a headless CMS with native memberships, newsletters, and a blazing-fast Node.js backend β€” self-hosted on Kubernetes.

LB
Luca Berton
Β· 1 min read

What Is Ghost?

Ghost is a professional publishing platform built on Node.js β€” 48K+ GitHub stars. It powers publications from NASA to Cloudflare.

Ghost vs WordPress

FeatureGhostWordPress
Performance⚑ Blazing fast (Node.js)🐌 Heavy (PHP + plugins)
SecurityMinimal attack surfacePlugin vulnerabilities
Native newsletterβœ… Built-in❌ Plugin required
Memberships/paywallβœ… Built-in❌ Plugin required
SEOβœ… Automatic❌ Plugin (Yoast)
Headless APIβœ… Content API + Admin API⚠️ REST/GraphQL plugins
Self-hostedβœ…βœ…
MaintenanceLow (auto-updates)High (plugins break)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Ghost Platform             β”‚
β”‚                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Admin Panel  β”‚  β”‚  Content API  β”‚  β”‚
β”‚  β”‚  (write/edit) β”‚  β”‚  (headless)   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚          β”‚                   β”‚          β”‚
β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β”‚                    β”‚                    β”‚
β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚           β”‚   Ghost Core    β”‚           β”‚
β”‚           β”‚   (Node.js)     β”‚           β”‚
β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”‚                    β”‚                    β”‚
β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚           β”‚     MySQL       β”‚           β”‚
β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”‚                                         β”‚
β”‚  Built-in: Newsletter, Members,        β”‚
β”‚  Payments (Stripe), Themes, SEO        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Kubernetes Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: ghost
  namespace: cms
spec:
  replicas: 1  # Ghost doesn't support multi-replica without shared storage
  template:
    spec:
      containers:
        - name: ghost
          image: ghost:5-alpine
          ports:
            - containerPort: 2368
          env:
            - name: url
              value: "https://blog.yourdomain.com"
            - name: database__client
              value: "mysql"
            - name: database__connection__host
              value: "mysql.cms.svc"
            - name: database__connection__user
              value: "ghost"
            - name: database__connection__password
              valueFrom:
                secretKeyRef:
                  name: ghost-secrets
                  key: db-password
            - name: database__connection__database
              value: "ghost"
            - name: mail__transport
              value: "SMTP"
            - name: mail__options__host
              value: "smtp.mailgun.org"
          volumeMounts:
            - name: content
              mountPath: /var/lib/ghost/content
          resources:
            requests:
              memory: "256Mi"
              cpu: "200m"
            limits:
              memory: "1Gi"
      volumes:
        - name: content
          persistentVolumeClaim:
            claimName: ghost-content

Headless Mode (Content API)

Use Ghost as a headless CMS with any frontend (Astro, Next.js, Nuxt):

// Fetch posts from Ghost Content API
const response = await fetch(
  'https://blog.yourdomain.com/ghost/api/content/posts/?key=YOUR_CONTENT_API_KEY&include=tags,authors&limit=10'
);
const { posts } = await response.json();

// Each post has HTML content, meta, images
posts.forEach(post => {
  console.log(post.title, post.html, post.feature_image);
});

Astro Integration

// src/lib/ghost.ts
import GhostContentAPI from '@tryghost/content-api';

const api = new GhostContentAPI({
  url: 'https://blog.yourdomain.com',
  key: import.meta.env.GHOST_CONTENT_API_KEY,
  version: 'v5.0',
});

export async function getPosts() {
  return await api.posts.browse({limit: 'all', include: ['tags', 'authors']});
}

Built-In Monetization

Ghost includes native membership + Stripe payments:

  • Free tier β€” email newsletter subscribers
  • Paid tier β€” gated content, premium posts
  • Tiered pricing β€” multiple subscription levels
  • No platform fees β€” just Stripe’s 2.9% + $0.30

Use Cases

ScenarioWhy Ghost
Tech blogFast, clean, markdown editor
Newsletter businessBuilt-in email + members
Documentation siteContent API + custom frontend
Paid content/coursesNative paywalls
Company blogTeam permissions, scheduling

Free 30-min AI & Cloud consultation

Book Now