When updating config.production.json with Mailgun credentials, whole website crashes

Everytime when I try to add my mailgun credentials in config.production.json, the whole website crashes (502 error). I don’t know why, but I followed carefully the instructions. The only way is to put back the original json that I got with my Ghost installation.

This is the file:

{
  "url": "",
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "mysql",
    "connection": {
      "host": "localhost",
      "user": "ghost",
      "password": "",
      "port": 3306,
      "database": "ghost_production"
    }
  "mail": {
  "transport": "SMTP",
  "options": {
    "service": "Mailgun",
    "auth": {
      "user": "",
      "pass": ""
    }
  }
},
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/www/ghost/content"
  }
}

You’ve got syntax issues. You have the mail settings spliced in as part of the database settings, which is not correct. Looks like a missing }, before mail.

1 Like

Thanks Cathy, you are a true resource on this forum. I thought I had lost the progress of a week (backup happens on sunday night) but now everything is back up again!

1 Like

You can always use an online validator, too, e.g.:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.