Special Offers: Up to 75% OFF on Hostinger & High-RAM Contabo Cloud VPS available this month.Compare Plans

How to Self-Host Ghost CMS on Contabo VPS with MySQL 8 and Let's Encrypt SSL

Marcus Vance
Marcus VanceFull-Stack Cloud Engineer
November 21, 2026
•
17 min read
•
4.9 / 5.0
Transparency Notice: This article contains affiliate links to hosting providers like Hostinger and Contabo. If you purchase through our links, we may earn a commission at zero extra cost to you. We only recommend products we personally benchmark and test. Read full disclosure.
How to Self-Host Ghost CMS on Contabo VPS with MySQL 8 and Let's Encrypt SSL
Best Hardware Value for TechsNo Contract Surcharges + High RAM

Contabo High-Performance Cloud VPS

Massive 4 vCPU cores, 8GB RAM, and 32TB monthly traffic. Ideal for Linux developers.

German Engineering & Data Centers
8 Strategic Global Locations
Fast NVMe Storage Array
Full Root & SSH Console Access
Starts From
$5.50 / mo
Special Affiliate Pricing
Claim Discount Now
Official Partner Link • Verified Safe
Quick Answer & Key Takeaways
Updated November 21, 2026 • Lab Score 4.9/5.0

Tired of Substack platform cuts and expensive Ghost Pro plans? Learn how to self-host Ghost CMS on a Contabo VPS with MySQL 8, Nginx, and Mailgun newsletter delivery.

  • Keep 100% of membership revenue: bypass Substack's 10% platform fee and Ghost Pro's $29/mo starter fee
  • Contabo Cloud VPS 1 ($4.95/mo for 8GB RAM) easily handles hundreds of thousands of monthly pageviews
  • Native Mailgun integration delivers tens of thousands of newsletter emails with verified inbox placement

The Financial Trap of Commercial Publishing Platforms

Content creators, journalists, and technical bloggers face severe monetization friction on mainstream publishing platforms. Substack takes a massive 10% cut of every paid subscriber transaction on top of Stripe processing fees. Meanwhile, Ghost Pro managed cloud starts at $29/month and rapidly escalates to $199+/month as your subscriber roster crosses 10,000 readers.

Ghost CMS is a headless, Markdown-first publishing platform built on Node.js and MySQL. By deploying the open-source version of Ghost on a Contabo Cloud VPS 1 ($4.95/month for 4 vCPU cores, 8 GB RAM, and 200 GB NVMe storage), you maintain 100% ownership of your subscriber data, zero platform revenue cuts, and unmetered traffic capacity.

Server Prerequisites on Ubuntu 24.04 LTS

Ghost officially requires Ubuntu LTS, Node.js LTS, MySQL 8, Nginx, and systemd. Connect to your Contabo VPS via SSH:

ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
apt install -y curl ufw git nginx

Critical Ghost Requirement: Non-Root User

Ghost CLI strictly refuses to install or run under the root account for security isolation. Create a dedicated administrative user with sudo privileges:

adduser ghostadmin
usermod -aG sudo ghostadmin
su - ghostadmin

Step 1: Install Node.js 20 LTS & Ghost-CLI

Ghost 5.x and 6.x require Node.js 18 or 20 LTS. Install Node.js 20 and the official Ghost command-line orchestrator:

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g ghost-cli@latest
ghost version

Step 2: Install and Secure MySQL 8 Database

Ghost requires a production-grade relational database. Install MySQL Server 8:

sudo apt install -y mysql-server
sudo mysql_secure_installation

Log in to MySQL as root and create a dedicated database and user for Ghost:

sudo mysql -u root -p

CREATE DATABASE ghost_production DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'ghostuser'@'localhost' IDENTIFIED BY 'StrongDatabasePassword_8832!';
GRANT ALL PRIVILEGES ON ghost_production.* TO 'ghostuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 3: Automated Installation with Ghost-CLI

Create a directory for your Ghost blog and assign ownership to your ghostadmin user:

sudo mkdir -p /var/www/ghost
sudo chown ghostadmin:ghostadmin /var/www/ghost
sudo chmod 775 /var/www/ghost
cd /var/www/ghost

Run the interactive Ghost installer:

ghost install

The installer will prompt you for configuration details:

  • Blog URL: Enter your custom domain with HTTPS (e.g., https://blog.yourdomain.com).
  • MySQL Hostname: Press Enter for localhost.
  • MySQL Username: ghostuser
  • MySQL Password: Enter the strong password created in Step 2.
  • Ghost Database Name: ghost_production
  • Set up "ghost" system user? Yes
  • Set up Nginx? Yes (Ghost-CLI configures virtual host blocks automatically)
  • Set up SSL? Yes (Ghost-CLI provisions Let's Encrypt certificates automatically)
  • Set up systemd service? Yes
  • Start Ghost? Yes

Step 4: Configuring Mailgun for Email Newsletters

To send broadcast newsletters to your subscriber list, Ghost integrates natively with Mailgun. In your Mailgun dashboard, add your sending domain (e.g., mg.yourdomain.com) and copy your SMTP credentials.

Edit your Ghost production configuration file:

nano /var/www/ghost/config.production.json

Update the mail block:

"mail": {
  "transport": "SMTP",
  "options": {
    "service": "Mailgun",
    "host": "smtp.mailgun.org",
    "port": 587,
    "secure": false,
    "auth": {
      "user": "postmaster@mg.yourdomain.com",
      "pass": "your_mailgun_smtp_password"
    }
  }
}

Restart Ghost to apply the changes:

ghost restart

Step 5: Accessing the Ghost Admin Cockpit

Visit https://blog.yourdomain.com/ghost/ to complete the administrator setup. Create your author profile, set your publication name, and connect Stripe for membership subscriptions.

Summary: The Pure Economics of Self-Hosting

Running Ghost CMS on a Contabo Cloud VPS costs just $4.95/month. For a creator with 5,000 paid subscribers generating $25,000/month in memberships, self-hosting saves over $30,000 per year compared to Substack's 10% platform tax.

Video Walkthrough & Official References

Linux Nginx Reverse Proxy & SSL: Full Tutorial for Beginners • Cloud Explainers

Watch on YouTube

Editorial Verdict: Pros & Cons

What We Love (Pros)

  • Keep 100% of membership revenue: bypass Substack's 10% platform fee and Ghost Pro's $29/mo starter fee
  • Contabo Cloud VPS 1 ($4.95/mo for 8GB RAM) easily handles hundreds of thousands of monthly pageviews
  • Native Mailgun integration delivers tens of thousands of newsletter emails with verified inbox placement

Drawbacks (Cons)

  • Self-hosted Ghost requires managing periodic Node.js LTS upgrades and database backups via CLI
Best Hardware Value for TechsNo Contract Surcharges + High RAM

Deploy Your Contabo Cloud Server

Includes 4 vCPU Cores, 8GB RAM, 50GB NVMe SSD, and 32TB Outbound Traffic.

German Engineering & Data Centers
8 Strategic Global Locations
Fast NVMe Storage Array
Full Root & SSH Console Access
Starts From
$5.50 / mo
Special Affiliate Pricing
Claim Discount Now
Official Partner Link • Verified Safe
Marcus Vance

Written by Marcus Vance

Full-Stack Cloud Engineer

Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.

Recommended Next Reads