Self-Host Ghost Blog with a Custom Domain and Free SSL Using InfraPilot
InfraPilot Team
March 12, 2026
Ghost vs Ghost Pro
Ghost is an open-source publishing platform that powers serious blogs and newsletters. Ghost Pro — their managed hosting — starts at $9/mo for minimal traffic. Self-hosting Ghost on a $6 VPS with InfraPilot costs less and gives you complete control over your content, subscribers, and data.
Prerequisites
- VPS with Docker installed, minimum 1 GB RAM recommended for Ghost
- Domain name with A record pointing at your server
- InfraPilot installed:
curl -fsSL https://infrapilot.org/install.sh | bash
Step 1 — Create the Ghost Compose Stack
mkdir -p ~/apps/ghost && cd ~/apps/ghost
services:
ghost:
image: ghost:5-alpine
restart: unless-stopped
environment:
NODE_ENV: production
url: https://${GHOST_DOMAIN}
database__client: mysql
database__connection__host: db
database__connection__user: ghost
database__connection__password: ${DB_PASSWORD}
database__connection__database: ghost
mail__transport: SMTP
mail__options__host: ${SMTP_HOST}
mail__options__port: 587
mail__options__auth__user: ${SMTP_USER}
mail__options__auth__pass: ${SMTP_PASS}
volumes:
- ghost_data:/var/lib/ghost/content
ports:
- "2368:2368"
depends_on:
- db
db:
image: mysql:8.0
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ghost
MYSQL_USER: ghost
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- db_data:/var/lib/mysql
volumes:
ghost_data:
db_data:
Create your .env:
GHOST_DOMAIN=blog.yourdomain.com
DB_ROOT_PASSWORD=strong-root-password
DB_PASSWORD=strong-ghost-password
SMTP_HOST=smtp.yourmailprovider.com
SMTP_USER=noreply@yourdomain.com
SMTP_PASS=your-smtp-password
docker compose up -d
Step 2 — Connect Your Domain in InfraPilot
- Open InfraPilot dashboard → Traffic → Proxy Hosts → Add Proxy Host
- Domain: your Ghost domain (e.g.
blog.yourdomain.com) - Forward host:
ghost, port:2368 - Enable Let's Encrypt SSL and tick Force SSL
- Save — SSL is provisioned in under 30 seconds
Visit your domain and you'll see the Ghost setup screen. Create your admin account and start writing.
Step 3 — Configure Your Ghost URL
Ghost embeds the URL in email links, RSS feeds, and the admin panel. Make sure the url environment variable exactly matches your live domain including https://. If you need to change it later, update the env and restart: docker compose up -d.
Newsletters and Member Subscriptions
Ghost has built-in newsletter and paid membership support. To send newsletters, configure SMTP in the compose file. For paid memberships, connect Stripe under Ghost Admin → Settings → Memberships.
Monitoring Ghost with InfraPilot
Ghost is a Node.js application — watch for memory leaks in the InfraPilot metrics view. If the ghost container starts consuming more than 400 MB RAM, set an alert threshold. The unified log stream shows Ghost's startup logs, email delivery errors, and webhook failures all in one place.
To update Ghost, simply pull the new image and restart: docker compose pull && docker compose up -d. InfraPilot will reflect the new container version immediately.
Related posts
The Best Self-Hosted Docker Dashboards in 2026 (Honestly Compared)
Portainer, Dockge, Yacht, Lazydocker, InfraPilot — there are more Docker management UIs than ever. Here's an honest breakdown of which one fits which use case, from CLI-lovers to teams that want a full web dashboard.
Nginx Proxy Manager vs InfraPilot: Is There a Better Alternative?
Nginx Proxy Manager is the most popular Docker reverse proxy GUI — but it only manages proxies and SSL. If you're already running Docker containers, there's a case for combining your proxy management with your container dashboard.
Portainer vs InfraPilot: The Honest Docker Management Comparison (2026)
Portainer is great — but it doesn't manage Nginx, SSL, or give you traffic analytics. Here's an honest comparison of when to use Portainer, when to use InfraPilot, and what actually matters for single-server Docker setups.