Ghost
Independent technology for modern publishing, memberships, subscriptions and newsletters
Alternative to: substack, medium, wordpress.com, patreon
Ghost is an independent, open source Node.js platform for professional publishing, letting you build a website, write and send email newsletters, and run paid membership and subscription businesses. It ships with a fast, modern editor and built-in SEO, membership, and payments tooling, so publishers get Substack- and WordPress-like features without extra plugins. Ghost can be fully self-hosted with the official Docker image, giving you complete ownership of your content and subscriber data instead of relying on a hosted SaaS.
Ghost Docker Compose example
Self-host Ghost on your own server, homelab, or VPS starting from this Docker Compose example.
It runs Ghost in Docker containers using the official ghost:alpine, mysql:8.0 images, with persistent volumes and automatic restarts preconfigured.
Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.
services:
ghost:
image: ghost:alpine
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
database__client: "mysql"
database__connection__host: "db"
database__connection__user: "ghost"
# Password for the ghost database user. Must match MYSQL_PASSWORD on the db service.
database__connection__password: "changeme"
database__connection__database: "ghost"
# The full public URL of your Ghost site. Ghost builds all links and redirects from this value.
url: "http://localhost:2368"
NODE_ENV: "production"
volumes:
- content:/var/lib/ghost/content
db:
image: mysql:8.0
restart: unless-stopped
environment:
# Root password for MySQL. Only used internally on the compose network.
MYSQL_ROOT_PASSWORD: "changeme_root"
MYSQL_DATABASE: "ghost"
MYSQL_USER: "ghost"
# Password for the ghost database user. Must match database__connection__password on the ghost service.
MYSQL_PASSWORD: "changeme"
volumes:
- db:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 10
volumes:
content:
db:
Values set to changeme are required — replace them with your own
values before starting Ghost.
Prefer a managed setup? WinterFlow installs, configures, and updates Ghost for you using this same Docker Compose configuration.