Set AppsEnabled to true

Summary
Feature Flag “AppsEnabled” not recognized/not working

Steps to reproduce
We are using the latest version of self-hosted Mattermost
Mattermost Version: 6.2.1
Database Schema Version: 6.2.1

We added export MM_FEATUREFLAGS_AppsEnabled=true to the .bashrc file, and it looks like it gets loaded as environment variable into the system. Unfortunately, in Mattermost > System Console > FeatureFlags > AppsEnabled is still marked as false.

We followed this guide (Writing a Mattermost app in JavaScript) to enable custom apps on our instance. We already installed the “Apps” Plugin, but it doesn’t seem to have enabled the /apps slash command, which is needed to install a custom app (if I am following the guide correctly). I guess this is due to the feature flag not being enabled.

Expected behavior
FeatureFlag AppsEnabled should be true

Any suggestion / help is highly appreciated !

@Hanzei Can Interstellar team help with this?

1 Like

Just to double check @turbopasi: Did you restart your MM server after setting the Feature flag? Otherwise the flag doesn’t get picked up.

1 Like

Hey @Hanzei , I did a complete server (hardware) restart . Should be enough, I guess ?
Just to check again, I just did a service restart as well.

That should the enough, right. Does echo $MM_FEATUREFLAGS_AppsEnabled output true?

1 Like

image

It does indeed :slight_smile:

1 Like

Excellent! Can you manually enable the Apps Plugin in the System Console and check if it’s still enabled after a page refresh?

1 Like

So the steps I took before were

  1. I installed the “Apps” Plugin via the Marketplace, it says Apps (0.7.0) EXPERIMENTAL
  2. After that, in the System Console, it looks like that

I took these steps before I added the environment variable (MM_FEATURE…) to the system. Maybe it helps to remove the Apps Plugin again, and then install it again. But I can’t find an option to disable it.

Under System Console > Plugins > Plugins Management > Installed Plugins it also says

Apps (com.mattermost.apps - 0.7.0)
Plugin disabled by feature flag - Settings
:no_entry_sign:This plugin is not enabled

Hm, I’m running out of ideas :sweat_smile: @larko Do you have any ideas?

@turbopasi What deployment method are you using? Could it be the case that your MM server runs as a different user as the one that own the .bashrc file?

1 Like

We followed this guide (Installing Mattermost on Ubuntu 20.04 LTS — Mattermost documentation) to setup the mattermost server. Although we are using Ubuntu 21.x , I can’t think of a reason why this should be a problem (I hope it’s not).

Could it be the case that your MM server runs as a different use as the one that own the .bashrc file?

Oh you meant “user” … that’s actually a good question. I’ll check that.

So we added the environment variable for the mattermost user as well and did a full restart. It also prints true for echo $MM_FEATUREFLAGS_AppsEnabled. Still, the feature flag in the system console says ‘false’ . It feels like it has something to do with the user but can’t put my finger on it.

Just to be sure, I added the variable under .bashrc and at /etc/environment . Still the flag AppsEnabled is still false in the System Console.

Hi,
it might be worth to add that we’ve updated our Mattermost and database schema version to 6.3.1, which unfortunately didnt solve this issue.
If there’d be a way for the staff to connect and inspect our instance, we’d be happy to help out with some temporary logins

1 Like

Are you using systemd to manage your Mattermost server? If so, could you please try setting the environment variable in the service file by adding Environment=MM_FEATUREFLAGS_AppsEnabled=true to it?

3 Likes

yes, we’re using the system daemon!
thx for that tip, we’re gonna give it a try and report back!

Thanks @Hanzei for your help and suggestions. Adding the environment variable inside the service file finally did the trick. Might be worth considering to add a little note in the docs, right ? (Or maybe there is already and I just couldn’t find it :open_mouth: !?)

Anyway, thanks ! :trophy:

1 Like

In case someone might need to adjust this, until official documentation gets updated,
here’s our final (and working) approach;

3 Likes