Skip to main content

Ghost Setup Guide

Ghost is a headless CMS used for blogging.

Prerequisites

  • Node.js: Version 18.x or 20.x (Check Ghost documentation for the current supported LTS).
  • MySQL or SQLite (SQLite is often used for lighter/local setups).
  • Ghost-CLI: The command-line tool for managing Ghost.

Installation Steps

  1. Install Node.js (via NVM)

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
    source ~/.bashrc
    nvm install 22
    nvm use 22
  2. Install Ghost-CLI

    sudo npm install ghost-cli@latest -g
  3. Create Directory

    mkdir <site-name>
    cd <site-name>
  4. Install Ghost For a local/sqlite setup:

    ghost install local

    Note: "local" install uses SQLite. For production with MySQL, use ghost install.

Management Commands

Start/Stop

ghost start
ghost stop
ghost restart

Diagnosis

ghost doctor

Configuration

Config is stored in config.development.json (for local) or config.production.json. Example Config:

"server": {
"port": 2368,
"host": "127.0.0.1"
}

Multiple Instances

You can run multiple instances on the same server by assigning different ports (e.g., 2368, 2369, 2370) and configuring your reverse proxy (Caddy) to point to them.