Skip to main content

Config editing

The MistServer configuration file

MistServer will store its configurations into config.json or /etc/mistserver.conf depending on whether it's run by directly starting MistController or as a service. By default this file contains the full configuration of MistServer unformated as JSON. You can provide MistServer formated JSON and this will be untouched until MistServer saves a new configuration file due to changes.

Auto save & load behaviour

You can set the default save & load behaviour when booting MistServer throught the controller. By default MistServer will apply any changes 60 seconds after the last change & load in a new configuration upon change.

You can change this by setting a boot parameter. --configrw or -C with either r, w or rw:

  • 'r', read configuration changes from disk.
  • 'w', writes them to disk after 60 seconds of no changes.
  • 'rw', does both (default). In all other cases does neither.

Split config

MistServer can split its configuration file into multiple JSON files, every main configuration subsection can be stored in separate locations. This can be handy when exposing certain configurations to shared storage or different environments.

In order to split the MistServer configuration "config_split" should be one of the configuration subsections within the JSON configuration.

then: {OBJECT} of "config_subsection":"location"

Example of some configuration subsections within MistServer:

  "account",
"auto_push",
"bandwidth",
"config",
"extwriters",
"jwks",
"push_settings",
"streamkeys",
"streams",
"ui_settings",
"variables",
"config_split"

The config split itself should contain the {OBJECT} to split followed by the location. The {OBJECT} should be one of the main configuration categories. With the only exception being the "config_split" option itself.

If the "config_split" option is set before the configuration file is written in it will be followed and the split configuration files are created (or read if they exist). Should the file not contain a configuration a warning will be printed and an overwrite will be attempted.

If the target for the configuration split contains any configuration it will be followed. Should there be none a new configuration will be created and the main configuration file will be read for any potential configurations.

Example:

{"config_split":{"streams":"/etc/streams.conf","jwks":"/mnt/shared/jwks.conf"}}

The above would create a full new config, however the "streams" and "jwks" parts of the config will be written into a split configuration file.