Skip to content

Ghost on a VPS

Blog and email newsletters

Author
Ghost Foundation
License
MIT
Version
6.67.0

The script is free · VPS from $2.79 per month · installs in about 4 minutes

Install over SSH

root@vps:~# command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; D=blog.example.com; git clone https://github.com/TryGhost/ghost-docker.git /opt/ghost && cd /opt/ghost && cp .env.example .env && cp caddy/Caddyfile.example caddy/Caddyfile && sed -i "s/^DOMAIN=.*/DOMAIN=$D/" .env && sed -i "s/^DATABASE_ROOT_PASSWORD=.*/DATABASE_ROOT_PASSWORD=$(openssl rand -hex 32)/" .env && sed -i "s/^DATABASE_PASSWORD=.*/DATABASE_PASSWORD=$(openssl rand -hex 32)/" .env && docker compose pull && docker compose up -d

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/TryGhost/Ghostok
  • Version6.67.0ok
  • Port80/tcplisten
  • Port443/tcplisten

✓ Ghost 6.67.0 installed · about 4 minutes

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • Blog
  • Newsletters
  • Node.js
  • Subscriptions

Ghost is a platform for blogs, media and newsletters. Write in a convenient editor, publish to your site and send to subscribers by email at the same time, and enable paid subscriptions via Stripe.

On your own server there are no Ghost(Pro) hosting fees and no subscriber limits. The site is fast: Ghost runs on Node.js and is SEO-optimized out of the box.

The command deploys the official ghost-docker Docker stack: Ghost, MySQL and Caddy with automatic HTTPS. You need a domain pointed at the server.

  • Card-based editor with preview
  • Built-in subscriber newsletters
  • Paid subscriptions and memberships
  • SEO, AMP and sitemap
  • Themes and integrations

Recommended plan

For Ghost: at least 1 vCPU, 2 GB RAM and 10 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 12

How to install

Three steps in the bot or one command over SSH; installation takes about 4 minutes.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Ghost

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Finish the setup

    Before launching, replace blog.example.com with your domain that has an A record pointing to the server

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 12.

Install command
command -v docker >/dev/null || curl -fsSL https://get.docker.com | sh; D=blog.example.com; git clone https://github.com/TryGhost/ghost-docker.git /opt/ghost && cd /opt/ghost && cp .env.example .env && cp caddy/Caddyfile.example caddy/Caddyfile && sed -i "s/^DOMAIN=.*/DOMAIN=$D/" .env && sed -i "s/^DATABASE_ROOT_PASSWORD=.*/DATABASE_ROOT_PASSWORD=$(openssl rand -hex 32)/" .env && sed -i "s/^DATABASE_PASSWORD=.*/DATABASE_PASSWORD=$(openssl rand -hex 32)/" .env && docker compose pull && docker compose up -d

Ports

Ghost ports
PortProtocolPurpose
80tcpHTTP and certificate issuance
443tcpSite and admin panel over HTTPS

After installation

  1. 1.Before launching, replace blog.example.com with your domain that has an A record pointing to the server
  2. 2.Open https://your-domain/ghost and create the site owner
  3. 3.For newsletters, configure email sending (Mailgun or SMTP) following the Ghost documentation

Ghost FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

Ghost or WordPress?

Ghost is faster and simpler for a blog with a newsletter. WordPress is more flexible thanks to plugins: stores, catalogs, complex sites.

How do I update Ghost?

cd /opt/ghost && docker compose pull && docker compose up -d.

Where is the data stored?

Uploads are in /opt/ghost/data/ghost, the MySQL database is in /opt/ghost/data/mysql.

Ghost installs at checkout — in the bot.