# Help setting up - Can't run config file

**URL:** <https://forum.mattermost.com/t/help-setting-up-cant-run-config-file/12530>\
**Category:** Troubleshooting\
**Created:** [November 13, 2021, 1:00pm UTC](https://forum.mattermost.com/t/help-setting-up-cant-run-config-file/12530 "2021-11-13T13:00:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blue\_falafel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/blue_falafel/32/5209_2.png) [@blue\_falafel](https://forum.mattermost.com/u/blue_falafel)\
**Post date:** [November 13, 2021, 1:00pm UTC](https://forum.mattermost.com/t/help-setting-up-cant-run-config-file/12530/1 "2021-11-13T13:00:51Z")

</div>

Hello, I am trying to get my Mattermost running. I have encountered many syntax-based errors with MySQL along the way, but I’m now on the .config step and I’m completely stuck. I am getting the following:

```auto
root@name:/opt/mattermost# sudo -u mattermost ./bin/mattermost
Error: failed to load configuration: failed to create store: unable to load on store creation: invalid config: Config.IsValid: model.config.is_valid.file_driver.app_error, 
Usage:
  mattermost [flags]
  mattermost [command]

Available Commands:
  db Commands related to the database
  export Export data from Mattermost
  help Help about any command
  import Import data.
  jobserver Start the Mattermost job server
  server Run the Mattermost server
  version Display version information

Flags:
  -c, --config string Configuration file to use.
  -h, --help help for mattermost

Use "mattermost [command] --help" for more information about a command.

And here is some of my .config:

```

“SqlSettings”: {  
“DriverName”: “mysql”,  
“DataSource”: “user:\<Password!\>@tcp(:3306)/mattermost?charset=utf8mb4,utf8&writeTimeout=30s”,  
“DataSourceSearchReplicas”: ,

```auto

```

Please help, thank you.

UPDATE: I have been toying with this for _HOURS_. I think I finally found something, but I’m having more, different errors now.  
Following this ([How To Set Up Mattermost on Ubuntu 18.04 | DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-set-up-mattermost-on-ubuntu-18-04)) guide led me through a very slightly different route than the mattermost guide, by making me create a systemd service. Now, I don’t know what this could have to do with my .config, but I noticed that within the systemd steps I have to edit my 2nd After=, Requires=, and WantedBy=. These originally had postgres instead of MySQL in the related fields.

I’ve now switched those over to mysql.service as instructed, but I’m having new errors (and I’m not sure if the .config problem is actually even fixed…):

```auto
root@-s-1vcpu-2gb-nyc1-01:~# sudo systemctl daemon-reload
root@-s-1vcpu-2gb-nyc1-01:~# sudo systemctl status mattermost
● mattermost.service - Mattermost
   Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled
   Active: inactive (dead)

Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:8: 
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:9: 
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:10:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:11:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:12:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:13:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:14:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:15:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: mattermost.service: Service lacks both Exe
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:1: 

```

Please let me know any ideas, thanks!

---

<div class="post-metadata">

**Author:** ![jprusch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/jprusch/32/2563_2.png) [@jprusch](https://forum.mattermost.com/u/jprusch)\
**Post date:** [November 19, 2021, 8:34am UTC](https://forum.mattermost.com/t/help-setting-up-cant-run-config-file/12530/2 "2021-11-19T08:34:23Z")

</div>

How about posting the content of your mattermost.service file?
