Skip to content

System Configuration

The main system configuration file, config.hjson both overrides defaults and provides additional configuration such as message areas. Defaults lived in core/config_default.js.

The default path is /enigma-bbs/config/config.hjson though this can be overridden using the --config parameter when invoking main.js (and oputil.js). --config takes the directory holding config.hjson, with a trailing slash: ./main.js --config /srv/bbs/.

Relative file names in config.hjson, such as general.menuFile, general.achievementFile and the offline mail bulletins, are taken from paths.config. Unless you set it, paths.config is the directory your config.hjson was loaded from, which is also where files listed in includes are read from. With the stock layout that is /enigma-bbs/config/; with --config /srv/bbs/ it is /srv/bbs/, so menuFile: menu.hjson reads /srv/bbs/menu.hjson.

To take them from somewhere else, set paths.config in config.hjson:

paths: {
config: /enigma-bbs/config/
}

Set it in config.hjson itself: like any setting that has a default, paths.config in an included file does not replace it.

oputil.js config new writes menuFile and achievementFile as absolute paths into the install’s config/, so a configuration it creates finds them wherever config.hjson is kept. If the achievements file cannot be found, achievements are switched off and the log says Achievements file not found, with the path it tried.

Your initial configuration skeleton should be created using the oputil.js command line utility. From your enigma-bbs root directory:

Terminal window
./oputil.js config new

You will be asked a series of questions to create an initial configuration, which is written to config/config.hjson. The same run also produces your menu files under config/menus/ — see Menu HJSON.

The last question offers starter menus and a theme for PETSCII (Commodore 64/128) callers; it defaults to no. See Starter menus and theme.

The file core/config_default.js provides various defaults to the system that you can override via config.hjson. For example, the default system name is defined as follows:

general : {
boardName : 'Another Fine ENiGMA½ System'
}

To override this for your own board, in config.hjson:

general: {
boardName: Super Fancy BBS
}

(Note the very slightly HJSON different syntax. You can use standard JSON if you wish!)

While not everything that is available in your config.hjson file can be found defaulted in core/config_default.js, a lot is. Poke around and see what you can find!

Below is a list of various configuration sections. There are many more, but this should get you started: