Ghost Self-Hosting Guide: Docker, VPS, and Managed Options Compared
Complete guide to self-hosting Ghost CMS. Compare Ghost(Pro) vs DigitalOcean vs Docker vs Railway vs Pikapods with real pricing and setup steps.
Should You Self-Host Ghost?
Self-hosting Ghost means running it on your own server instead of Ghost(Pro). Before diving in, here’s an honest assessment.
Self-host if you:
- Want to minimize monthly costs (as low as $4/month vs $18-199/month for Ghost(Pro))
- Need full control over your server, database, and backups
- Want to run custom Node.js code or integrations
- Are comfortable with Linux command line and Docker
- Plan to run ActivityPub with self-hosted containers
Use Ghost(Pro) if you:
- Want zero server maintenance
- Don’t want to manage email deliverability (SPF, DKIM, DMARC)
- Need included CDN, SSL, and automatic updates
- Value your time more than the monthly cost difference
- Are starting out and want to focus on content, not infrastructure
The honest truth: Self-hosting Ghost saves money but costs time. You are your own sysadmin — updates, backups, security patches, email configuration, and uptime monitoring are all your responsibility. For most solo publishers, Ghost(Pro) Publisher at $29/month is the simpler path.
If you just want to get Ghost running without evaluating hosting options, see our Ghost installation guide for step-by-step procedures.
Ghost Hosting Options Compared
Real monthly costs as of February 2026:
| Provider | Type | Monthly Cost | Included | Setup Difficulty |
|---|---|---|---|---|
| Ghost(Pro) Starter | Managed | $18/mo | CDN, SSL, backups, email, updates | Easy |
| Ghost(Pro) Publisher | Managed | $29/mo | Everything + paid memberships, custom sending domain | Easy |
| Ghost(Pro) Business | Managed | $199/mo | Everything + 10K members, priority support | Easy |
| DigitalOcean Droplet | VPS | $6/mo (1 GB) | Raw server — you manage everything | Advanced |
| Hetzner Cloud | VPS | €3.79/mo (CX22, 4 GB) | Same as DO, often cheaper for more RAM | Advanced |
| Pikapods | Managed container | ~$4/mo | Ghost + MySQL, managed updates | Easy |
| Railway | PaaS | ~$5-10/mo | Ghost + database, auto-deploys from GitHub | Intermediate |
| MagicPages | Managed Ghost | $9/mo | Ghost-specific hosting with panel | Easy |
Cost Breakdown: Self-Hosted vs Ghost(Pro)
For a newsletter with 500 paid subscribers at $7/month:
Ghost(Pro) Publisher:
- Hosting: $29/month
- Email: Included
- Total: $29/month
DigitalOcean + Mailgun (500 subscribers, weekly sends = ~2,000 emails/month):
- VPS: $6/month (1 GB Droplet)
- Mailgun Flex: ~$4/month ($2 per 1,000 emails)
- Total: $10/month — cheaper than Ghost(Pro)
DigitalOcean + Mailgun (2,000 subscribers, 2x/week = ~16,000 emails/month):
- VPS: $6/month
- Mailgun Flex: ~$32/month
- Total: $38/month — more expensive than Ghost(Pro) Publisher
The crossover point: Self-hosting is cheaper when your email volume stays low. Once you’re sending more than ~14,000 emails/month, Ghost(Pro) Publisher at $29/month (unlimited sends included) becomes the better deal.
Ghost Docker Setup
Docker Compose is the official primary install method for Ghost 6. Ghost-CLI is becoming legacy as Docker provides better reproducibility and simpler updates.
Production Docker Compose
This is a complete, production-ready stack with Ghost 6, Caddy (automatic SSL), and MySQL 8:
services: ghost: image: ghost:6-alpine restart: always environment: NODE_ENV: production database__client: mysql database__connection__host: mysql database__connection__user: ghost database__connection__password: ${MYSQL_PASSWORD} database__connection__database: ghost url: https://yourdomain.com volumes: - ghost-content:/var/lib/ghost/content depends_on: mysql: condition: service_healthy networks: - ghost-internal - caddy-public
caddy: image: caddy:2-alpine restart: always ports: - "80:80" - "443:443" volumes: - ./Caddyfile:/etc/caddy/Caddyfile - caddy-data:/data - caddy-config:/config networks: - caddy-public
mysql: image: mysql:8.0 restart: always environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_DATABASE: ghost MYSQL_USER: ghost MYSQL_PASSWORD: ${MYSQL_PASSWORD} volumes: - mysql-data:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] interval: 10s timeout: 5s retries: 5 networks: - ghost-internal
networks: ghost-internal: caddy-public:
volumes: ghost-content: mysql-data: caddy-data: caddy-config:Create a Caddyfile in the same directory:
yourdomain.com { reverse_proxy ghost:2368}Create a .env file (never commit this):
MYSQL_PASSWORD=generate-a-strong-passwordMYSQL_ROOT_PASSWORD=generate-another-strong-passwordSecurity notes:
- MySQL has no exposed ports — only accessible via the
ghost-internalnetwork - Credentials use environment variable substitution, never hardcoded
- Named volumes ensure data persists across container restarts
- Caddy handles SSL certificate provisioning and renewal automatically
Start Ghost
docker compose up -dGhost is running at https://yourdomain.com. Set up your admin account at https://yourdomain.com/ghost.
Docker Compose Configuration Details
Why Caddy instead of NGINX? Caddy provides automatic HTTPS with Let’s Encrypt — zero SSL configuration. With NGINX, you’d need to install Certbot, configure renewal cron jobs, and manage certificate files manually. Ghost’s official documentation has also shifted to recommending Caddy for new deployments.
Why ghost:6-alpine? The Alpine-based image is ~180 MB vs ~350 MB for the Debian-based image. Same functionality, smaller attack surface.
Why MySQL 8.0, not MariaDB? Ghost officially supports MySQL 8.0+ only. MariaDB may work but is not tested or supported. If you hit edge cases, you’re on your own.
ARM64 Caveat
If you’re running on ARM64 hardware (e.g., Oracle Cloud free tier, Raspberry Pi, Apple Silicon for local dev), the main Ghost image works fine. However, Ghost’s ActivityPub and Traffic Analyzer containers are AMD64-only. Running them on ARM64 requires manual multi-architecture builds or QEMU emulation, which significantly impacts performance.
If ActivityPub integration is important to you, choose an AMD64 VPS. See our ActivityPub guide for details.
Ghost on DigitalOcean
The traditional Ghost-CLI installation on a DigitalOcean Droplet remains popular, though Docker is now the recommended path.
Step 1: Create a Droplet
- Choose Ubuntu 24.04, Basic plan
- Select $6/month (1 GB RAM) or $12/month (2 GB — recommended if using ActivityPub)
- Add your SSH key
- Create the Droplet
Step 2: Install Ghost
SSH into your server and follow the Ubuntu installation steps in our Ghost installation guide. The Ghost-CLI handles NGINX, SSL (Let’s Encrypt), and systemd service configuration.
When DigitalOcean Makes Sense
DigitalOcean is a good choice if:
- You’re already familiar with their platform
- You want the $6/month price point
- You prefer Ghost-CLI’s opinionated setup over Docker
For new deployments, we recommend Docker Compose instead — it’s more portable, easier to back up, and simpler to update.
Managed Alternatives
If you want self-hosting benefits without managing servers, these managed options sit between Ghost(Pro) and raw VPS hosting:
Pikapods (~$4/month)
Pikapods runs Ghost in a managed container. You get your own Ghost instance with MySQL, managed updates, and daily backups. The cheapest way to run Ghost without managing infrastructure.
Limitations: No SSH access, limited customization of server-level settings, email delivery still requires Mailgun configuration.
Railway (~$5-10/month)
Railway deploys Ghost from a GitHub repository with automatic builds. Pay for what you use (compute + database). Good for developers who want Git-based deployments.
Limitations: No persistent file storage by default (need to configure S3 for image uploads), pricing can spike with traffic.
MagicPages ($9/month)
MagicPages is Ghost-specific managed hosting with a control panel. One-click Ghost installs, managed updates, and basic email support.
Limitations: Smaller company, less infrastructure redundancy than Ghost(Pro) or major cloud providers.
Email Setup with Mailgun
Every self-hosted Ghost installation needs email for two things:
- Transactional email — signup confirmations, magic login links, password resets
- Bulk newsletter email — sending your newsletter to subscribers
Mailgun Configuration
- Create a Mailgun account
- Add a sending domain:
mg.yourdomain.com(use a subdomain) - Add DNS records: SPF, DKIM, and DMARC
- In Ghost Admin: Settings → Email newsletter → enter Mailgun region, domain, and API key
- For transactional email, add SMTP configuration to
config.production.json
For detailed step-by-step instructions, see the Mailgun section in our Ghost newsletter guide.
Mailgun Pricing Reality (2026)
Mailgun doubled their Flex plan pricing on December 1, 2025 (from $1 to $2 per 1,000 emails):
| Plan | Price | Volume |
|---|---|---|
| Flex (pay-as-you-go) | $2/1,000 emails | No monthly minimum |
| Foundation | $35/mo | 50,000/mo included |
| Scale | $90/mo | 100,000/mo included |
For context: a weekly newsletter to 1,000 subscribers uses ~4,000 emails/month. On the Flex plan that’s $8/month — plus your VPS at $6-12/month. Ghost(Pro) Publisher at $29/month includes unlimited sends and zero configuration. The cost advantage of self-hosting shrinks fast once you factor in Mailgun.
Backups and Maintenance
Self-hosting means you own your backups. If your server dies and you have no backup, your publication is gone.
What to Back Up
- Ghost content:
/var/lib/ghost/content/(or the Docker volumeghost-content) - MySQL database: Use
mysqldumpor Docker’sdocker exec mysql mysqldump - Configuration files:
docker-compose.yml,.env,Caddyfile
Backup Strategy
Daily database backups:
# Add to cron (crontab -e)0 3 * * * docker exec mysql mysqldump -u root -p${MYSQL_ROOT_PASSWORD} ghost > /backups/ghost-$(date +\%Y\%m\%d).sqlWeekly full backups: Snapshot your entire server via DigitalOcean/Hetzner’s snapshot feature ($1-2/month for weekly snapshots).
Test your backups. A backup you’ve never restored is not a backup — it’s a hope.
Updating Ghost
With Docker Compose, updates are straightforward:
# Pull the latest Ghost imagedocker compose pull
# Restart with the new imagedocker compose up -d
# Ghost handles database migrations automatically on startupAlways back up before updating. Ghost major version upgrades (5→6) occasionally require manual intervention.
Monitoring
At minimum, set up uptime monitoring. Free options:
- UptimeRobot — 50 monitors free, 5-minute check intervals
- Betterstack — 10 monitors free, 3-minute intervals
Get notified when your site goes down so you can restart Docker or investigate before readers notice.
Common Questions
Can I run Ghost on a Raspberry Pi?
Yes, but with caveats. The main Ghost image supports ARM64. However, ActivityPub and Traffic Analyzer containers are AMD64-only. Performance on a Pi 4 with 4 GB RAM is adequate for small sites with low traffic, but MySQL can be memory-hungry.
How do I migrate from Ghost(Pro) to self-hosted?
- Export your content from Ghost(Pro): Settings → Import/Export → Export
- Download your theme: Settings → Design → Download current theme
- Set up self-hosted Ghost (Docker or CLI)
- Import your content and upload your theme
- Update your DNS to point to the new server
- Configure Mailgun for email delivery
Paid subscribers will need to re-subscribe through your new Stripe connection.
How much RAM do I need?
- 1 GB: Sufficient for Ghost + MySQL with moderate traffic
- 2 GB: Recommended if using ActivityPub or expecting higher traffic
- 4 GB: Comfortable for high-traffic sites with multiple staff users
Is it worth self-hosting in 2026?
It depends entirely on your situation. If you enjoy server management, want the lowest possible cost for a small site, or need custom server-level configurations, self-hosting works well. If you’d rather spend your time writing, Ghost(Pro) Publisher at $29/month is excellent value.
The best strategy: start with Ghost(Pro) to validate your publication, then migrate to self-hosted if and when cost savings justify the maintenance overhead.
After Setup: Install a Theme
Once Ghost is running, the default Casper theme is active. Upload a custom theme via Settings → Design → Change theme → Upload theme. Ghost themes are .zip files that work identically on Ghost(Pro) and self-hosted installations — no configuration differences.
We build premium Ghost themes designed for publishers who need membership pages, dark mode, and professional layouts out of the box.
Recommended Themes
These themes excel at the features discussed in this article.
Luxe Themes
