Documentation

Complete reference for Ghost CLI. Learn how to install, configure, and use Ghost for your local development environment.

Installation #

Install Ghost with one command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ghostcompiler/ghost/HEAD/install.sh)"

This will download the appropriate binary, install it to /usr/local/bin/ghost, set up password-free sudo access, and run the initial installation.

First Run #

After installation, Ghost will automatically run ghost install which will:

ghost install #

Install Ghost and all dependencies. This is typically run automatically by the install script, but can be run manually if needed.

$ ghost install Detecting system... Architecture: arm64 Homebrew prefix: /opt/homebrew Installing packages... ✓ nginx installed ✓ mariadb installed ✓ php@8.3 installed ✓ Ghost installed successfully

ghost uninstall #

Completely remove Ghost from your system. This will prompt for confirmation and allow selective removal of packages.

$ ghost uninstall This will completely remove Ghost from your system. Select packages to remove (space to toggle, enter to confirm): ▶ [x] nginx [x] mariadb [x] php@8.3

ghost add #

Add a new local site. This creates SSL certificates, Nginx configuration, and hosts entries.

$ ghost add myapp Select a project type: Blank ▶ Laravel CodeIgniter 4 WordPress Creating SSL certificate... ✓ SSL certificate created Writing Nginx config... ✓ Nginx config written Adding hosts entry... ✓ Hosts entry added ✓ https://myapp.ghost is ready

ghost status #

Display the status of Ghost and all managed services.

$ ghost status Ghost v1.0.0 — TLD: .ghost — PHP: 8.3 — Node: 20 Package Version Status ──────────── ─────────── ─────── nginx 1.25.3 ● running mariadb 11.2.2 ● running php@8.3 8.3.1 ● running php@8.2 8.2.14 ○ stopped node@20 20.11.0 ● running

ghost list #

List all registered Ghost sites with their configuration.

$ ghost list Domain PHP Node Path ─────────────────────── ──────── ──────── ───────────────────────────── myapp.ghost 8.3 20 ~/Sites/myapp blog.ghost 8.1 18 ~/Sites/blog api.ghost ─ 20 ~/Sites/api phpmyadmin.ghost 8.3 ─ (managed)

Config File #

Ghost stores its configuration in ~/.ghost/config.json:

{
  "tld": "ghost",
  "php": "8.3",
  "node": "20",
  "brew_prefix": "/opt/homebrew",
  "ghost_bin": "/usr/local/bin/ghost",
  "nginx_conf": "/opt/homebrew/etc/nginx/nginx.conf",
  "php_fpm_socket_pattern": "/tmp/php-fpm.ghost.{version}.sock",
  "installed": true,
  "version": "1.0.0"
}

Directory Structure #

~/.ghost/
├── config.json              # Global config
├── sites/                   # Symlinks: domain → project path
├── nginx/
│   ├── ghost.conf           # Master include
│   └── sites/               # Per-domain nginx configs
├── ssl/
│   ├── .crt         # SSL certificates
│   └── .key
├── logs/
│   └── nginx/               # Nginx access/error logs
├── backups/
│   └── hosts.    # /etc/hosts backups
└── drivers/                 # Site driver detection cache

make install #

Compile and install Ghost locally for development testing:

$ make install ✓ ghost v1.0.0 installed to /usr/local/bin/ghost Ghost v1.0.0