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 https://ghost.org/docs/concepts/config/

{
“url”: “https://bryanchandler.com”,
“server”: {
“port”: REDACTED,
“host”: “127.0.0.1”
},
“database”: {
“client”: “mysql”,
“connection”: {
“host”: “localhost”,
“user”: “ghost”,
“password”: “REDACTED”,
“database”: “ghost_production”
}
},
“mail”: {
“transport”: “SMTP”,
“options”: {
“service”: “Mailgun”,
“auth”: {
“user”: “postmaster@mg.bryanchandler.com”,
“pass”: “REDACTED”
}
},
“logging”: {
“transports”: [
“file”,
“stdout”
]
},
“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.

Thanks.

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

You can run your config through something like https://jsonlint.com/ 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.

Thanks.