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.
Commands
Standard: ./gameserver debug
Short: ./gameserver d
To exit debug mode use CTRL+c
force-update
This is a command for game servers using SteamCMD only.
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.
Commands
Standard: ./gameserver force-update
Short: ./gameserver fu
map-compressor
The map-compressor command is used to compress maps for some Unreal engine servers, allowing for faster maps downloads to clients.
change-password resets the TeamSpeak 3 server query password. The server will reboot and a new password will be generated.
The password is given on server installation. Passwords can also be found in the logs.
Supported Servers
TeamSpeak 3
Commands
Standard: ./gameserver change-password
Short: ./gameserver pw
Trackmania Nations Forever / Trackmania United Forever
Networking
test-alert
The test-alert command is used to send a test alert that is used to ensure that configured alerts are functioning and being recieved.
Commands
Standard: ./gameserver test-alert
Short: ./gameserver ta
The Front [WIP]
Dependencies
ANSI Colors
Message Display Time
Features
console
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.
Some game servers provide a verbose output in console.
Some game servers can be managed from the console.
Commands
Run the following command to access console:
Standard: ./gameserver console
Short: ./gameserver c
Answer y at the prompt.
Exiting the console
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 session, stopping the game server.
skeleton
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.
Commands
Standard: ./gameserver skeleton
Short: ./gameserver sk
Skeleton Directory
The skeleton directory is created in skel.
Use Case
Skeleton can be used alongside version control software like 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.
7 Days to Die uses telnet to admin the server. This is enabled by default with no password however will only listen on localhost.
Discord
Discord 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.
Create a Discord Webhook
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)
You must have Discord User Settings > Text & Images > Link Preview: 'Show website preview...' enabled or you will just see blank messages from the alert bot.
start-stop-restart
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.
Commands
update
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.
Commands
Standard: ./gameserver update
validate
This is a command for game servers using only.
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.
update-lgsm
The update-lgsm command updates LinuxGSM to the latest version.
It will automatically update LinuxGSM including the _default.cfg config file to make sure the game server gets the latest settings.
It is a good idea to regularly update LinuxGSM to receive new features and bug fixes.
Multi Theft Auto
Server Information
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
Sven Co-op
Information for Sven Co-op servers
Server Resources
Official Resources
Valheim
Server Resources
Alerts
LinuxGSM allows alerts to be received using various methods, should the game server require your attention.
Alert Settings
Alert settings can be changed in
Pushbullet
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.
Enable Pushbullet alerts
To enable Pushbullet alerts an Access Token needs to be generated. Access Tokens are available from Pushbullet setting found .
IFTTT
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.
Setup IFTTT Webhook
To enable IFTTT you will need to setup a Webhooks integration.
Pushover
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.
Setup Pushover Alerts
A Pushover application and your user key is required to send messages to Pushover.
Visit
tmux
LinuxGSM uses to run servers in the background so the server instance is not terminated when you close a terminal session.
LinuxGSM requires tmux => 1.6
Tmux is a key component of LinuxGSM and replaced 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
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.
Direct connect to a Valheim Server
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.
Long Server Names
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.
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.
Will start the server in a tmux session allowing the server to run in the background.
./gameserver start
Stopping a server
Stop will attempt a graceful shutdown of a game server. Failing this stop will kill the tmux session.
./gameserver stop
Stop only if empty (optional)
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.
Restarting a server
Will simply stop, and then start the server.
./gameserver restart
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.
Automatic update
Update on start
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.
Scheduled updates
A cronjob 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.
The extra su - username -c indicates which user to run the script as.
It is recommended to check for updates once per hour.
crontab.guru is a great resource to generate cronjobs.
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.
Display IP
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="".
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
displayip=""
Resources
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.
The discord contains information for Sven Co-op under the information tab including mapping guides, server config information, and angelscript documentation, among other things.
Once you have created a token insert it in to you LinuxGSM config.
Enable Channels
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.
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 LinuxGSM config.
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.
Known Issues
Tmux 1.8
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
create session failed: Operation not permitted
This issue normally occuires with CentOS and is caused by the standard user not having permissions to user /dev/ptmx.
To fix this the user needs to be part of the tty group.
To confirm the user has been added check /etc/group.
Upgrade tmux CentOS 7 using Ghettoforge
If 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.
Install tmux using the Ghettoforge repo.
Once installed restart the server to complete the upgrade.
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 or 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 .
monitor
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.
Commands
Standard: ./gameserver monitor
Short: ./gameserver m
How does monitor work?
Monitor first checks that the server process or session is running. If it is, it will then attempt to query the server using or . 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.
Automated Monitoring
Monitor is designed to be and automated task, using to allow a game server to be frequently checked.
As a reminder, you can edit your cronjobs, typing :
Monitor Cronjob
Use these cron examples to setup automated monitoring.
Replace the username and gameserver according to your requirements.
A user based cronjob to monitor your server every 5 minutes .
A root user based cronjob to monitor your server every 5 minutes .
To learn more about automation, see .
Alert Notifications
To be notified when a server fails alert notifications can be setup , see .
Query Delay
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 Activation
Starting and stopping the game server activates and deactivates monitor. This prevents the server being manually stopped only to be started again by monitor.
check-update
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.
Commands
Standard: ./gameserver check-update
Short: ./gameserver cu
Unlike the 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.
Automatic check for update
Scheduled check for updates
A can be set to run check-update at any given time.
Ensure that an 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.
Here is an example of a root-based cronjob to check for an update once an hour.
The extra su - username -c indicates which user to run the script as.
is a great resource to generate cronjobs.
details
The details command allows access to various useful information about the game server. Details are gathered from configs, parameters and server queries.
Commands
details
Standard: ./gameserver details
Short: ./gameserver dt
postdetails
postdetails (using hastebin) is used to share server details, to help with support, while hiding sensitive information:
Standard: ./gameserver postdetails
Short: ./gameserver pd
Details Provided
Various relevant details are provided including:
Distro Details
Performance
Disk usage
Server Name
Example output
Killing Floor 2
Ports
Game 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.
Resources
Server Config Information
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.
Workshop
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.
This 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.
Minecraft: Java Edition
Java Requirements
Minecraft: Java Edition required Java 16
Release Settings
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.
Email
A Linux server's own email solution can be used to receive alerts about LinuxGSM.
Sending emails
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.
Enable Email alerts
To enable email alerts you will need to add an email address to the .
jq
jq allows LinuxGSM to filter json files to extract specific useful data.
Distro
Version
Ubuntu LTS 16.04
1.4
Ubuntu LTS 18.04
1.5
Debian 8
1.4
Log Management
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:
game, is a redirect to the game server log files if available.
Settings
You can alter these settings to change LinuxGSM behavior:
Note:logdays="0"means logs will be removed if older than 24h.
Log clearing
LinuxGSM clears outdated logs according to logdays variable setting. This will affect script and console logs, as well as common game logs.
Gamelogs management
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
Note:${systemdir}designates the location of your game server installation
Branch
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.
Find Branches
A list of all available branches for a game server are listed on SteamDB under the appid depots.
Select a Branch
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 .
Beta Password
Some branches require a password. This can be done by entering a password in thebetapassword setting in your .
Rocket.Chat
Rocket.chat is an open-source collaboration tool.
Create a Rocket.chat Webhook
Follow the on how to create an incoming webhook.
Copy the Webhook URL.
Turn on Rocket.chat alerts and copy the URL into the . (~/lgsm/config-lgsm/<gameserver>/common.cfg)
Game Server Config
and Game Server Configs are different. One is the config for LinuxGSM itself and the other is for the game server instance.
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.
cronjobs
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
Automatically check for server crash and restart if needed
Running on Boot
Using systemd
systemd is the default init system for most modern distros.
You need to create a service file in /etc/systemd/system/
Example ts3server.service
LinuxGSM Stats
is an opt in voluntary feature that allows you to provide selected information about your game server to be displayed on by enabling the stats setting.
How is the information used?
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.
Game Servers
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:
Dont Starve Together
Authentication Token
Don't Starve Together server requires an Authentication Token.
Go to the Klei website .
Garry's Mod
Game Resources
Auto Refresh
Insurgency: SandStorm
Custom Mods and Maps
Custom Mods and Maps are supported in Insurgency: Sandstorm via . Please use this basic guide to get started using custom mods more in-depth information can be found at
Unreal Tournament 2004
Server Files
LinuxGSM uses the most recent version of UT2K4 server available for Linux.
v3369.3
This includes the various map packs such as the UT2004 Mega Pack.
glibc
Summary
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 .
Slack
is a cloud-based set of proprietary team collaboration software tools and online services.
Create a Slack Webhook
A webhook is required to post alerts to a slack.
Source Engine
Default ports
Both Source engine and GoldSrc engine use the following ports by default.
Game Port: 27015
LAN Discovery
Many admins who have tried, reported a local server does not appear on the LAN tab in the steam browser.
Workarounds
ftp-scp
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.
SFTP Advantages
Encrypted
Steam Master Server
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.
Master Server Check
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.
Symlinking and ln command
Symlinks create multiple paths to a file or directory and are useful for saving space or having 1 set of files for multiple installs.
Using Symlinks to Save Storage Space
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.
Sourcemod and Metamod:Source
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 Resources
//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
Compatible with the popular clients such as Filezilla and WinSCP
You can login to any SSH accessable Linux user.
How to use SFTP
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.
Bad practice to avoid
By all means, you should never
Connect to a server as root.
Use FTP if SFTP is available.
Root login to an FTP
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 ?
Example guide using two "one server + one user" installs with Sven Co-op:
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.
The collected data is publicly available to view in a dashboard on LinuxGSM.com
What information is collected?
Below is a list of types of data collected
Basic Info
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.
Game Server Usage
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.
Server Hardware
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.
Country of origin
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
How is Information collected?
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.
Is my data anonymous?
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.
How frequently is the data sent?
Data is sent every time the monitor runs as this is the only way to regularly send data.
How can I enable this feature?
To enable LinuxGSM Stats simply add the stats="on" setting to the common.cfg file. This can also be enabled on install.
It 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.
User cronjob
Root cronjob
Cronjob Timing Examples
Every single minute
Every 30 minutes
Every hour
Every two hours
Every two hours at 30 minutes past the hour
Every day at 5:10 PM
Every Wednesday at 1 AM
Every Five Days at 1 AM
Cronjob Generator
If you are not used to setting up cronjobs you can use crontab.guru as a great reference to get started.
LinuxGSM Cronjobs examples
Replace username and gameserver with your own details.
Daily cronjob
Here is an example of a user based cronjob for a daily restart at 5 am.
Here is an example of a root based cronjob for a daily restart at 5 am.
Every X Time cronjobs
Here is an example of a user based cronjob to monitor your server every 5 minutes.
Here is an example of a root based cronjob to monitor your server every 5 minutes.
Complete Example
Below 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.
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
Crontab
The crontab will allow you to create cronjobs 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.
Most admins will also have a timed monitor cronjob configured. If you do not want to have extra cronjobs the timed monitor will also start a server but with a timed delay.
Using monitor command
After a reboot, any game server that has a "started" status will be started on boot. Servers that were manually stopped will remain stopped.
rc.local is another method to run scripts on boot. Any commands added to the rc.local file will run on boot.
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.
Clusters and Shards
A 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.
Each shard (level of the world) has to be run as an individual game server instance.
Single-Shard
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:
Multi-Shard
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:
Server #1
dstserver-1 will be the master shard with an overworld as level.
If 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
Set all installation variables BEFORE running the./dstserver-[1,2] installcommands. 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.
Autorefresh 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.
Loading Screen
Loading 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/ .
Gamemode
Gamemode is changed by editing start parameters in the LinuxGSM config file.
Other game modes like Zombie Survival can be found on the steam workshop.
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.
Mounting Game Content
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.
There are multiple ways to potentially mount content. The below example is just one example
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.
[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.target
systemctl 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
The details command will provide you with some config file information. However, some servers do use multiple config files.
Command
./gameserver details
Sample output example
LinuxGSM Custom Config's
Whenever 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.
Config file naming
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.
Example
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.
Missing configuration file handling
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.
Where are the settings I'm looking for?
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.
I found missing settings or an error with config files?
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.
This guide will show you how to install the custom map TORO as an example
Get an Auth Token
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.
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
You can also specify your ownMods.txt file using ModList=MyCustomModList.txt or adding the mod id's to your start parameters using -CmdModList="mod1,mod2,mod3"
In 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.
mod ID: 94277
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.
If you want the custom map to be the default edit your start parameters
Once the server is restarted the custom map should be available on your game server.
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.
Changing port using Docker or firewall
Changing port using the start parameters
Console Command
Connect using the console command.
If the port is 27015, then you can just use : connect IP
Add server to favourites
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 Troubleshooting first.
Fix
As this github issue 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.
Change ip="0.0.0.0" to an actual interface IP, for example ip="192.168.1.10" ; this will allow LinuxGSM to monitor 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
LAN Discovery
You can check that your server is listed on the master server by using ./gameserver details
Not all game servers support this option but if it does the setting is set to true by default.
Troubleshooting: Server Missing from Master Server List
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.
Also known as Command-Line Parameters, Command line arguments, or Launch Parameters.
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 .
Predefined Parameters
LinuxGSM often uses predefined parameters that can be edited. This makes adjusting common settings easier and allows them to be displayed in ./gameserver details.
Additional Parameters
Additional command-line parameters can be added to the startparameters setting.
Anything added will be appended to the server executable binary.
Basic Example
Full Example
Parameters reference
7 Days to Die
Gold Source Servers
install
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
Commands
Standard Install
The standard installation is the default installation method that requires user interaction.
Standard: ./gameserver install
Short: ./gameserver i
Auto Install
Auto install is useful for automatic server deployments as no user prompt is required.
Standard: ./gameserver auto-install
Short: ./gameserver ai
Installation
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.
Install Dependencies
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.
Dependencies as root
As root run ./gameserver install and the installer will complete a dependency installation only, ignoring the other installation steps.
Dependencies as sudo user
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.
Common Installation Issues
User Permission Issues
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
Poor Network Connection to Steam servers
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.
Not Enough Storage
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
DNS Issue
Make sure you can ping using a hostname.
Should this fail, your server may not have DNS lookup correctly configured.
fastdl
FastDL (Fast Download) allows the client to download custom server content (maps, materials, models, particles, sounds, fonts, images) from a web server.
It is used to offload content downloads to a web server instead of relying on source servers (SRCDS) that only allows 20KBps downloads to clients. Content on the web server can be compressed to further speed up the download process. This means that custom content downloads much faster.
Valve now use steam workshop for most custom content however FastDL is still required in some cases.
LinuxGSM FastDL automatically creates the web directories and compresses the content for you.
Supported Servers
All Source engine servers
Commands
Standard: ./gameserver fastdl
Short: ./gameserver fd
Supported file formats
Maps (.bsp)
Materials (.vtf, .vmt, .png, .svg)
Models (.vtx, .vvd, .mdl, .phy)
Particles (.pcf)
Requirements
Web server on the game server (Apache/Nginx).
or
Access to a remote web server.
Usage
Generate Compressed files
Run the FastDL command on your main LinuxGSM script. This will create a new directory /home/gameserver/public_html/fastdl
./gameserver fastdl
Create A virtual Host (local Apache web server)
If Apache2 is being used a virtual host pointing to the newly created public_html directory can be used.
Tip: Apache2 mod "userdir" is useful if the Linux server is hosting , as it creates a url for the current user http://yourwebsite.ltd/~username.
Tutorial on setup of Apache2 server with Virtual Hosts
Here is an example of setting up Apache2 using a subdomain.
This works for Apache 2.4+ and when using a domain name. If you have got a different configuration, refer to the Apache2 documentation.
Firstly make sure your subdomain redirects to your game server and that Apache2 is correctly installed and started. Create a virtual host in order to be able to host a website :
See the example below and edit the relevent details.
Enable your website by restarting Apache2
Test the domain, to make sure it is working http://subdomain.domain.com/fastdl
Edit Game Server config
The new url will need to be added to the
nano serverfiles/gamename/cfg/game-server.cfg
Make sure you have this:
Re-generate FastDL
If the custom server content is updated or removed re running the fastdl command is required to ensure that the webserver is in sync with the game server.
Note for addons developers : Note that clients won't download a file that they already downloaded unless you rename it.
Bzip2 Compression
Custom server content can be compressed using bzip2 which is supported by source games, allowing clients downloads will be faster. It is a must-have if you're hosting large files, as it will save you bandwidth, and speed up downloads for clients. However, using bzip2 on many small files can slow down client loading times.
Garry's Mod Download enforcer
In order for a client to download files from a FastDL in Garry's Mod, the developer of an addon must put files from the addon into lua code resource.Addfile ( "/path/to/file.ext" ). However, some addon developers do not do this. In order for clients to download the required files, an lua file needs to be generated for it to work, which is what the lua enforcer feature does. The only downside is that clients may download files that are not required on the server.
Call of Duty 4
Call of Duty 4 Server Files
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.
CoD4x
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.
Updating CoD4x
CoD4x has its own update functionality. It will automatically check for updates and does not require LinuxGSM to check for updates.
CoD4x Master Server
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.
server.cfg
command-line parameters
The server then needs to be restarted to allow the game server to be listed.
Mod Support
Mods for Call of Duty 4 have to be manually added to the game server.
Adding Mods
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.
Custom Maps
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
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.
Fast Download
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:
Workshop
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.
Supported Games Servers
This is a list of game servers that are known to support Workshop
Ark: Survival Evolved
ARMA 3
Day of Infamy
Steam Web API Key/Auth Key
Some game servers require a Steam API key to access Workshop content. To get this key visit the and follow the instructions.
Do not share your private API key.
Items and Collections
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.
Get an Item or Collection ID
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.
Create a Collection
Creating 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.
Server Configurations
Make Webserver Case Insensitive
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 webhostingwhere editing apache2 files is not available.
Enable mod_speling:
a2enmod speling
Restart apache:
service apache2 restart
Apache 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.