Fast-track local install for getting Ghost running on your computer or setup for doing theme development
Running Ghost locally is the easiest way to get your own copy of the software running and be able to do some local development with it. By the end of this guide you will have completed a local Ghost install that runs in development mode using SQLite3.
To install Ghost locally you will need the following:
- A computer running MacOS, Windows or Linux
- A supported version of Node.js
- Either yarn or npm to manage packages
- A clean, empty directory on your machine
Ghost-CLI is a commandline tool to help you get Ghost installed and configured for use, quickly and easily. The npm module can be installed with
yarn on a local machine, depending on your preference.
npm install ghost-cli@latest -g
Once installed, you can always run
ghost help to see a list of available commands.
In your terminal,
cd into an empty directory and run the install command:
ghost install local
Once the install is finished you’ll be able to access your new site on
http://localhost:2368/ghost to access Ghost Admin ✨
That’s it! You’re done.
- Your publication is setup in
developmentmode with less caching
- The SQLite3 database is auto-setup and located in
- Logs only go to
Starting & Stopping
Ghost runs in a separate background process and remains running until you stop it or restart your computer. So you may find these commands useful for taming it:
ghost stopto stop Ghost
ghost startto start Ghost
ghost logviews logs
ghost lsto list all running Ghost blogs
ghost help for a list of available commands, or explore the full Ghost-CLI documentation.
For troubleshooting and errors, try searching this documentation and FAQ section to find information about common error messages.
To work on a Ghost Handlebars Theme locally, your custom theme should always be placed in the top-level
All edits made to Ghost theme files will automatically reload. If you add any new files to your theme during development, you’ll need to restart Ghost to see the changes take effect.
Validating with GScan
GScan is a tool that validates Ghost themes for compatibility with the latest versions of Ghost. Ghost automatically runs this tool when a theme is uploaded or activated. For development purposes, your can also run these checks yourself by locally installing it.
# Install gscan globally
npm install gscan -g
# Scan a theme directory for compatibility
# Scan a theme zip file for compatibility
gscan -z /path/to/downloads/theme.zip
GScan can also be accessed at gscan.ghost.org, where you can sign up for the latest updates as a Ghost theme developer.
You’ve completed a local Ghost install — congrats! You can now put Ghost through its paces and see what it’s all about, or jump right into developing a custom Ghost theme.
When you’re ready ship your site to production, follow one of these guides.