# Config File Not Valid JSON

**URL:** <https://forum.ghost.org/t/config-file-not-valid-json/33901>\
**Category:** Developer help\
**Created:** [November 4, 2022, 10:22pm UTC](https://forum.ghost.org/t/config-file-not-valid-json/33901 "2022-11-04T22:22:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vanessa\_Taylor](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vanessa_taylor/32/20142_2.png) [@Vanessa\_Taylor](https://forum.ghost.org/u/Vanessa_Taylor)\
**Post date:** [November 4, 2022, 10:22pm UTC](https://forum.ghost.org/t/config-file-not-valid-json/33901/1 "2022-11-04T22:22:20Z")

</div>

Hello,

I ran into issues earlier with my website’s subscription button. If someone tried to subscribe, it wouldn’t load.

Tried sorting it out myself. Because I use DigitalOcean, a website told to set up STMP with my Mailgun details. However, the subscription button is still not working. And now, when I try to restart ghost, I receive this message:

> Ghost instance is not running! Starting…  
> ✖ Starting Ghost  
> A SystemError occurred.
> 
> Message: The content folder is not owned by the current user.  
> Ensure the content folder has correct permissions and try again.
> 
> Debug Information:  
> OS: Ubuntu, v22.04.1 LTS  
> Node Version: v16.17.0  
> Ghost Version: 5.22.6  
> Ghost-CLI Version: 1.23.1  
> Environment: production  
> Command: ‘ghost restart’

When I run ghost doctor, I get:

> One or more errors occurred.
> 
> 1. Validating config
> 
> Error detected in the production configuration.
> 
> Message: Config file is not valid JSON

I’m very new to this so I tried running the config through a validator. But I don’t even know how to read JSON so not sure how to correct it. Here it is:  
{

> “url”: “[https://mydomain.com](https://mydomain.com)”,  
> “server”: {  
> “port”: 2368,  
> “host”: “127.0.0.1”  
> },  
> “database”: {  
> “client”: “mysql”,  
> “connection”: {  
> “host”: “localhost”,  
> “user”: “ghost-456”,  
> “password”: “REDACTED”,  
> “port”: 3306,  
> “database”: “ghost\_production”  
> }  
> },  
> “mail”:  
> {“from”: “vanessa \<noreply @ DOMAIN\>”,  
> “transport”: “SMTP”,  
> “options”: {  
> “service”: “Mailgun”,  
> “host”: “[smtp.mailgun.org](http://smtp.mailgun.org)”,  
> “port”: 465,  
> “secureConnection”: true,  
> “auth”: {  
> “user”: [TKTKTK@gmail.com](mailto:TKTKTK@gmail.com)",  
> “pass”: “REDACTED”  
> }  
> }  
> },  
> “transport”: “Direct”  
> },  
> “logging”: {  
> “transports”: [  
> “file”,  
> “stdout”}
> 
> ```
> ]
> 
> ```
> 
> },  
> “process”: “systemd”,  
> “paths”: {  
> “contentPath”: “/var/www/ghost/content”  
> }

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [November 5, 2022, 12:30am UTC](https://forum.ghost.org/t/config-file-not-valid-json/33901/2 "2022-11-05T00:30:46Z")

</div>

A bunch of your quotes are slanted quotes rather than straight up and down quotes. That /might/ be the result of posting on the forum, but I’d check your file really closely.

WRONG:

```auto
“process”: “systemd”,

```

RIGHT:

```auto
"process": "systemd",

```

---

<div class="post-metadata">

**Author:** ![Vanessa\_Taylor](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vanessa_taylor/32/20142_2.png) [@Vanessa\_Taylor](https://forum.ghost.org/u/Vanessa_Taylor)\
**Post date:** [November 5, 2022, 11:47am UTC](https://forum.ghost.org/t/config-file-not-valid-json/33901/3 "2022-11-05T11:47:46Z")

</div>

Ah yeah, I checked and that’s just from posting on the forum :/ In the file, they’re all straight.

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [November 5, 2022, 3:14pm UTC](https://forum.ghost.org/t/config-file-not-valid-json/33901/4 "2022-11-05T15:14:34Z")

</div>

The transactional email settings for Mailgun should look like this:

```auto
  },
  "mail": {
    "from": "noreply@yourdomain",
    "transport": "SMTP",
    "options": {
      "host": "smtp.mailgun.org",
      "port": 587,
      "service": "Mailgun",
      "secure": false,
      "requireTLS": true,
      "auth": {
        "user": "postmaster@yourdomain",
        "pass": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx-xxxxxxxx"
      }
    }
  },

```

Remove `"transport": "Direct"}`, which incidently has a missing brace.

The user credentials and pass are from Mailgun Domains Settings \> SMTP Credentials.

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [November 10, 2022, 10:59pm UTC](https://forum.ghost.org/t/config-file-not-valid-json/33901/5 "2022-11-10T22:59:39Z")

</div>

2 posts were split to a new topic: [Mailgun config setup](https://forum.ghost.org/t/mailgun-config-setup/34042)

---

<div class="post-metadata">

**Author:** ![naike](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/naike/32/20206_2.png) [@naike](https://forum.ghost.org/u/naike)\
**Post date:** [November 10, 2022, 3:57pm UTC](https://forum.ghost.org/t/config-file-not-valid-json/33901/6 "2022-11-10T15:57:33Z")

</div>

That’s not valid JSON.  
A json objects start with { and end with }  
e.g.

```auto
{
  "mail": {
                "transport": "test"
          }
}

```

I went ahead and fixed the initial json you posted, there were a bunch of syntax errors:

```auto
{
	"url": "https://mydomain.com",
	"server": {
		"port": 2368,
		"host": "127.0.0.1"
	},
	"database": {
		"client": "mysql",
		"connection": {
			"host": "localhost",
			"user": "ghost-456",
			"password": "REDACTED",
			"port": 3306,
			"database": "ghost_production"
		}
	},
	"mail": {
		"from": "vanessa <noreply @ DOMAIN>",
		"transport": "SMTP",
		"options": {
			"service": "Mailgun",
			"host": "smtp.mailgun.org",
			"port": 465,
			"secureConnection": true,
			"auth": {
				"user": "TKTKTK@gmail.com",
				"pass": "REDACTED"
			}
		}
	},
	"transport": "Direct",
	"logging": {
		"transports": [
			"file",
			"stdout"
		]
	},
	"process": "systemd",
	"paths": {
		"contentPath": "/var/www/ghost/content"
	}
}

```
