Create and manage configuration files for a Ghost instance

Configuring your Ghost publication can be done efficiently using the ghost-cli tool, which is the most popular way to install an instance of Ghost.

You can also edit your config manually - check out the config guide to find out more.


ghost config accepts two optional arguments: key and value. Here are the three different combinations and what happens on each of them:

# Create a new config file for the particular env
ghost config

# Find and return the value in the config for the key passed
ghost config [key] 

# Set a key and a value in the config file
ghost config [key] [value]

# Set the url for your site
ghost config url

The ghost config command only affects the configuration files. In order for your new config to be used, run ghost restart.


If you're using ghost config to generate a configuration file, you can supply multiple key-value pairs in the form of options to avoid being prompted for that value.

All of these options can also be passed to ghost install and ghost setup , as these commands call ghost config.

See the config guide or run ghost config --help for more detailed information.

Ghost Options
# URL of the site including protocol

# Admin URL of the site

# Port that Ghost should listen on 
--port 2368

# IP to listen on 

# Transport to send log output to
--log ["file","stdout"]

Database Options
# Type of database to use (sqlite3 or mysql)

# For sqlite3 we just need a file:
# Path to database file
--dbpath content/data/ghost_dev.db

# For mysql we need full credentials:
# Database host 
--dbhost localhost

# Database user name
--dbuser ghost

# Database password
--dbpass ****

# Database name
--dbname ghost_dev

Mail Options
# Mail transport, E.g SMTP, Sendmail or Direct
--mail SMTP

# Mail service (used with SMTP transport), E.g. Mailgun, Sendgrid, Gmail, SES...
--mailservice Mailgun

# Mail auth user (used with SMTP transport)    

# Mail auth pass (used with SMTP transport)
--mailpass ****

# Mail host (used with SMTP transport)

# Mail port (used with SMTP transport)
--mailport 465

Service Options
# Process manager to run with (local, systemd)
--process local


In order for your new config to be used, run ghost restart.