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:
- Install Homebrew (if not present)
- Install Nginx, PHP, Node, MariaDB
- Install phpMyAdmin, Certbot, mkcert, Composer
- Configure Nginx and SSL
- Create the phpMyAdmin domain
ghost install #
Install Ghost and all dependencies. This is typically run automatically by the install script, but can be run manually if needed.
ghost uninstall #
Completely remove Ghost from your system. This will prompt for confirmation and allow selective removal of packages.
ghost add #
Add a new local site. This creates SSL certificates, Nginx configuration, and hosts entries.
ghost status #
Display the status of Ghost and all managed services.
ghost list #
List all registered Ghost sites with their configuration.
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: