Config file is not valid JSON

I’m trying to configure Mailgun on my self-hosted Ghost instance. I edited config.production.json as instructed here

“url”: “”,
“server”: {
“port”: REDACTED,
“host”: “”
“database”: {
“client”: “mysql”,
“connection”: {
“host”: “localhost”,
“user”: “ghost”,
“password”: “REDACTED”,
“database”: “ghost_production”
“mail”: {
“transport”: “SMTP”,
“options”: {
“service”: “Mailgun”,
“auth”: {
“user”: “”,
“pass”: “REDACTED”
“logging”: {
“transports”: [
“process”: “systemd”,
“paths”: {
“contentPath”: “/var/www/ghost/content”

But I get an error when I restart ghost. ghost doctor outputs:

:heavy_check_mark: Checking system Node.js version
:information_source: Ensuring user is not logged in as ghost user [skipped]
:information_source: Checking if logged in user is directory owner [skipped]
:heavy_check_mark: Checking current folder permissions
:heavy_multiplication_x: Validating config
:heavy_check_mark: Checking content folder ownership
:heavy_check_mark: Checking memory availability
:heavy_check_mark: Checking binary dependencies
One or more errors occurred.

  1. Validating config
    Error detected in the production configuration.
    Message: Config file is not valid JSON

This syntax is directly copied from the article I linked to, and I don’t know what the issue is. I’m sure there’s a single space added/missing somewhere.


It looks like the quotes got converted to smart quotes - can you try replacing and with "?

You can run your config through something like to find the error as well :slight_smile:

1 Like

Sorry, not sure what any of that means. I was able to get it working. I didn’t close out the mail section properly.


man how did you got it to work please help me