Ghost is a powerful, open-source headless CMS designed for professional publishing. Running Ghost locally allows you to develop and test your site in a safe environment before going live. This guide walks you through the process of installing Ghost on Windows and macOS.
Prerequisites
Before installing Ghost, ensure you have the following installed:
- Node.js (version 18 or higher recommended)
- npm (comes with Node.js)
- Ghost CLI (Ghost Command Line Interface)
- MySQL (optional, Ghost can run with SQLite for local installs)
- A code editor (like VS Code) and terminal/command prompt
Step 1: Install Node.js
Ghost requires Node.js to run. Download and install the latest LTS version:
- Windows & macOS:
Download from https://nodejs.org and follow the installer prompts.
Verify installation:
node -v
npm -v
Step 2: Install Ghost CLI Globally
Ghost CLI helps with installing and managing Ghost installations.
Run this in your terminal (Command Prompt or PowerShell on Windows, Terminal on macOS):
npm install -g ghost-cli
Verify:
ghost --version
Step 3: Prepare a Folder for Ghost
Create a folder where you want to install Ghost locally.
Example:
- Windows:
mkdir C:\ghost-local
cd C:\ghost-local
- macOS:
mkdir ~/ghost-local
cd ~/ghost-local
Step 4: Install Ghost
Run the following command inside your chosen directory:
ghost install local
This command installs Ghost locally using SQLite, which is perfect for development and testing.
Ghost CLI will download and install all dependencies, including Ghost itself, and start the server.
Step 5: Access Your Local Ghost Site
Once installation completes, open your browser and visit:
http://localhost:2368
You should see the default Ghost blog homepage running locally.
To access the admin panel, visit:
http://localhost:2368/ghost
Create your admin account here and start publishing!
Additional Tips
- Stop Ghost:
To stop the local Ghost server, run:ghost stop
- Restart Ghost:
ghost restart
- Upgrade Ghost:
When a new Ghost version is released, update by running:ghost update
Troubleshooting
- Windows Firewall:
Ensure your firewall allows Node.js to accept connections on port 2368. - Permissions:
Run your terminal as administrator (Windows) or with proper permissions on macOS if you encounter permission errors. - Node version issues:
Ghost requires Node.js 18 or higher. Usenode -v
to check. If needed, install Node Version Manager (nvm
) to manage Node versions easily.
Conclusion
Installing Ghost locally on Windows or macOS is straightforward using Node.js and the Ghost CLI. Running Ghost locally is ideal for theme development, customization, and content creation before pushing your site live.
For production deployments, consider using Ghost(Pro) or hosting with your preferred platform.