# Proper CLI usage in Gitlab

**URL:** <https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839>\
**Category:** Troubleshooting\
**Created:** [February 1, 2016, 8:55pm UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839 "2016-02-01T20:55:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpopell](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@cpopell](https://forum.mattermost.com/u/cpopell)\
**Post date:** [February 1, 2016, 8:55pm UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839/1 "2016-02-01T20:55:53Z")

</div>

This is just a note for anyone running into the same issues that I was running into.

There are point in documentation that suggest running /platform -version, or similar things. This just adds confusion when dealing with GitLab Mattermost. Here’s what worked for me:

From  
/opt/gitlab/embedded/bin

I ran  
sudo -u mattermost ./mattermost -config=/var/opt/gitlab/mattermost/config.json

This was the only way to get it to work. In other words, “sudo -u mattermost ./mattermost” takes the place of “platform” anywhere you see it in documentation, and you have to append -config at the end.

Hopefully this will help clarify things for other users.

---

<div class="post-metadata">

**Author:** ![hank12323](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/hank12323/32/345_2.png) [@hank12323](https://forum.mattermost.com/u/hank12323)\
**Post date:** [February 4, 2016, 8:36pm UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839/2 "2016-02-04T20:36:48Z")

</div>

Thanks! I found this helpful 😃

---

<div class="post-metadata">

**Author:** ![derblub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/derblub/32/637_2.png) [@derblub](https://forum.mattermost.com/u/derblub)\
**Post date:** [April 24, 2016, 10:37am UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839/3 "2016-04-24T10:37:48Z")

</div>

When trying to run  
`sudo -u mattermost ./mattermost -config=/var/opt/gitlab/mattermost/config.json -version`  
I get: `command mattermost can't be found`.

Trying this however:  
`sudo -u mattermost /opt/gitlab/embedded/bin/mattermost -config=/var/opt/gitlab/mattermost/config.json -version`  
is returning following error:

```auto
panic: Failed to load system translations for 'en'

goroutine 1 [running]:
github.com/mattermost/platform/utils.GetTranslationsBySystemLocale(0xc820162460)
	/go/src/github.com/mattermost/platform/utils/i18n.go:44 +0x19a
github.com/mattermost/platform/utils.InitTranslations()
	/go/src/github.com/mattermost/platform/utils/i18n.go:29 +0x2e9
main.main()
	/go/src/github.com/mattermost/platform/mattermost.go:54 +0x2c

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1721 +0x1

goroutine 5 [syscall]:
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
	/usr/local/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 6 [chan receive]:
github.com/alecthomas/log4go.(*ConsoleLogWriter).run(0xc82000e580, 0x7fe2513041e8, 0xc820032010)
	/go/src/github.com/mattermost/platform/Godeps/_workspace/src/github.com/alecthomas/log4go/termlog.go:33 +0x69
created by github.com/alecthomas/log4go.NewConsoleLogWriter

```

Any ideas?  
Thanks!

---

<div class="post-metadata">

**Author:** ![it33](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/it33/32/3_2.png) [@it33](https://forum.mattermost.com/u/it33)\
**Post date:** [April 24, 2016, 4:39pm UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839/4 "2016-04-24T16:39:32Z")

</div>

> [@derblub](#):
>
> panic: Failed to load system translations

Hi @derblub, this [issue happens in Mattermost 2.0, and was fixed in Mattermost 2.1.](https://forum.mattermost.com/t/cli-tool-crashing-missing-translation/959) You can upgrade to the next version to resolve this issue.

Mattermost 2.0 introduced multi-language support and this issue was caused by that change, and fixed in the next monthly release.

---

<div class="post-metadata">

**Author:** ![derblub](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/derblub/32/637_2.png) [@derblub](https://forum.mattermost.com/u/derblub)\
**Post date:** [April 24, 2016, 5:11pm UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839/5 "2016-04-24T17:11:06Z")

</div>

Sorry, but apparently it isn’t fixed.

```auto
Mattermost Team Edition
Version:2.2.0
Build Number:6671
Build Date:Fri Apr 15 18:40:19 UTC 2016
Build Hash:8e883ad2f516820942cc0131241268c1ea909ff3

```

---

<div class="post-metadata">

**Author:** ![it33](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/it33/32/3_2.png) [@it33](https://forum.mattermost.com/u/it33)\
**Post date:** [April 24, 2016, 5:33pm UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839/6 "2016-04-24T17:33:09Z")

</div>

Thanks @derblub, appreciate the report, [ticket has been re-opened on this.](https://mattermost.atlassian.net/browse/PLT-2116)

---

<div class="post-metadata">

**Author:** ![BlueAnanas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/blueananas/32/543_2.png) [@BlueAnanas](https://forum.mattermost.com/u/BlueAnanas)\
**Post date:** [April 27, 2016, 1:43pm UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839/7 "2016-04-27T13:43:42Z")

</div>

did you use the best practice described in [[Found workaround]CLI tool still crashing and throwing errors in 2.1.0](http://forum.mattermost.com/t/found-workaround-cli-tool-still-crashing-and-throwing-errors-in-2-1-0/1132)

---

<div class="post-metadata">

**Author:** ![karser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/karser/32/1657_2.png) [@karser](https://forum.mattermost.com/u/karser)\
**Post date:** [December 21, 2017, 11:17am UTC](https://forum.mattermost.com/t/proper-cli-usage-in-gitlab/839/8 "2017-12-21T11:17:18Z")

</div>

I’m on GitLab CE 10.1.1 running on docker. That’s how it works for me:

```
docker exec -it -u mattermost <container> bash
cd /opt/gitlab/embedded/service/mattermost
mattermost -c /var/opt/gitlab/mattermost/config.json version
Version: 4.2.0
```
