You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* MM-31575 ENV var license override
Documentation for: https://mattermost.atlassian.net/browse/MM-31575
Updated:
- Self-Managed Admin Guide > Configure Mattermost > Configuration Settings
- Changed the following bolded lines to proper headings: "Configuration in Database", "Environment Variables", and "Load Custom Configuration Defaults"
- Added new subsection "Override Mattermost License File"
* Fixed typo
"In a high-availability environment, using an environment variable to override a server license only affect[s] the individual app server and doesn't propagate to other servers in the cluster."
* Update source/administration/config-settings.rst
Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>
* Update source/administration/config-settings.rst
Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>
Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>
Copy file name to clipboardExpand all lines: source/administration/config-settings.rst
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,17 @@ Mattermost configuration settings are maintained in the ``config.json`` configur
8
8
9
9
Mattermost must have write permissions to ``config.json``, otherwise changes made in the System Console will have no effect.
10
10
11
-
On new installations starting from version 5.14, the ``default.json`` file used to create the initial ``config.json`` has been removed from the binary and replaced with a build step that generates a fresh ``config.json``. This is to ensure the initial configuration file has all the correct defaults provided in the server code. Existing ``config.json`` files are not affected by this change.
11
+
On new installations starting from v5.14, the ``default.json`` file used to create the initial ``config.json`` has been removed from the binary and replaced with a build step that generates a fresh ``config.json``. This is to ensure the initial configuration file has all the correct defaults provided in the server code. Existing ``config.json`` files are not affected by this change.
12
12
13
-
**Configuration in Database**
13
+
Configuration in Database
14
+
--------------------------
14
15
15
16
Storing configuration in the database is supported in v5.10 and later. Please see more information on how to set this up `here <https://docs.mattermost.com/administration/config-in-database.html>`_.
16
17
17
-
**Environment Variables**
18
+
Environment Variables
19
+
---------------------
18
20
19
-
Starting from Mattermost version 3.8, you can use environment variables to manage the configuration. Environment variables override settings in ``config.json``. If a change to a setting in ``config.json`` requires a restart for it to take effect, then changes to the corresponding environment variable also require a server restart.
21
+
Starting from Mattermost v3.8, you can use environment variables to manage the configuration. Environment variables override settings in ``config.json``. If a change to a setting in ``config.json`` requires a restart for it to take effect, then changes to the corresponding environment variable also require a server restart.
20
22
21
23
The name of the environment variable for any setting can be derived from the name of that setting in ``config.json``. For example, to derive the name of the Site URL setting:
22
24
@@ -37,14 +39,26 @@ For any setting that is not set in ``config.json`` or in environment variables,
37
39
.. warning::
38
40
Database connection strings for the database read and search replicas need to be formatted using `URL encoding <https://www.w3schools.com/tags/ref_urlencode.asp>`__. Incorrectly formatted strings may cause some characters to terminate the string early, resulting in issues when the connection string is parsed.
39
41
40
-
**Load Custom Configuration Defaults**
42
+
Override Mattermost License File
43
+
--------------------------------
44
+
45
+
Starting from Mattermost v5.26, you can use an environment variable to override any license in the database or file configuration without replacing those licenses.
46
+
47
+
When starting the server, specify the license key as ``MM_LICENSE`` with the contents of a license file.
48
+
49
+
.. note::
50
+
If ``MM_LICENSE`` is set to a non-empty string, but the license specified is not valid, the Mattermost server will be started without a license.
51
+
52
+
In a High Availability deployment, using an environment variable to override a server license only affects the individual app server and doesn't propagate to other servers in the cluster.
53
+
54
+
Load Custom Configuration Defaults
55
+
----------------------------------
41
56
42
57
Starting from Mattermost v5.30, you can load a set of custom configuration defaults using an environment variable. This custom configuration applies only if the values are not already present in the current server configuration.
43
58
44
59
1. Create a JSON file that contains the custom configuration defaults. For example, ``custom.json``.
45
60
2. When starting the server, point the custom defaults environment variable to the defaults file: ``MM_CUSTOM_DEFAULTS_PATH=custom.json``.
0 commit comments