Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Game server config files are the configuration files used by the game server to store various game server settings, such as the server name, maximum players, map cycle, etc. These settings can be edited to customise a game server. Different game server configs can use different syntax and work slightly differently, but all do the same basic job of editing a game server settings.
The details command will provide you with some config file information. However, some servers do use multiple config files.
./gameserver details
./gmodserver details
gmodserver Script Details
==================================================================================
Service name: gmod-server
gmodserver version: 170110
User: ultimatebyte
GLIBC required: 2.15
Email alert: off
Pushbullet alert: off
Update on start: off
Location: /home/gmodserver
Config file: /home/gmodserver/serverfiles/garrysmod/cfg/gmod-server.cfgWhenever possible, LinuxGSM provides basic easy-to-use game server configuration files. A dedicated repository has been made so all server admins can benefit, even Windows admins.
This configuration file is automatically downloaded upon server installation.
Whenever possible, LinuxGSM uses a custom name for configuration files that contains the ${servicename} variable in it in order to allow the running of multiple game servers with different config files. If the game does not allow for that, then the usual name will be used.
For source servers, the default server.cfg is not used with LinuxGSM. Instead if you're running ./csgoserver, then the config file will be called csgoserver.cfg.
LinuxGSM will always check a config file is present when starting a server. If a config file is missing, it will re-download the default one or give a warning.
Game servers have many different ways of managing settings. Some are set within start parameters, while some are set within a configuration file.
One of the goals of LinuxGSM is to make managing these as easy as possible, by providing all important settings out of the box, wherever they are. There is no general rule about where config files are set. It is a good idea to look for the official documentation of the game server that you're trying to run in order to find relevant information about settings.
If you found settings that are absent from the default configuration file provided by LinuxGSM that would be a useful addition, then you can open an issue or a pull request.
The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
User docs: docs.linuxgsm.com
Dev Docs: dev-docs.linuxgsm.com
Welcome to the LinuxGSM documentation covering various topics related to the project.
Contributions to this documentation are welcome and can be submitted via GitHub.
To get started is to visit and pick a server to install. Follow the simple step-by-step guide to install your game server on Linux.
Once the installation is complete a working game server will be available. Use the various LinuxGSM commands available to manage the game server.
Read through this documentation to ensure you understand how to configure your game server.
The section will help you understand how to configure both LinuxGSM and the game server.

Many game servers require start parameters, these are command-line options that are set with the server executable when the server starts.
Using game server configs over parameters is preferred, however, sometimes this is not an option. When this is the case only parameters or a mixture of game server config and parameters will be used.
Parameters being used by the game server can be found in ./gameserver details. To alter them, you will need to edit LinuxGSM config files.
LinuxGSM often uses predefined parameters that can be edited. This makes adjusting common settings easier and allows them to be displayed in ./gameserver details.
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
defaultmap="map_name"
gamemode="game_mode"
maxplayers="42"
port="27015"
sourcetvport="27020"
clientport="27005"Additional command-line parameters can be added to the startparameters setting.
Anything added will be appended to the server executable binary.
Parms variable
Executable
startparameters="-game nmrih"
./srcds_run -game nmrih
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-game nmrih -strictportbind -ip 91.121.72.41 -port 27015 +clientport 27017 +tv_port 27016 +map nmo_broadway +servercfgfile nmrih-server-1.cfg -maxplayers 8"7 Days to Die
Gold Source Servers
The debug command is used to start your server directly in your current terminal (outside of (tmux) and should only be used for diagnosing issues. If a game server is already running in the background debug will stop it to start a debug session.
Standard: ./gameserver debug
Short: ./gameserver d
To exit debug mode use CTRL+c
The validate command will check the server files to make sure they match the SteamCMD repository. This command is useful if game server files are deleted, corrupted or SteamCMD is failing to update.
Validation will overwrite any files that have been changed. This may cause issues with customised servers. For example, if you customise mapcycle.txt, this file will be overwritten to the server default. Any files that are not part of the default installation will not be affected. It is recommended you use this command only on initial installation and if there are server issues.
Standard: ./gameserver validate
Short: ./gameserver v
The console command allows access the output of the game server executable. Depending on which server you are running it allows you to see the current activity of the game server, check errors in real time, and input commands.
Run the following command to access console:
Standard: ./gameserver console
Short: ./gameserver c
Answer y at the prompt.
To exit the console: Press CTRL + b, then, press d
Take your time as this can be confusing at first.
Pressing CTRL+c while in console will kill the tmux session, stopping the game server.
7 Days to Die uses telnet to admin the server. This is enabled by default with no password however will only listen on localhost.
LinuxGSM comes with an game server update command. All games servers are supported, as well as some other servers such as Teamspeak, Minecraft, Mumble & Factorio.
Standard: ./gameserver update
Short: ./gameserver u
Update will check for any available update, taking no action if no update is available. If there is an update it will apply the update, restarting the server if already running.
It is possible to update a game server on start, by editing the LinuxGSM config.
updateonstart="on"
This will take longer for the game server to start but can be useful for servers that are kept offline most of the time.
A can be set to run update at any given time.
To edit cronjobs, type:
crontab -e
A cronjob can be run as the gameserver user or as root, this choice is down to personal preference. Remember to amend the examples to match a specific game server.
Here is an example of a user based cronjob to check for an update once an hour.
Here is an example of a root based cronjob to check for an update once an hour.
It is recommended to check for updates once per hour.
is a great resource to generate cronjobs.
LinuxGSM provides an easy way to start, stop and restart your game server. LinuxGSM knows the location of the server binaries and inserts the start parameters to allow the server to start. LinuxGSM will also run various checks to prevent issues and apply any required server fixes to get the game server running.
Will start the server in a session allowing the server to run in the background.
./gameserver start
Stop will attempt a of a game server. Failing this stop will kill the tmux session.
./gameserver stop
If stoponlyifnoplayers setting is enabled LinuxGSM will only stop the server if it is empty and prevent it from stopping otherwise. This feature only works with game servers that can use gamedig.
Will simply stop, and then start the server.
./gameserver restart
There are hundreds in integrations available on allowing you to send alerts in all sorts of different ways to various services and devices. This functionality is used to allow users to recieve alerts about LinuxGSM.
To enable IFTTT you will need to setup a Webhooks integration.
Visit
Login and connect the Webhooks integration
Select Documentation to get your IFTTT API key.
Paste the API key into .
An event name is a word used to trigger IFTTT event. This word is used when setting up an applet and can be any word you choose.
IFTTT allows 3 different values to be sent using the webhook; Value1, Value2 and Value3. LinuxGSM sends different data for each value as listed below.
Value1: Sends the name of the server e.g csgoserver
Value2: Sends an alert subject e.g Alert - csgoserver - Test
Value3: Sends an alert summary message.
Create a New applet
Select the Webhooks service
Choose Receive a web request
Enter your Event Name and click Create Trigger
Select an action service.
Give the applet a name and save.
Minecraft: Java Edition required Java 16
Minecraft java edition splits up its release in two ways. Firstly a branch is either classed as a release or a snapshot. A release is a stable version of the game whereas a snapshot is still under development
With LinuxGSM you can specify a specific release/snapshot or the latest release/snapshot. By default, LinuxGSM will use the latest release.
Guides that are used on multiple servers
The force-update command bypasses the update check and runs the SteamCMD update regardless of update availability. This will run the SteamCMD update and restart the game server.
Force update is a useful feature for admins that restart their server daily. It allows LinuxGSM to check for updates while restarting the server.
Standard: ./gameserver force-update
Short: ./gameserver fu
0 * * * * /home/username/gameserver update > /dev/null 2>&10 * * * * su - username -c '/home/username/gameserver update' > /dev/null 2>&1stoponlyifnoplayers="off"LinuxGSM cannot always provide support for specific game servers. However, there are various support forums available for specific game server support that may be useful. Below is a list of useful links support forums:
monitor checks the game server to ensure the server functioning. First checking the game server process is running then querying the game server to check the game server is responding. monitor is designed to be an automated command that frequently checks the game server, rebooting and alerting if required.
Standard: ./gameserver monitor
Short: ./gameserver m
Monitor first checks that the server process or tmux session is running. If it is, it will then attempt to query the server using gamedig or query_gsquery.py. Should this fail to query it will attempt to query every 15 seconds over 60 second period. Should this fail the server will be rebooted and an alert sent out.
During server start, map change, workshop downloads, the server is unable to answer queries.The monitor will wait for 60 seconds as it is common for servers to stop responding to queries during a map change. This wait prevents monitor from rebooting a server that does not require it.
Monitor is designed to be and automated task, using cronjobs to allow a game server to be frequently checked.
As a reminder, you can edit your cronjobs, typing :
crontab -eUse these cron examples to setup automated monitoring.
A user based cronjob to monitor your server every 5 minutes .
*/5 * * * * /home/username/gameserver monitor > /dev/null 2>&1A root user based cronjob to monitor your server every 5 minutes .
*/5 * * * * su - username -c '/home/username/gameserver monitor' > /dev/null 2>&1To learn more about automation, see Cronjobs.
To be notified when a server fails alert notifications can be setup , see alerts.
Game Servers do not respond to queries while the server is booting. Query delay prevents monitor from giving a false positive should it query while the server is booting. A timed delay prevents monitor from using query at all during a set time (normally either 1 or 5 minutes) after start, giving the server time to boot and become ready to accept queries. Query delay timer can be adjusted using the querydelay setting.
## Monitor | https://docs.linuxgsm.com/commands/monitor
# Query delay time
querydelay="1"Starting and stopping the game server activates and deactivates monitor. This prevents the server being manually stopped only to be started again by monitor.
LinuxGSM comes with a game server check-update command. All SteamCMD games servers are supported, as well as some other servers such as Teamspeak, Minecraft, Mumble & Factorio.
Standard: ./gameserver check-update
Short: ./gameserver cu
Unlike the update command check-update will check for any available updates and take no action if no update is available. If there is an update it will send an alert.
A cronjob can be set to run check-update at any given time.
Ensure that an alert is configured so you are alerted to any updates
To edit cronjobs, type:
crontab -e
A cronjob can be run as the gameserver user or as root, this choice is down to personal preference. Remember to amend the examples to match a specific game server.
Here is an example of a user-based cronjob to check for an update once an hour.
0 * * * * /home/username/gameserver check-update > /dev/null 2>&1Here is an example of a root-based cronjob to check for an update once an hour.
0 * * * * su - username -c '/home/username/gameserver update' > /dev/null 2>&1crontab.guru is a great resource to generate cronjobs.
How LinuxGSM handles IP addresses
By default, LinuxGSM will use the 0.0.0.0 meta-address. This behavior will allow the game server to bind to all interfaces and allow LinuxGSM to query all available IP addresses. If there are multiple IP addresses available, details will display 0.0.0.0.
Internet IP: LinuxGSM will try to gather the server's internet IP address to be shown in details.
Specific IP: If a specific IP address needs to be set it can be done using the ip setting in the LinuxGSM or game server config files. Depending upon the game server this will allow it to bind to a specific IP address.
Display IP: If you want to change the IP address displayed in alerts you can use the displayip.
The skeleton command created a mirror of the directory structure of a game server. This allows you to create a skeleton directory of custom files, configs, maps etc.
Standard: ./gameserver skeleton
Short: ./gameserver sk
The skeleton directory is created in skel.
/home/gameserver/skelSkeleton can be used alongside version control software like git or backed up to save custom configurations for a game server. If a change is added to your git repository/backup it is possible to pull/copy the updates to your game server. If you want to re-deploy a game server you can create a fresh installation and pull/copy in the custom changes over the top of the fresh install.
Logs are an important part of monitoring a server as it allows you to know what has been happening. LinuxGSM has a log directory that allows you to track the gameserver, console and LinuxGSM itself.
If your user is gameserver, then LinuxGSM logs are located in the following directory:
/home/gameserver/log
This "log" directory contains two other directories:
script, logs LinuxGSM script activity
console, logs gameserver [console](../commands/console.md) output
game, is a redirect to the game server log files if available.
Settings
You can alter these settings to change LinuxGSM behavior:
logdays="7" # How long logs are kept
consolelogging="on" # Turning this to off will disable console loggingNote: logdays="0" means logs will be removed if older than 24h.
LinuxGSM clears outdated logs according to logdays variable setting. This will affect script and console logs, as well as common game logs.
LinuxGSM also clears logs from common locations to prevent them from using gigabytes of disk space, including:
${systemdir}/logs
${systemdir}/*/logs
${systemdir}/addons/sourcemod/logs
${systemdir}/data/darkrp_logs
${systemdir}/data/ulx_logs
Note: ${systemdir} designates the location of your game server installation
TODO
SFTP (Secure File Transfer Protocol) is the transfer protocol to view and transfer files over SSH. SFTP works the same as FTP but is encrypted.
Encrypted
Nothing extra to install (such as FTP server)
Works like any other FTP server
Compatible with the popular clients such as Filezilla and WinSCP
You can login to any SSH accessable Linux user.
Connect like any FTP except it uses the port (default 22)
Use your linux username / password
You might need to set protocol to SFTP in your FTP client.
Connect to a server as root.
Use FTP if SFTP is available.
Here is why you shouldn't
By logging in as root, you might accidentally remove essential system files or put useless files into the wrong place and mess up with your system.
But even more annoying, any file you'll write will belong to root, and the user won't be able to either read, change, or execute writtent files as root.
FTP is an unencrypted protocol, therefore it is very unsecure to edit sensitive files using it.
How to operate without root FTP login ?
If you need to edit system config files, then do like everyone else : use an SSH text editor like "nano" or "vi".
Set your FTP so that you can login as users with a valid shell from the machine. Eventually, disable root FTP login.
Oh, one more thing... Did we talk about SFTP ?
TO-DO
needs to be verified
(NOTE: This method is detailed further here. The web page also describes how to give certain users the default full access to listing all processes.)
By default, a user can see all started processes from other users, which is bad, but also their start parameters, which is pretty dangerous. Those start parameters can contain sensitive information, such as RCON password, Steam API keys and GSLT upon start, a Rust dedicated server is checking if the process name started by any user, and will prevent you from running it again if it finds it, displaying "Player is already running".
To avoid that, run:
mount -o remount,rw,hidepid=2 /procAnd to keep the changes upon machine reboot:
nano /etc/fstab
# Here are the modification to apply to the "proc" line
proc /proc proc defaults,hidepid=2 0 0You still need to make one user per server, change ports, and repeat the install process. (See this for more info)
Symlinks create multiple paths to a file or directory and are useful for saving space or having 1 set of files for multiple installs.
This guide is for pointing multiple directories to the same folder using ln command. Ln creates hardlinks and softlinks, the -s variable creates softlinks. These can be compared to shortcuts on windows, and are going to be used in this guide.
Example guide using two "one server + one user" installs with Sven Co-op:
Gameserver folder 1: /home/svencoop/serverfiles/svencoop_downloads/
Gameserver folder 2: /home/svencoop2/serverfiles/svencoop_downloads/
Shared folder /home/svencoop_content/svencoop_downloads/
The command to link these would be ln -s /shared_folder/ /gameserver_folder/
ln -s /home/svencoop_maps/svencoop_downloads/ /home/svencoop/serverfiles/
ln -s /home/svencoop_maps/svencoop_downloads/ /home/svencoop2/serverfiles/
Change the game server folder ownership to be under their respective users and you are done.
chown svencoop /home/svencoop/serverfiles/svencoop_downloads
chown svencoop2 /home/svencoop2/serverfiles/svencoop_downloads
The files in the symlinks do not need be owned by the gameserver users and will not be recognized by linuxGSM's ownership check. That being said, make sure they can be read by the gameserver users.
Excellent description of differences between Symlinks and Hardlinks by OSTechNix
Allows the selection of specific builds of a game server in SteamCMD
Game developers sometimes make available several builds of the game server on Steam, often to allow beta testing of new releases. These builds are made available via branches (betas) and can be entered in the LinuxGSM Config.
A list of all available branches for a game server are listed on SteamDB under the appid depots.
The default SteamCMD branch is public. However, it is possible to use other builds by entering a branch name in the branch setting in your LinuxGSM config.
# Steam App Branch Select
# Example: "latest_experimental"
branch="staging"Some branches require a password. This can be done by entering a password in thebetapassword setting in your LinuxGSM config.
betapassword="branchpassword"# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT
iftttalert="off"
ifttttoken="e-Yg8blVGDA15ewWvtZjUe"
iftttevent=""# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT
iftttalert="off"
ifttttoken="e-Yg8blVGDA15ewWvtZjUe"
iftttevent="linuxgsm_alert"Testing LinuxGSM Alert. No action to be taken.
Game Squad
Server name LinuxGSM Server 1
Hostname ubuntu.example.com
Server IP 1.2.3.4:27015Game Port Default: 7777 UDP Handled by: LinuxServer-KFEngine.ini
Query Port Default: 27015 UDP Handled automatically or handled by parameters. The formula for finding query port assigned automatically is 19238 + assigned game port.
Web Admin Default: 8080 TCP Handled by: KFWeb.ini
Steam Port Default: 20560 UDP Handled automatically. The formula for finding the steam port is 12783 + Game Port.
Killing Floor 2 Official Server Wiki
Killing floor 2 Official Forums
LinuxGSM installations contain configSubDir=servername in the command line by default, which creates a folder for config files named after the server. The default directory is /home/user/serverfiles/KFGame/Config/kf2server . Use these files to change server settings.
Players on the Epic Store will not be able to download files hosted with the Steam Workshop.
Workshop content is added in LinuxServer-KFEngine.ini in the OnlineSubsystemSteamworks.KFWorkshopSteamworks section
Ensure the game server is stopped before editing the file to prevent it being overwritten.
KFGame/Config/kf2server/LinuxGSM-KFEngine.ini[OnlineSubsystemSteamworks.KFWorkshopSteamworks]
ServerSubscribedWorkshopItems=605633924
ServerSubscribedWorkshopItems=605551918
ServerSubscribedWorkshopItems=605549089
ServerSubscribedWorkshopItems=605532351This will only work for Workshop items that the server downloads itself, that are listed in the [OnlineSubsystemSteamworks.KFWorkshopSteamworks] section as described above.
Make sure that the server is not running. If it is running, the Workshop setup will be overridden the next time you restart the server.
Find the section [IpDrv.TcpNetDriver] in the PCServerEngine.ini config file.
Add the line "DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload" to that section. If there are other "DownloadManagers=" lines, make sure this one is the first.
Do not delete anything from this section, except (optionally) other DownloadManagers= lines.
Information for Sven Co-op servers
Official Resources
The discord contains information for Sven Co-op under the information tab including mapping guides, server config information, and angelscript documentation, among other things.
Reminder: Sven Co-op is incompatible with both CentOS and Fedora as libssl.so.1.0.0 is not available
Survival Mode settings, can be set in svenserver.cfg
//Default Survival state (enabled by default) 1=on 2=off
mp_survival_mode
//1=Players can vote to enable/disable survival 2=Players can't vote on this
mp_survival_voteallow
//Number of retries before "next map" vote starts. -1 is infinite, 3 is default
mp_survival_retries
//Minimum number of players needed to start Survival mode
mp_survival_minplayers
Many Steam games support the Steam Workshop. It is an easy way to share community game modes, maps, skins, and other community-made content.
For game servers, the Workshop allows community content (mainly maps and game modes) to be made available to play on game servers. The Workshop content is automatically downloaded by the game client of the player connecting to the server. This removed the need to set up a FastDL server.
LinuxGSM adds workshop pre-configuration to game server scripts when available.
This is a list of game servers that are known to support Workshop
Ark: Survival Evolved
ARMA 3
Day of Infamy
Counter-Strike 2
Garrys Mod
Hurtworld
Insurgency: Sandstorm
Killing Floor 2
Natural Selection 2
Starbound
Some game servers require a Steam API key to access Workshop content. To get this key visit the Steam API key page and follow the instructions.
Do not share your private API key.
The Steam Workshop is made up of individual items such as maps, game modes, skins, etc, and also collections of these items. Game servers can download these items and collections by getting their unique ID number and adding it to the game server config or parameter. For collections, it is possible to find and use an existing one or create your own.
To get and item or collection ID browse to the item you want to add and look at the URL; it will contain the required ID number. In the example below the ID is 3075706807.
https://steamcommunity.com/sharedfiles/filedetails/?id=3075706807Creating a collection is a great way to manage and group all the content that you want on your game server.
To create your collection go to the collections section of your games Workshop, and select Create Collection.
Fill out the form.
Add any maps to the collection, then publish the completed collection. Then get the collection ID which can be found on the page URL. The collection ID in the url below is 157384458.
https://steamcommunity.com/sharedfiles/filedetails/?id=157384458Custom Mods and Maps are supported in Insurgency: Sandstorm via mods.io. Please use this basic guide to get started using custom mods more in-depth information can be found at mod.io Server Admin Guide
To get started you will need a mod.io account, once you have signed in, click your username as the top right, and click API Access from the left navigation.
Under OAuth 2 Management > Generate Access Token, enter a name to give your token and give it read access and click Create Token.
Once the token is generated you will need to copy it to your game servers Engine.ini. Paste the following into Engine.ini and replace TOKEN HERE with your access token.
[/Script/ModKit.ModIOClient]
bHasUserAcceptedTerms=True
AccessToken=TOKEN HEREAdd the -Mods parameter to your game server start parameters.
Next you will need to specify which mods you want to add to your game server.
Create the Mods.txt file located Insurgency/Config/Server/Mods.txt
mkdir -p Insurgency/Config/Server
touch Insurgency/Config/Server/Mods.txtIn the txt file you will need to specify each mod ID line by line. The mod ID can be found on the mods details page at mod.io. Once restarted the mod will be available to use.
To use this custom map you will need to add it to your mapcycle and if required, your default map
Create MapCyle.txtand add the custom map to your mapcycle.
touch Insurgency/Config/Server/MapCyle.txt
(Scenario="Scenario_TORO_Checkpoint_Security",Lighting="Day",Mode="Checkpoint")
(Scenario="Scenario_TORO_Checkpoint_Insurgents",Lighting="Day",Mode="Checkpoint")If you want the custom map to be the default edit your start parameters
defaultmap="TORO"
defaultscenario="Scenario_TORO_Checkpoint_Security"Once the server is restarted the custom map should be available on your game server.
Valheim servers require a server password to start a server. This means it is not possible to connect to a Valheim server unless you know the password.
The Valheim in-game browser can be slow, as a workaround you can directly connect to a server in-game through the Join Game tab by pressing the Join IP button, or by adding a server to your Steam server browser favorites. To access the Steam server list, at the top left of the Steam library window go View > Game Servers > Favorites, and click the blue + button. Use ./vhserver details to list the current query port. The default port is 2457.
Valheim has been previously known to have problems with long server names and special characters, if you are having trouble connecting to a server try making its name shorter or remove special characters.
Add admins to Valheim server:
https://nodecraft.com/support/games/valheim/adding-admins-to-your-valheim-server
Slack is a cloud-based set of proprietary team collaboration software tools and online services.
A webhook is required to post alerts to a slack.
Follow slack's guide to setting up an incoming webhook.
Copy the Webhook URL
Turn on slack alerts and enter the URL in to the LinuxGSM settings. (~/lgsm/config-lgsm/<gameserver>/common.cfg)
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
slackalert="on"
slackwebhook="your webhook url"Both Source engine and GoldSrc engine use the following ports by default.
Game Port: 27015
Query Port: 27015
RCON Port: 27015
Client Port: 27020
Source TV: 27005
The port that is configured in the start parameters must be the port that is exposed to the Internet. This is because the game server reports the port that it is configured in start parameters to use to the master server. If this does not match the game client will not be able to connect to the server.
An MTA server comes in two parts. MTA itself and then the resources you install. There is the option to install the default MTA resources to your server within LinuxGSM on install or using the ./mtaserver install-default-resources option. There are many resources available so it is recommended that you take a look at the MTA community resources page Community
Resources are a key part of Multi Theft Auto. A resource is essentially a directory that contains a collection of files - including essential script and content files, plus a meta file that describes how the resource should be loaded - and runs on a Multi Theft Auto dedicated server.
A resource can be seen as being partly equivalent to a program running in an operating system - it can be started and stopped, and multiple resources can run at once. Its worth remember though, that unlike programs on an operating system, there is no multi-tasking between resources. Resources generally contain content and Lua scripts for game modes, user interfaces and other tasks affecting the players that are connected to the dedicated server on which the resources are running.
For a collection of user created resources, head over to our Community web page which serves as a place for hosting our community's resources.
Some game servers are listed on the steam master server list
For a game server to be seen online it normally has to register itself on a master server list. Valve maintains a master server for many different games. The master server is used to populate the server browser.
LinuxGSM can check that supported game servers are listed on the steam master server. This is useful for confirming that the server is actually registering and to help diagnose issues.
You can check that your server is listed on the master server by using ./gameserver details
Master server: listedsteammaster="true"There are instances when a game server might not appear in the server list due to several common reasons:
Server Loading Time: Please be patient while the server loads, as it may take some time before it becomes visible. Depending on the game server type, certain servers require additional time for tasks like map seeding or loading mods.
Blocked or Misconfigured Ports: Ensure that the ports are correctly set up and not blocked. To verify the connection, try connecting directly to the server.
Filtering in Server List: Check that you have not applied any filters in the server browser. Filters like specific maps, "Empty Server," or "Password Protected" should be unchecked to display all available servers.
Server Browser Limitations: It's possible that the server browser functionality of the game might not list all available game servers. In such cases, not all servers may be visible in the server list.
LinuxGSM uses tmux to run servers in the background so the server instance is not terminated when you close a terminal session.
Tmux is a key component of LinuxGSM and replaced screen which was used on earlier versions. tmux has a few improvements over screen; mainly being better at handling standard Linux users, this was a major issue when developing with screen. tmux allows LinuxGSM to call up a game server running in the background so you can see what it is doing; this feature is available with console feature.
Some server admins have attempted to run LinuxGSM within a tmux or screen session. As LinuxGSM calls tmux it is not possible to run LinuxGSM within a tmux or screen session.
tmux 1.8 has an issue that prevents console logging from working. This is because the pipe-pane feature is broken in tmux 1.8 causing it not to output the console to the console log files. The only solution is to use another version of tmux.
tmux 1.8 is installed on CentOS 7 by default see guide below to installed a newer version
This issue normally occuires with CentOS and is caused by the standard user not having permissions to user /dev/ptmx.
create session failed: ./srcds_linux -game csgo: Operation not permittedTo fix this the user needs to be part of the tty group.
usermod -G tty csgoserverTo confirm the user has been added check /etc/group.
grep tty /etc/grouptty:x:5:csgoserverIf the default version of tmux (1.8) installed on CentOS 7 it will fail to log the console output. To fix this it is possible to upgrade to a newer version of tmux using the Ghettoforge repository.
Install Ghettoforge with the following command.
yum install http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpmInstall tmux using the Ghettoforge repo.
yum --enablerepo=gf-plus install tmuxOnce installed restart the server to complete the upgrade.
restartPushbullet allows the sending of push notifications to various devices such a PC, phone and tablet. This functionality is used to allow users to recieve alerts about LinuxGSM.
To enable Pushbullet alerts an Access Token needs to be generated. Access Tokens are available from Pushbullet setting found here.
Once you have created a token insert it in to you LinuxGSM config.
# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet
pushbulletalert="on"
pushbullettoken="o.noWN6jpIeBUkLraw24saHKd7ksOkn7on"
channeltag=""Alerts can also be sent to Pushbullet channels. Channels are push notification feeds that can be subscribed to. Anything you push to a channel will instantly go to all of the channel's subscribers. Only the owner of a channel can push to it.
Visit here to generate a channel.
Once you have created the channel set the channeltag in the script without using hash #.
channeltag="myepicserver"The configuration of LinuxGSM is handled through several config files, which are loaded in a specific order. Understanding this process is crucial to ensure that settings are appropriately placed within the correct config files.
Relative to your installation directory, config files are located in:
The LinuxGSM configuration mechanism is intentionally designed to provide users with several advantages. These include the ability to access new features, retain default settings, effectively handle multiple instances, and allow LinuxGSM to update the configuration when necessary.
_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 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.
Secret configs are not encrypted, but a place to store sensitive info away from other configs.
Secret configs serve as a designated space for storing sensitive information, such as steam login details, separately from the main config files. This separation allows server administrators to back up their configurations while excluding sensitive data, enhancing security and privacy. It proves especially valuable for administrators who wish to create a version-controlled skeleton configuration using git that might eventually become publicly accessible.
It's essential to understand that the secret config is not encrypted or inherently more secure than other config files. However, it provides a convenient way to keep sensitive information isolated from the rest of the configurations.
To distinguish secret configs from others, their names are typically prefixed with the word "secrets." This naming convention aids in identifying and managing these specific files.
When the configuration files are loaded by LinuxGSM, they adhere to a specific order. Initially, settings are fetched from _default.cfg, followed by common.cfg, and finally instance.cfg. As a result, any setting specified in instance.cfg will take precedence over the same setting in common.cfg, which, in turn, overrides the setting in _default.cfg. This hierarchical loading ensures that settings become increasingly specific, with instance configurations having the highest priority.
This configuration fits most scenarios, where you have a simple installation with only one instance.
Browse to the config-lgsm directory
Use ls to list the directory contents and find the name of your instance.cfg.
Use cat or nano to see the contents of _default.cfg .
Copy the individual settings you want to change to instance.cfg
This configuration is useful for .
Browse to the config-lgsm directory
Use ls to list the directory contents.
Use cat or nano to see the contents of _default.cfg .
Copy any settings you want to apply to all instances to common.cfg.
Copy any settings you want to apply to a specific instance to its instance.cfg.
Load de_nuke as default map on csgoserver:
Load cs_office as default map on csgoserver:
Load de_dust2 as default map on csgoserver:
Load de_nuke as default map on csgoserver instance and de_inferno on csgoserver-2 instance:
Load de_nuke as default map on csgoserver instance and cs_office on csgoserver-2 instance:
systemd is the default init system for most modern distros.
You need to create a service file in /etc/systemd/system/
Example ts3server.service
Replace the user and paths to fit your setup.
You need to reload the systemd-daemon once to make it aware of the new service file by systemctl daemon-reload
Now you can do
The crontab will allow you to create that allow you to run a command on a set time or on boot. The below example uses @reboot that will run a command on boot.
monitor commandAfter a reboot, any game server that has a "started" status will be started on boot. Servers that were manually stopped will remain stopped.
To learn more, see and .
start commandStart a game server unconditionally, even if you manually stop a server.
To learn more, see
rc.localrc.local is another method to run scripts on boot. Any commands added to the rc.local file will run on boot.
Many tutorials state that the game disk is required to install a CoD4 server. This is because the server is built into the client. This made it difficult to distribute and create a CoD4 server.
After investigating this issue, it was found that it is possible to run a server with most of the client files removed. This greatly reduces the file size and prevents the client from being used. Because of this LinuxGSM provides a download to only the files required to run the server. Preventing the use of the client, removing the opportunity to use the server to pirate the game.
cod4server uses CoD4x project for its server, rather than the original, as it fixes various bugs and adds a few features over the vanilla server.
CoD4x has its own update functionality. It will automatically check for updates and does not require LinuxGSM to check for updates.
CoD4x game servers (since version 17.6) require a server token to be listed on the CoD4x master server.
To generate a token visit .
Once a token is generated add it to the sv_authtoken cvar in server.cfg or command-line parameters.
The server then needs to be restarted to allow the game server to be listed.
Mods for Call of Duty 4 have to be manually added to the game server.
To run a mod the servers fs_game variable must be set correctly. Mods reside in the mods folder inside fs_homepath. Example directory tree:
To start the server with a mod set the fs_game variable accordingly.
Modded CoD4 servers have the ability to run with user-created maps. To run a server with a custom map, it has to first be placed in the usermaps directory (if missing simply create it yourself).
Typically, maps are prefixed by mp_ following the maps name.
Running custom maps on unmodded servers is not supported, but there is a neat workaround to still load custom maps. First, create a mods folder and some empty folder inside it.
Now set fs_game to mods/myemptymod and you will be able to run custom maps.
is possible with CoD4 to allow custom maps and mods to be hosted on a webserver.
here sv_wwwBaseURL has to point to a URL served by your web server.
An example directory tree for a served folder may look as below:
LinuxGSM allows for the simple installation of game servers. The installer is designed to get a game server to a working state allowing the game server to be started right away.
The installer will:
Create required directories
Install/advise on required dependencies
Download the game server files
Load config files
Apply any fixes required to get the game server working
The standard installation is the default installation method that requires user interaction.
Standard: ./gameserver install
Short: ./gameserver i
Auto install is useful for automatic server deployments as no user prompt is required.
Standard: ./gameserver auto-install
Short: ./gameserver ai
Make your script executable:
chmod +x gameserver
Run the install command: ./gameserver install or ./gameserver auto-install to bypass any prompts.
Follow on-screen instructions.
Installation of dependencies requires either sudo or root access. LinuxGSM can automatically install dependencies if the user has sudo or is root.
If dependencies are not installed the server may not start.
As root run ./gameserver install and the installer will complete a dependency installation only, ignoring the other installation steps.
If a user has sudo access the installer will prompt to enter the sudo password to automatically install dependencies. If sudo is not available the installer will advise on the command required to install dependencies.
LinuxGSM may fail to run if the correct permissions have not been used. This fault commonly occurs if an admin has not correctly followed installation instructions found on
Common faults include:
Trying to install the LinuxGSM as root.
Trying to install LinuxGSM in a directory not owned by the correct user.
Not making gameserver file executable using the chmod +x command.
If trying to run as root LinuxGSM will fail to run. See .
To check if the correct user owns the directory or gameserver file, use ls -al
Example output
If some files/directories are not owned by the correct user, use the chown command. Login as root and use the following command, changing the details to match your server
chown -R username:username /home/gameserver
chown -R csgoserver:csgoserver /home/csgoserver
If the connection to the Steam servers is poor (quite common), the SteamCMD download can fail. This is why LinuxGSM will always ask you if the installation was successful allowing admins to retry the download should it fail.
If there are still issues downloading try the option.
./gameserver validate
If downloading is still failing it may be worth contacting your server provider to confirm Steam servers are not being blocked for any reason.
It is also worth searching the internet for issues relating to the error message you receive.
Some game servers take up a significant amount of disk space. If you are having issues downloading check that your server has enough space available.
To check your available storage, use:
df -h or ./gameserver details
Make sure you can ping using a hostname.
Should this fail, your server may not have DNS lookup correctly configured.
allows the sending of push notifications to various devices such a PC, phone and tablet. This functionality is used to allow users to receive alerts about LinuxGSM.
A Pushover application and your user key is required to send messages to Pushover.
Visit to create a new application.
name: LinuxGSM
Check the box agreeing to the Terms Of Service.
Once the application has been created get the API key and user key (which can be found in the pushover dashboard). Turn on Pushover alerts and paste in API key and user key in the .
Most servers require a specific version of glibc installed. Newer distros normally have the required version. However the older the distro the less likely the server will run. Check the requirements below. If you have an older distro the game server may still run with a .
A complete list can be found .
List of distros and there glibc version.
is also a great source to find this information.
glibc version history available on .
is a VoIP app that allows other applications to send messages via a webhook. This functionality is used to allow users to recieve alerts about LinuxGSM.
A webhook is required to post alerts to a Discord text channel
Right-click on the text channel you want to use and select Edit channel.
Select Webhooks > Create Webhook
Name: LinuxGSM
Icon:
Copy the Webhook URL
Turn on discord alert and enter the URL in to the . (~/lgsm/config-lgsm/<gameserver>/common.cfg)
The details command allows access to various useful information about the game server. Details are gathered from configs, parameters and server queries.
Standard: ./gameserver details
Short: ./gameserver dt
postdetails (using hastebin) is used to share server details, to help with support, while hiding sensitive information:
Standard: ./gameserver postdetails
Short: ./gameserver pd
Various relevant details are provided including:
Distro Details
Performance
Disk usage
Server Name
Server IP
Server Ports
Passwords
Config File
Backups
Server parameters
jq allows LinuxGSM to filter json files to extract specific useful data.
Sourcemod Resources and Known Problems
Sourcemod is a plugin for source games that can add functionality like voting systems, minigames, and server utilities. Sourcemod requires Metamod to run.
LinuxGSM includes a that is able to install Sourcemod automatically.
Sourcemod Official Resources
Sourcemod Plugins
Plugins can be downloaded from Alliedmodders website:
If players are kicked after joining, make sure Sourcemod does not have any errors and is up to date
Check folder hierarchy in archives before unpacking, each plugin creator organizes their archives differently.
The server may need to be set to sv_pure 0 in some cases.
If the server changes to dust or mirage instead of the chosen map, disable the nextmap plugin.
A Linux server's own email solution can be used to receive alerts about LinuxGSM.
LinuxGSM will send an email using the mail command.
Postfix or equivalent must be setup and correctly configured before sending emails. Failure to correctly configure Postfix and a domain for your server will mean the email alert may be flagged as spam or not arrive at all. Configuring postfix is not covered here, but there are many tutorials online to help.
is a paid service with 3 month free trial that can be used as an email relay to reduce the chances of email alerts being blocked as spam.
To enable email alerts you will need to add an email address to the .
Many admins who have tried, reported a local server does not appear on the LAN tab in the steam browser.
Connect using the console command.
If the port is 27015, then you can just use : connect IP
Add the server to the server browser's favourites. If in-game, then go to the legacy browser if applicable to find it. The syntax to use is the same as for the console connection.
Make sure your server actually works and is reachable on LAN, otherwise what you need is rather first.
As shows, there might be a possible configuration that fixes the issue, but LinuxGSM devs were not able to reproduce it at the time of writing the doc, so this information is purely experimental and you are welcome to update it or post on the issue if you have useful information to share about it.
Edit your using your files
Change ip="0.0.0.0" to an actual interface IP, for example ip="192.168.1.10" ; this will allow LinuxGSM to and query your server properly.
In the fn_parms section, add +sv_lan 1 and make sure you replace -ip ${ip} with -ip 0.0.0.0
Make sure your server main port listens to one of these IP or IP ranges: 4242 ; 26900-26905 ; 27015-27020 ; 27215
LinuxGSM allows alerts to be received using various methods, should the game server require your attention.
Alert settings can be changed in
More info allows you to get further info about an alert using hastebin.com. Many alerts only give basic info, unlike email. More info displays the same output as email in a link within a basic alert.
The IP address you want to be displayed in alerts.
By default, the LinuxGSM alert will display the external internet facing IP. Failing this will fall back to the server IP. If the IP is incorrect it can be manually set using displayip="".
Stop mode allows a game server to gracefully shutdown by sending a stop signal to the server. The stop signal might be one of the various commands such as stop,quit,exit etc. In some cases, this is important to give the server time to save its state.
Distro Details
===============================================================================================================================================================
Distro: Debian 7.7
Arch: x86_64
Kernel: 2.6.32-042stab102.9
Hostname: vps86887.ovh.net
tmux: tmux 1.6
GLIBC: 2.13
Performance
===============================================================================================================================================================
Uptime: 0d, 17h, 36m
Avg Load: 0.00, 0.02, 0.00
Mem: total used free
Physical: 1.0G 1.0G 17M
Swap: 128M 25M 102M
Disk Usage
===============================================================================================================================================================
Disk available: 5.4G
Serverfiles: 1.6G
Backups: 4.8M
Fistful of Frags Server Details
===============================================================================================================================================================
Server name: Fistful of Frags Server
Server IP: 192.168.1.1:27015
RCON password: rconpassword
Status: OFFLINE
Service name: fof-server
User: fofserver
Location: /home/fofserver
Config file: /home/fofserver/serverfiles/fof/cfg/fof-server.cfg
Backups
===============================================================================================================================================================
No. of backups: 1
Latest backup:
date: Fri Jan 23 15:54:52 CET 2015
file: /home/fofserver/backups/fof-server-2015-01-23-155447.tar.gz
size: 4.8M
Command-line Parameters
===============================================================================================================================================================
./srcds_run -game fof -strictportbind -ip 192.168.1.1 -port 27015 +clientport 27005 +tv_port 27020 +map fof_depot +servercfgfile fof-server.cfg -maxplayers 16
Ports
===============================================================================================================================================================
Change ports by editing the command-line
parameters in ./fofserver.
Useful port diagnostic command:
netstat -atunp | grep srcds_linux
DESCRIPTION DIRECTION PORT PROTOCOL
> Game/RCON INBOUND 27015 tcp/udpDistro
Version
Ubuntu LTS 16.04
1.4
Ubuntu LTS 18.04
1.5
Debian 8
1.4
Debian 9
1.5
Debian 10
1.5
CentOS 7
1.6
CentOS 8
1.5
# Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill
# 2: CTRL+c
# 3: quit
# 4: quit 120s
# 5: stop
# 6: q
# 7: exit
# 8: 7 Days to Die
# 9: GoldSrc
# 10: Avorion
# 11: end
# 12: shutdown
# 13: Soulmask
stopmode="7"lgsm/config-lgsm/gameserver_default.cfg -> common.cfg -> instance.cfgcd lgsm/config-lgsm/cat _default.cfgcd lgsm/config-lgsm/csgoserver.cfg
csgoserver-2.cfg_default.cfg: defaultmap="de_dust2"
common.cfg: NOT SET
csgoserver.cfg: defaultmap="de_nuke"_default.cfg: defaultmap="de_dust2"
common.cfg: defaultmap="cs_office"
csgoserver.cfg: NOT SET_default.cfg: defaultmap="de_dust2"
common.cfg: NOT SET
csgoserver.cfg: NOT SET_default.cfg: defaultmap="de_dust2"
common.cfg: defaultmap="de_inferno"
csgoserver.cfg: defaultmap="de_nuke"
csgoserver-2.cfg: NOT SET_default.cfg: defaultmap="de_dust2"
common.cfg: NOT SET
csgoserver.cfg: defaultmap="de_nuke"
csgoserver-2.cfg: defaultmap="cs_office"[Unit]
Description=LinuxGSM Teamspeak3 Server
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
User=ts3server
WorkingDirectory=/home/ts3server
#Assume that the service is running after main process exits with code 0
RemainAfterExit=yes
ExecStart=/home/ts3server/ts3server start
ExecStop=/home/ts3server/ts3server stop
Restart=no
[Install]
WantedBy=multi-user.targetsystemctl start ts3server # Start the server
systemctl stop ts3server # Stop the server
systemctl enable ts3server # Enable start on boot
systemctl disable ts3server # Disable start on boot @reboot '/home/username/gameserver monitor' > /dev/null 2>&1crontab -e
@reboot su - username -c '/home/username/gameserver monitor' > /dev/null 2>&1crontab -e
@reboot su - username -c '/home/username/gameserver start' > /dev/null 2>&1nano /etc/rc.local
su - username -c '/home/username/gameserver start'set sv_authtoken "mytokenhere"`+set sv_authtoken "mytokenhere"mods/
├── pml220
│ ├── mod.ff
│ ├── pml220.iwd
│ ├── z_c_r.iwdparms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap} +set fs_game "mods/pml220"" ├── usermaps
│ ├── mp_nuketown
│ │ ├── mp_nuketown.ff
│ │ ├── mp_nuketown.iwd
│ │ ├── mp_nuketown_load.ff ├── mods
│ ├── myemptymodset sv_allowDownload "1" // allow clients to download gamefiles
set sv_wwwDownload "1" // enable download redirection
set sv_wwwBaseURL "http://domain.tld/cod4fastdl/" // defines url to download from
set sv_wwwDlDisconnected "0" // disconnect clients while downloading cod4fastdl/
├── mods
│ ├── pml220
│ │ ├── mod.ff
│ │ ├── pml220.iwd
│ │ ├── z_c_r.iwd
├── usermaps
│ ├── mp_nuketown
│ │ ├── mp_nuketown.ff
│ │ ├── mp_nuketown.iwd
│ │ ├── mp_nuketown_load.ffdrwxrwxr-x 5 nmrihserver nmrihserver 4096 Jul 17 20:25 lgsm
drwxr-xr-x 4 nmrihserver nmrihserver 4096 Aug 27 2015 log
-rwxrwxr-x 1 nmrihserver nmrihserver 3885 Aug 9 23:04 nmrihserver
drwxrwxr-x 8 nmrihserver nmrihserver 4096 Jul 17 20:32 serverfiles
drwxrwxr-x 3 nmrihserver nmrihserver 4096 Jul 17 20:25 .steam
drwxrwxr-x 8 nmrihserver nmrihserver 4096 Aug 19 16:00 Steam
drwxrwxr-x 6 nmrihserver nmrihserver 4096 Aug 19 16:00 steamcmdping google.comDistro
glibc
CentOS 7
2.17
CentOS 8
2.28
Debian 9
2.24
Debian 10
2.28
Debian 11
2.31
Ubuntu 16.04 LTS
2.23
Ubuntu 18.04 LTS
2.27
Ubuntu 20.04 LTS
2.31
# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
emailalert="off"
email="[email protected]"
emailfrom=""# More info | https://docs.linuxgsm.com/alerts#more-info
postalert="off"# Display IP | https://docs.linuxgsm.com/alerts#display-ip
displayip=""





LinuxGSM supports the installation, updating, and removing of selected mods and add-ons for some games and engines. Zip add-ons are currently the only supported installations.
./gameserver mods-install
./gameserver mi
./gameserver mods-update
./gameserver mu
./gameserver mods-remove
./gameserver mr
(This list was last updated on 2020-11-19)
Metamod
AMX Mod X
Additional Game Specific AMX Mod X addons:
Counter-Strike 1.6
Day of Defeat
Team Fortress Classic
The Specialists
Natural Selection
Metamod: Source
SourceMod
ACF
ACF Missiles
DarkRP
DarkRP Modification
PAC3
UClip
ULib
ULX
UTime
Rust, Hurtworld, 7 Days To Die
Oxide Mod
All available mods are defined in the mods_list.sh.
Mods hosted on github use the latest archive link available. Others are scraped through a mods download mirrors in order to find the latest version.
If some mods are already installed, a list of installed mods shows up. If a user tries to install a mod that is already installed, there will be a warning that any custom files will be overwritten.
A list of available mods is displayed to the user, including the developers website.
After the user selects a mod, the file gets downloaded and extracted to a temporary directory.
A list of the mod files is created at lgsm/mods/modname-files.txt. This list allows the mod to be removed if required. LinuxGSM developers have whitelisted important customisable files such as mod config files that will not be removed. If there are any important files that have been missed please raise an issue.
Files and directories then get copied to the correct destination.
LinuxGSM updates a file containing a list of installed mods lgsm/mods/installed-mods.txt.
The list lgsm/mods/installed-mods.txt is used to identify which mods are installed. If a non-referenced mod is found, the updater will stop with an error.
Three update types are available
OVERWRITE will overwrite all mod files.
NOUPDATE will prevent this mod from being updated. Useful for a framework that is designed to be entirely customized.
RETAIN keeps the whitelisted files and updating everything else.
As there is no easy way to check for mod versions, the update process will update every single installed mod every time the command is run.
The process is pretty similar as the installation, mod gets downloaded, extracted, files get removed. Removed files go to a temp file list, then file list list built and temp file list added to it. Finaly the mod gets copied to destination using cp -Rf.
If an admin wants to overwrite custom files, then he can either uninstall/reinstall the mod, or just install over it.
A list of installed mods is displayed, user has to pick one to remove.
Any file listed in lgsm/mods/modname-files.txt gets removed.
The file list gets removed, as well as the entry in installed-mods.txt.
Any as long as the archive can be found online and the installation consists of extracting an archive to the serverfiles directory.
If there is a mod you wish to see supported by LinuxGSM please raise a GitHub issue with any relevant info about the mod.
If you wish to create a pull-request yourself for this, please make sure you read the "Developer" section at the bottom right of the wiki.
Usually, editing mods_list.sh should be enough to add mod support. This script contains comments helping you to understand how to use it.
Basically: Add an array variable containing mod info, then add the array to the global array.
Long explanation: The list is based on arrays, used to define all mod properties. You need to make sure that every value is filled up and in the correct order, that mod commands are unique and that multiple choices values are ended with a semicolon (;), otherwise the last value will be ignored.
You might need to add an entry in fn_mod_tidy_files_list from mods_core.sh in order to remove lines from mod's file list so that they do not get wrongly removed with the mods-remove command. For further assistance on developing this contact UltimateByte who developed those functions and dgibbs that reworked it should be able to help.
To automate LinuxGSM you can set scheduled tasks using cronjobs, to run any command at any given time.
Commonly used scheduled tasks are:
Automatically check for updates (update command)
Automatically check for server crash and restart if needed (monitor command)
Automatically keep LinuxGSM up to date (update-lgsm command)
Automatically restart the server at a given time (restart command)
Automatically update and restart the server (force-update command)
To access and edit your cronjobs use crontab.
crontab -eIt is possible to set up cronjobs as any user including root. The recommended way is to set up cronjobs using the game servers user account. However, If you run several game server installations on your server you may want to centrally manage cronjobs then using root.
* * * * * [/path/to/script] [command] > /dev/null 2>&1* * * * * su - username -c '[/path/to/script] [command]' > /dev/null 2>&1* * * * **/30 * * * *0 * * * *0 */2 * * *30 */2 * * *10 17 * * *0 1 * * * 30 1 */5 * *If you are not used to setting up cronjobs you can use crontab.guru as a great reference to get started.
Here is an example of a user based cronjob for a daily restart at 5 am.
0 5 * * * /home/username/gameserver restart > /dev/null 2>&1Here is an example of a root based cronjob for a daily restart at 5 am.
0 5 * * * su - username -c '/home/username/gameserver restart' > /dev/null 2>&1Here is an example of a user based cronjob to monitor your server every 5 minutes.
*/5 * * * * /home/username/gameserver monitor > /dev/null 2>&1Here is an example of a root based cronjob to monitor your server every 5 minutes.
*/5 * * * * su - username -c '/home/username/gameserver monitor' > /dev/null 2>&1Below is a recommended basic example and will do the following:
Monitor your server every 5 minutes.
Check for an update every 30 minutes, update and restart only if an update is detected.
Restart and check for an update every day at 4:30 AM
Update check and update LinuxGSM every Sunday at midnight.
*/5 * * * * /home/username/gameserver monitor > /dev/null 2>&1
*/30 * * * * /home/username/gameserver update > /dev/null 2>&1
30 4 * * * /home/username/gameserver force-update > /dev/null 2>&1
0 0 * * 0 /home/username/gameserver update-lgsm > /dev/null 2>&1Autorefresh can lag the server when certain Lua files are edited. This happens when the refreshing cascades. This can be unwanted behavior when editing the scripts of a large project on a live server.
To disable autorefresh, add -disableluarefresh to parms.
-disableluarefreshLoading screens are added by defining a website with sv_loadingurl, which is in gmodserver.cfg by default. This file overrides other files.
Links should not have http:// or an ending/ .
sv_loadingurl "www.website.com/loading/screen"Gamemode is changed by editing start parameters in the LinuxGSM config file.
TTT gamemode="terrortown"
Sandbox gamemode="sandbox"Other game modes like Zombie Survival can be found on the steam workshop.
Garry's Mod does not require an API/Auth Key anymore.
For Garry's Mod, add the collection ID in LinuxGSM config using wscollectionid setting. This will download the collection when the server starts.
wscollectionid="157384458"Some Garry's Mod addons like TTT use content from other games. To do this the content will need to be "mounted".
All source engine games should be mountable.
This guide is for installing another game server with LinuxGSM and using that content, copying that game's files, and mounting the game to Garry's Mod. This guide is for CS:S but should work for any other game.
First install a Counter-Strike: Source server, if you already have a server installed this step can be skipped. If the server will be deleted after copying files.
Install CS:S Server with LinuxGSM
Copy the cstrike the directory from the Counter-Strike: Source to the Gmod folder.
cp -R /home/cssserver/serverfiles/cstrike /home/gmodserver/serverfiles/cstrikeEnsure that the copied files are owned by the gmodserver user.
chown -R gmodserver /home/gmodserverOpen mount.cfg file.
nano /home/gmodserver/serverfiles/garrysmod/cfg/mount.cfgAdd game to mount.cfg
"mountcfg"
{
"cstrike" "/home/gmoduser/serverfiles/cstrike"
}Restart the server. Check if the mount was successful by changing the level to a mounted map with console or rcon.
changelevel cs_italyLinuxGSM Stats is an opt in voluntary feature that allows you to provide selected information about your game server to be displayed on linuxgsm.com by enabling the stats setting.
All data collected is used to provide insight into which game servers, distros, and servers are popular with game server admins. This will assist in prioritising LinuxGSM development and give me (Daniel Gibbs) a never before insight into the number of people using LinuxGSM. This is a massive personal motivator as it has previously been difficult to know how many people actually use LinuxGSM.
The collected data is publicly available to view in a dashboard on LinuxGSM.com
Below is a list of types of data collected
Game Server - Knowing the game server you are running gives insights into which servers are popular and can help shape development priorities.
Distro - It is useful to know which distros LinuxGSM is being used on to help focus development.
LinuxGSM Version - The currently installed version of LinuxGSM.
Alert Types - The alert types that have been turned on.
Gathering game server usage helps set the minimum required hardware for each game server. This is particularly useful for resource-intensive servers.
CPU Used - The CPU usage in MHz (rounded to the nearest 100MHz) of the game server.
RAM Used - The memory usage in MB (rounded to the nearest 100MB) of the game server.
Disk Used - The storage taken by the game server (serverfiles directory) of the game server.
Gathering information on the server hardware being used to host a Game Server. This provides useful stats on the sorts of hardware game server admins are deciding to use.
CPU - Gathers the CPU Manufacturer and Model.
RAM - Total server RAM.
Disk Space - Total server disk space.
The country of origin is shown identifying where in the world LinuxGSM is being used.
The country of origin is no longer working with GA-4 but might be available again in the future
LinuxGSM Stats uses Google Analytics (GA-4) event-driven API to collect information to allow Daniel Gibbs to get an idea of which game servers and distros are popular identify system requirements for game servers and know the sort of servers game server admins are using.
Short answer - Yes
Long answer - All information gathered is anonymous, the server IP address, hostname, etc., or other identifying information is not collected. When LinuxGSM Stats is first run it creates a UUID (Unique identifier) which is a randomly generated ID to allow Google Analytics to identify your unique information anonymously. Since this ID is random there is no way to know where the info is from, only that it is from the same sender.
The UUID is located inlgsm/data/uuid.txt,if this file is deleted a new UUID will be generated.
Since LinuxGSM is open-source you can also see how the data is gathered by looking at the info_stats.sh file.
Data is sent every time the monitor runs as this is the only way to regularly send data.
To enable LinuxGSM Stats simply add the stats="on" setting to the common.cfg file. This can also be enabled on install.
Don't Starve Together server requires an Authentication Token.
Go to the Klei website https://accounts.klei.com.
After logging into your account visit this page to get your game server authentication token.
Enter a friendly name for your server and copy the access token and paste it into the file cluster_token.txt.
You can quickly do this by running the following command, replacing [AUTHTOKEN] with your authentication token.
echo '[AUTHTOKEN]' > ~/.klei/DoNotStarveTogether/[CLUSTER]/cluster_token.txtA Don't Starve Together server consists of clusters and shards.
One cluster can contain multiple shards. A shard is simply a map/level. Multiple shards are connected by cave entrances/exits found on the map. These are functioning as portals to allow players to travel between actual game servers.
By default, the cluster will be single-sharded. So you only need one server but you will also only have one map.
Default start parameter setting:
sharding="false"Take a look at Multiple-Servers to get a general idea of how to create multiple game servers.
There are two types of shards:
master shard: the shard you enter when joining the server / the shard/server you have to join (one per cluster)
slave shard: shard that will connect to the master (arbitrary number per cluster)
In this example, we will only use two shards, one overworld shard and one cave shard, on the same machine using the same installation. If you want to use more shards or run the shards on different machines, take a look at the guides mentioned at the bottom. First of all we need two scripts:
./dstserver-1
./dstserver-2dstserver-1 will be the master shard with an overworld as level.
## Predefined Parameters
sharding="true"
master="true"
shard="Master"
cluster="Cluster_1"
cave="false"~/.klei/DoNotStarveTogether/Cluster_1/Master/server.ini
[NETWORK]
server_port = 11000
[STEAM]
authentication_port = 8768
master_server_port = 27018dstserver-2 (this will be the slave shard with a cave as level):
## Predefined Parameters
sharding="true"
master="false"
shard="Caves"
cluster="Cluster_1"
cave="true"~/.klei/DoNotStarveTogether/Cluster_1/Caves/server.ini
[NETWORK]
server_port = 11001
[STEAM]
authentication_port = 8769
master_server_port = 27019If you want to Caves and Overworld to display on the same server, you also to change the cluster.ini, otherwise it will run two instances, one with the Overworld and another with the Caves:
~/.klei/DoNotStarveTogether/Cluster_1/cluster.ini
[SHARD]
shard_enabled = trueSet all installation variables BEFORE running the ./dstserver-[1,2] install commands. Feel free to change these settings but make sure that you set them to the same clusters. You also should not change them afterwards.
For clarity it is recommended recommend naming the master shard Master.
Lastly you have to start both servers. The order does not matter because the slave server will auto-retry connecting to the master server which is listening.
A firewall is a security device that blocks or allows network traffic on to a system or network to prevent unauthorised access and help protect from malicious attack. Firewalls can also assist in rate limiting traffic to prevent too much traffic being sent to a system. This is useful for game servers to help prevent a DDoS (Distributed Denial-of-Service) attack that can overwhelm a game server.
Firewalls can be physical hardware devices that sit on a network, or software that sits on a server or desktop device. This page will focus mainly on software firewalls.
A distributed denial-of-service (DDoS) attack occurs when multiple systems flood the bandwidth or resources of a targeted system, usually one or more web servers. Such an attack is often the result of multiple compromised systems (for example, a botnet) flooding the targeted system with traffic. A botnet is a network of zombie computers programmed to receive commands without the owners' knowledge. Server providers may offer DDoS protection, such as Arbor, that will mitigate such attacks before it reaches a server. However, this feature is often provided as a premium feature meaning often only available on more expensive servers. Some providers may also provide sub-standard protection that may incorrectly filter traffic. So be aware of what protection if a server provider has to protect your server.
iptables is the most commonly used and supported Linux firewall utility, with many other tools interfacing with it To see iptables rules: iptables -L To flush (erase) iptables rules: iptables -F
One way to protect a game server is to rate-limit incoming connections to the game server. Iptables will do this by dropping packets from a connection if it is sending too much traffic. This is particularly important if using the LinuxGSM monitor feature, as monitor relies on the query port being available. Should the query port be flooded with traffic it may become unavailable and LinuxGSM will assume the game server has crashed and reboot. The below example will rate-limit traffic on port 27015 (the default for source engine games) to 10 requests every 60 seconds. Different game servers may require different rate limits, so it may be important to adjust the limits to ensure legitimate traffic does not get blocked.
iptables -A INPUT -p udp -m udp --dport 27015 -m state --state NEW -m recent --set --name DEFAULT --rsource
iptables -A INPUT -p udp -m udp --dport 27015 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 --name DEFAULT --rsource -j DROPOnce you have created your port forwards and want to see if the internet can access the ports, there is a website called canyouseeme.org. Simply change the port to your game port (27015 for example) and it will tell you if it can access it on your computer. This will help you verify your port forward was created successfully.
Some game servers (like Rust) register their external IP with steam when they startup. When you create port forwards to the game server, you need to make sure the port forward is on the address the outbound traffic is on. For example, say you have a router with two IPs from different ISPs;
[eth0] 192.168.1.1 (LAN)
| |
-----------------
| | --[WAN0] 71.2.5.23 (ISP A)
| | --[WAN1] 65.13.29.46 (ISP B)
------------------If your traffic is going out WAN0 you need to put the port forwards on the 71.2.5.23 address. If your outbound traffic is going out WAN1 you would need to put your port forwards on 65.13.29.46.
Make apache2 webserver case insensitive with apache2 mod_speling
Some games require FastDL to be case insensitive, apache2 is case sensitive by default. Enabling apache2 mod_speling ignores case sensitivity on a LAMP stack. This guide applies to debian and ubuntu. At the bottom of this page are external guides that include CentOS/Fedora. This workaround will not work on shared webhosting where editing apache2 files is not available.
Enable mod_speling:
a2enmod spelingRestart apache:
service apache2 restartApache needs to be told which directories mod_speling is applied to, open the webserver's .conf file located inside /etc/apache2/sites-available/ and set AllowOverride to All.