LinuxGSM Config

LinuxGSM Configs and Game Server Configs are different. One is the config for LinuxGSM itself and the other is for the game server instance.

LinuxGSM configuration is managed using multiple config files loaded in a set order. It is important to understand how these config files work to make sure settings are placed in the correct config files.

Config Files Location

Relative to your installation directory, config files are located in:

lgsm/config-lgsm/gameserver

Configuration Mechanism

The LinuxGSM config mechanism is designed to allow the users to benefit from new features, maintain default settings, better manage multiple instances and allow LinuxGSM to update the config if required.

Configuration files

An understanding of how LinuxGSM handles multiple game server instances helps.

_default.cfg

_default.cfg is the template config, this file is a base of all available default settings. It can not be edited and is updated by LinuxGSM when using ./gameserver update-lgsm. This config is loaded first.

Do not edit _default.cfg any changes to this file will be overwritten.

common.cfg

common.cfg is used for common settings that apply to all game server instances of the same installation. This saves having to apply the same settings multiple times.

instance.cfg

instance.cfg is the configuration file used for each individual game server instance. Settings here will only apply to this specific game server instance. This config file takes the same name as the game server instance name ./gameserver. For example, if ./csgoserver is used the instance.cfg will be called csgoserver.cfg. This config is last to be loaded.

Config Load Priority

When LinuxGSM is loading the configs they will load in order. First taking settings from _default.cfg then common.cfg and finally instance.cfg. This means that any setting set in instance.cfg will override that setting in common.cfg which in turn will override the setting in _default.cfg.

LinuxGSM config load order

_default.cfg -> common.cfg -> instance.cfg

How to Use

Simple Configuration

This configuration fits most scenarios, where you have a simple installation with only one instance.

1. Browse to the config-lgsm directory

cd lgsm/config-lgsm/

2. Use ls to list the directory contents and find the name of your instance.cfg.

3. Use cat or nano to see the contents of _default.cfg .

cat _default.cfg

4. Copy the individual settings you want to change to instance.cfg

It is recommended you only copy settings you want to change from _default.cfg into instance.cfg. If any settings in _default.cfg are updated with a new release of LinuxGSM they may not be picked up if all the settings have been copied.

Multiple Instances Configuration

This configuration is useful for multiple instances.

1. Browse to the config-lgsm directory

cd lgsm/config-lgsm/

2. Use ls to list the directory contents.

3. Use cat or nano to see the contents of _default.cfg .

4. Copy any settings you want to apply to all instances to common.cfg.

It is recommended you only copy settings you want to change from _default.cfg into instance.cfg. If any settings in _default.cfg are updated with a new release of LinuxGSM they may not be picked up if all the settings have been copied.

5. Copy any settings you want to apply to a specific instance to its instance.cfg.

csgoserver.cfg
csgoserver-2.cfg

Examples

Example 1

Load de_nuke as default map on csgoserver:

_default.cfg: defaultmap="de_dust2"
common.cfg: NOT SET
csgoserver.cfg: defaultmap="de_nuke"

Example 2

Load cs_office as default map on csgoserver:

_default.cfg: defaultmap="de_dust2"
common.cfg: defaultmap="cs_office"
csgoserver.cfg: NOT SET

Example 3

Load de_dust2 as default map on csgoserver:

_default.cfg: defaultmap="de_dust2"
common.cfg: NOT SET
csgoserver.cfg: NOT SET

Example 4

Load de_nuke as default map on csgoserver instance and de_inferno on csgoserver-2 instance:

_default.cfg: defaultmap="de_dust2"
common.cfg: defaultmap="de_inferno"
csgoserver.cfg: defaultmap="de_nuke"
csgoserver-2.cfg: NOT SET

Example 5

Load de_nuke as default map on csgoserver instance and cs_office on csgoserver-2 instance:

_default.cfg: defaultmap="de_dust2"
common.cfg: NOT SET
csgoserver.cfg: defaultmap="de_nuke"
csgoserver-2.cfg: defaultmap="cs_office"