{% hint style="info" %} LinuxGSM Configs and Game Server Configs are different. One is the config for LinuxGSM itself and the other is for the game server instance. {% endhint %}
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.
Relative to your installation directory, config files are located in:
lgsm/config-lgsm/gameserver
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.
{% hint style="info" %} An understanding of how LinuxGSM handles multiple game server instances helps. {% endhint %}
_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.
{% hint style="warning" %} Do not edit _default.cfg any changes to this file will be overwritten. {% endhint %}
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
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.
{% hint style="danger" %} Secret configs are not encrypted, but a place to store sensitive info away from other configs. {% endhint %}
The secret configs are a place to put sensitive information such as steam login details away from the main config files. This is done to allow server admins to backup their configs while excluding sensitive information. This is particularly useful for admins who want to create a version-controlled skeleton configuration using git that they might want to make public.
It is important to know that the secret config is NOT encrypted or any more secure than other configs.
A secret config can be identified with the word secrets
prepended to the front of the config name.
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
.
_default.cfg -> common.cfg -> instance.cfg
This configuration fits most scenarios, where you have a simple installation with only one instance.
- Browse to the
config-lgsm
directory
cd lgsm/config-lgsm/
- Use
ls
to list the directory contents and find the name of your instance.cfg. - Use
cat
ornano
to see the contents of_default.cfg
.
cat _default.cfg
- Copy the individual settings you want to change to
instance.cfg
{% hint style="info" %}
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.
{% endhint %}
This configuration is useful for multiple instances.
- Browse to the
config-lgsm
directory
cd lgsm/config-lgsm/
- Use
ls
to list the directory contents. - Use
cat
ornano
to see the contents of_default.cfg
. - Copy any settings you want to apply to all instances to
common.cfg
.
{% hint style="info" %}
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.
{% endhint %}
- Copy any settings you want to apply to a specific instance to its
instance.cfg
.
csgoserver.cfg
csgoserver-2.cfg
Load de_nuke
as default map on csgoserver
:
_default.cfg: defaultmap="de_dust2"
common.cfg: NOT SET
csgoserver.cfg: defaultmap="de_nuke"
Load cs_office
as default map on csgoserver
:
_default.cfg: defaultmap="de_dust2"
common.cfg: defaultmap="cs_office"
csgoserver.cfg: NOT SET
Load de_dust2
as default map on csgoserver
:
_default.cfg: defaultmap="de_dust2"
common.cfg: NOT SET
csgoserver.cfg: NOT SET
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
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"