How to modify ServiceSettings EnableLocalMode with environment variable

Hi, I have deployed mattermost in gke with terraform. I need to update the enable local mode value in config.json to true but couldn’t do it successfully through environment variable.

What I did was adding this block inside the container block of my deployment:

env {
    value = "true"

As far as I know, this particular config can be modified using the MM_SERVICESETTINGS_ENABLELOCALMODE environment. I don’t think it being an experimental config changes that. But after the terraform file is applied, when I access the pod environment, this config wasn’t changed.

Please help. Thanks!

Hi zack and welcome to the Mattermost forums!

I can only say that the variable name is correct and that Mattermost lets itself configure using exactly this variable. Using the standard docker deployment, when I add the following line to my .env file and enable the passing of this variable to the container, the local mode gets activated properly:


Not sure if there’s anything special with terraform here. Do you also send other environment variables to your Mattermost deployment the same way and do they work?

Hi thanks for the response. I later tried to deploy the change again and noticed that the new config is actually working. It was probably working before as well but I thought setting the environment variable will update config.json so I thought the deployment wasn’t affected by the env variable when it actually is.

OK, thanks for letting us know, so you’re up and running now?