Skip to content

Self-host Ghost

updated Sep 2026prices checked · Jul 2026
We earn commissions when you shop through the links below. Full disclosure →

A Node.js publishing platform for blogs and paid newsletters, with built-in member signups, email delivery and Stripe subscriptions.

Key facts

LicenseMIT
StackNode.js, MySQL
Min RAM1024 MB
Official imageyes
Difficulty

What you need

  • Any VPS with at least 1024 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# Ghost 6 — the official Docker image (ghost:6-alpine) with MySQL 8, per its Docker Hub compose example
# (Ghost's own Docker Compose tooling, TryGhost/ghost-docker, is a preview and needs a domain + SMTP)
mkdir -p ghost && cd ghost
echo "DB_PASS=$(openssl rand -hex 16)" > .env
cat > docker-compose.yml <<'EOF'
services:
  ghost:
    image: ghost:6-alpine
    restart: always
    ports: ["8080:2368"]
    depends_on: [db]
    environment:
      database__client: mysql
      database__connection__host: db
      database__connection__user: root
      database__connection__password: ${DB_PASS}
      database__connection__database: ghost
      url: http://SERVER_IP:8080
    volumes: ["ghost:/var/lib/ghost/content"]
  db:
    image: mysql:8.0
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: ${DB_PASS}
    volumes: ["db:/var/lib/mysql"]
volumes:
  ghost:
  db:
EOF
# set url to your real address (production needs HTTPS behind a reverse proxy), then:
docker compose up -d   #  →  http://SERVER_IP:8080/ghost  (create the owner account)

Head-to-head

More in CMS & blogging

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.