Excellent software and practical tutorials
How to build a CSGO server "Counter-Strike: Global Offensive" server construction
Build CSGOserver,"Counter-Strike:Global OffensiveCSGO is a first-person shooter game developed by Valve and Midao Entertainment. The game can be run on platforms such as Microsoft Windows and macOS, PlayStation 3 and Xbox 360. Download and install SteamCMD to build a private CSGO Servers!
Below is an overview of the basics of setting up and running a dedicated server for Counter-Strike: Global Offensive.
Download CSGO Server
How to update CSGO servers. These steps need to be performed every time the game is updated. To automate this step in the future, see:Automating Steam.
Download and install SteamCMD
CSGO Server Steam Console Client(SteamCMD) is a command-line version of the Steam client. Its main purpose is to install and update the various available dedicated servers on a command-line interface Steam client. It is suitable for users SteamPipe Content distribution system games. All games have been moved from old Half-Life Dedicated Server Update ToolMigrated to SteamCMD.
Windows
1. Create a folder for SteamCMD.
C:\steamcmd
2. Download SteamCMD for Windows:https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip
3. Extract the files in the zip file to a folder.
Linux
Create a user account called steam to run SteamCMD securely and isolate it from the rest of the operating system. Do not run steamcmd while logged in as root - doing so is a security risk.
1. Create a steam user as root:
useradd -m steam
2. Enter its main folder:
cd /home/steam
Installing packages from the repository
1. It is recommended to install the SteamCMD package from your distribution's repository (if available):
Ubuntu/Debian
sudo apt install steamcmd
Note.png Note: If you are using a 64-bit computer, you will need to add multiverse
sudo add-apt-repository multiverse sudo dpkg --add-architecture i386 sudo apt update sudo apt install lib32gcc1 steamcmd
RedHat/CentOS
yum install steamcmd
Arch Linux
git clone https://aur.archlinux.org/steamcmd.git cd steamcmd makepkg -si
2. Link the steamcmd executable:
ln -s /usr/games/steamcmd steamcmd
Docker
If your server is running Docker, you can simply use:
docker run -it --name=steamcmd cm2network/steamcmd bash
steamcmd.sh location: /home/steam/steamcmd
This image can be used as a base image for a Steam-based dedicated server. For example: https://hub.docker.com/r/cm2network/csgo/
You can find the relevant Docker Hub page here: https://hub.docker.com/r/cm2network/steamcmd/
Manual Installation
1. Before you begin, you must install the dependencies required to run SteamCMD:
Ubuntu/Debian 64-Bit
sudo apt-get install lib32gcc1
RedHat/CentOS
yum install glibc libstdc++
RedHat/CentOS 64-Bit
yum install glibc.i686 libstdc++.i686
2. Upgrade to steam user as root user:
su-steam
If you are not logged in as root, but are using sudo to exercise administrative privileges, escalate to the steam user as follows:
sudo -iu steam
3. Create a directory for SteamCMD and change into it.
mkdir ~/Steam && cd ~/Steam
4. Download and unzip SteamCMD for Linux.
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
Mainland China users can use the following command to use the mainland node:
curl -sqL "https://media.st.dl.bscstorage.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
5. Install tmux and/or screen to simplify server management
sudo apt-get install tmux screen -y;
macOS
1. Open a terminal and create a directory for SteamCMD.
mkdir ~/steamcmd && cd ~/steamcmd
2. Download and unzip SteamCMD for macOS.
curl -sqL ' https://steamcdn-a.akamaihd.net/client/installer/steamcmd_osx.tar.gz ' | tar zxvf -
Mainland China users can use the following command to use the mainland node:
curl -sqL ' https://media.st.dl.bscstorage.net/client/installer/steamcmd_osx.tar.gz ' | tar zxvf -
CSGO server running SteamCMD
The first time you run SteamCMD it will automatically update and display aSteam>
Input prompt.help
for more information.
Windows
Open a command line window and launch SteamCMD.
cd C:\steamcmd steamcmd
Linux/macOS
Open a terminal and launch SteamCMD.
If you installed via a package from the repository:
cd ~ steamcmd
If you installed manually:
cd ~/Steam ./steamcmd.sh
CSGO Servers Log in to SteamCMD
Anonymous login
When downloading most game servers, you can choose to log in anonymously.
login anonymous
Log in with your Steam account
Some servers require you to log in with a Steam account.
For security reasons, it is recommended that you create a Steam account dedicated to the server.
A user can only be logged in to one place at a time (either in the GUI client or in SteamCMD).
login <用户名>
Next please enter your password.
If Steam Guard is already activated on the user account, check your email for the Steam Guard verification code and enter it. This is only needed the first time you log in (and if you have deleted the file SteamCMD uses to store your login information).
If you have successfully logged into your account, you should see a message.
Download an app
1. Open SteamCMD and log in to it.
2. Set your application installation directory (Note: use forward slashes in Linux/macOS)/
, use backslash on Windows\
).
force_install_dir <路径>
For example, a person namedcsgo_ds
Directories under the current directory:
force_install_dir ./csgo_ds/
On Windows : force_install_dir .\csgo_ds\
3. Install or update application usageapp_update
Command (provided hereSteam App ID). To verify the application at the same time, you need to addvalidate
To download the testing branch, use-beta <beta name>
Options – For example,Half-Life Dedicated ServersThe test branch is namedbeta
as well asOrigin Dedicated ServersThe test branch is namedprerelease
Some testing branches have passwords set; if you want to download from them, you need to add-betapassword <password>
options.
app_update <应用ID> [-beta <测试名称>] [-betapassword <密码>] [validate]
Half-Life Dedicated Serversis a special case: the application ID is 90, and the module must be selected first. This is done by setting the configuration optionmod
To request variables.
app_set_config <应用 ID> <选项名称> <变量选项>
Example: To install and verify a Counter-Strike: Global Offensive dedicated server:
app_update 740 validate
Example: To install and verify a Team Fortress dedicated server:
app_set_config 90 mod tfc app_update 90 validate

app_update
command to install all the required files. Just runapp_update 90 validate
Repeat this process until there are no more updates.For example: Install and verify the test versionHalf-Life Dedicated Server (Half-Life):
app_update 90 -beta beta validate
Example: To install and verify a test version of the Counter-Strike: Source dedicated server:
app_update 232330-beta prerelease validate
For example: Install and verify the private test version of Natural Selection 2 dedicated server (test namealpha
, test passwordnatsel
):
[test name] is the name of the private testing branch
[test password] is the password for the private testing branch
app_update 4940 -beta alpha -betapassword natsel validate
3. Once completed, enterquit
This will properly log you out of the Steam server.
quit
verify
validate
Verify is a command that checks all files on the server to make sure they match what SteamCMD should download locally. This is useful if you think a file may be missing or corrupted.

mapcycle.txt
, this file will be overwritten to the server's default value. Any files that are not part of the default installation will not be affected.It is recommended that you use this command only during initial installation or if there is a problem on the server side.
Supported Servers
Known servers that can be installed using SteamCMD can be found atDedicated Server ListPage query. Note that the additional commands must be executed before app_update.
CSGO Servers Automating SteamCMD
There are two ways to automate SteamCMD. (Use./steamcmd.sh
To replacesteamcmd
. )
Command Line
When using the command line-beta
option, it must be quoted in a special way, such as+app_update "90 -beta beta"
.
If this doesn't work try replacing it with"+app_update 90 -beta beta"
replace.
To append a command to the command line, add a plus sign in front of it, for example:
steamcmd +login anonymous +force_install_dir ./csgo_ds +app_update 740 +quit
To install a specific game mod for Half-Life, such as Counter-Strike: Zero Hour:
steamcmd +login anonymous +force_install_dir ./czero +app_set_config 90 mod czero +app_update 90 +quit
To install a game that requires logging in, like Killing Floor:
steamcmd +login <用户名> <密码> +force_install_dir .\KFServer\ +app_update 215350 +quit
Creating a Script
It is recommended to use UTF-8 encoding to save text files.
1. Place your SteamCMD commands in a text file. (You can add comments by adding//
.)For example:
// Update Counter-Strike: Global Offensive dedicated server // @ShutdownOnFailedCommand 1 // If you update multiple servers at a time, please set it to 0 @NoPromptForPassword 1 login//Some servers do not require login//login anonymous force_install_dir ./csgo_ds app_update 740 validate quit
2. With+runscript
Run SteamCMD with the -i option, pointing to the file you created earlier. For example:
steamcmd +runscript csgo_ds.txt
CSGO Servers Cross-platform installation
It can choose to download files that SteamCMD should download for other platforms, even if it is not the platform currently running. This is done using@sSteamCmdForcePlatformType
variables (yes, there are two "s" at the beginning of the variable name.) For example, to download the Windows version of Counter-Strike: Global Offensive dedicated server on Linux, you can run the following command:
./steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir ../csgo_ds +app_update 740 validate +quit
Or use the following script:
@ShutdownOnFailedCommand 1 @NoPromptForPassword 1 @sSteamCmdForcePlatformType windows login anonymous force_install_dir ../csgo_ds app_update 740 validate quit
This variable supportswindows
,macOS
andlinux
.
Windows Software/Scripts
condenser
condenser is a bootloader for downloading, configuring and launching the Steam dedicated server application.
SteamCMD AutoUpdater
Install and automatically update any game server
GitHub repository: https://github.com/C0nw0nk/SteamCMD-AutoUpdate-Any-Gameserver
SteamCMD GUI
This tool allows users to use SteamCMD on Windows without using the command line or batch files.
GitHub Repository: https://github.com/DioJoestar/SteamCMD-GUI
SteamCMD Guardian 1.2
View and download here:http://pastebin.com/BRUbsGQh
CSGO server starts SteamCMD
Set your CS:GO dedicated server installation path when you see the Steam> prompt.
Example code:
Windows operating system
force_install_dir c:\csgo-ds\ force_install_dir .\csgo-ds\
Linux operating system
force_install_dir /full/path/to/csgo-ds/
Install or upgrade CS:GO
If you are installing for the first time or need to check the integrity of the server files:
app_update 740 validate
If you are only updating an existing server:
app_update 740
Once the installation is complete, exit Steam by typing quit at the Steam> prompt.
Registering a server login token
If your server does not use a server login token (GSLT) to log in to a permanent game server account, your CS:GO game server and GOTV viewing system will only allow clients within the same LAN to connect with RFC 1918 IP addresses.
RFC 1918 refers to private network address allocation, and the IP address ranges included are:
10.0.0.0-10.255.255.255 172.16.0.0-172.31.255.255 192.168.0.0-192.168.255.25
If your server has a public IP address and clients need to access the server from the Internet, you need to register a server login token (GSLT).
The process of registering for a GSLT is very simple, please visit this website and follow the prompts to register: https://steamcommunity.com/dev/managegameservers (Don't worry, a qualified account is allowed to register 1,000 server tokens)
Each GSLT is only allowed on one instance of a game server. This means if you have multiple CS:GO servers, you will need to generate a unique token for each one.
The token is set when starting the server by adding +sv_setsteamaccount to the command line <十六进制令牌> You can also verify the uniqueness of the token by adding -net_port_try 1 to the command.
By the way, all public servers that use token login must strictly follow our server operation guidelines: https://blog.counter-strike.net/index.php/server_guidelines/
Start the server
- For information on port forwarding, see: SRCDS page;
- In Linux operating system, please replace the first srcds in the following code with ./srcds_run;
- If it is a public server, you also need to add +sv_setsteamaccount <十六进制服务器令牌> -net_port_try 1 command to use GSLT (Game Server Login Token).
Casual Mode
srcds -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2
Competitive Mode
srcds -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2
Arms race mode
srcds -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace +map ar_shoots
Blast Mode
srcds -game csgo -console -usercon +game_type 1 +game_mode 1 +mapgroup mg_demolition +map de_lake
Deathmatch Mode
srcds -game csgo -console -usercon +game_type 1 +game_mode 2 +mapgroup mg_allclassic +map de_dust
Only common game modes are listed here, please refer to the gamemodes.txt file for a full list of game modes
CSGOSL A cross-platform CSGO graphical interface
csgosl is a graphical user interface for Counter Strike Global Offensive dedicated servers (CSGO servers from now on). csgosl supports one-click installation, updating, starting and stopping of servers on Windows and Linux platforms (supported platforms). If you just want to get your own CSGO server up and running right away, this is the place for you. csgosl supports most major server options. For advanced users, exiting advanced mode provides support for almost all settings.
csgosl Features:
- Fully automated installation (steamcmd + srcds + metamod/sourcemod/plugins)
- Server updates, automatic or manual
- Start/Monitor/Stop Server
- Host LAN or public servers only
- Conduct workshops on maps and map groups
- Manage all your maps and create your own map sets with the Map Set Editor
- Easily view and select all installed maps using map preview
- Greatly simplifies server setup using sensible defaults
- Advanced settings mode for control freaks (supports all cvars with application help text)
- Override settings for all game modes/types in one place
- Easily access online help from within the app
- Pre-installed sourcemod, metamod and some plugins
Linux scripts
csgo-server-launcher
A simple script has been created to manage the server. It has been tested on Debian and Ubuntu distributions and it can create, start, stop, restart, update the server. You can also display the console through console commands. If you are in console mode, don't forget to press CTRL+A and then press D to stop the screen without stopping the server.
feature
- start - Starts the server in screen using the PARAM_START variable.
- stop - Stops the server and closes the loading screen.
- status - Displays the status of the server (screen down or up)
- restart - restart the server (stop && start)
- console - Displays the server console, where you can enter commands.
- update - updates the server according to PARAM_UPDATE, then saves the log file in LOG_DIR, and if var is full, sends a
- LOG_EMAIL sends an email.
- create - Create a server (the script must be configured first).
This script is available on GitHub: csgo-server-launcher
LGSM csgoserver
AsLinux Game Server ManagerPart of the script, csgoserver is a command line tool for quick and easy deployment and management of Counter-Strike: Global Offensive Linux dedicated servers.
Main Features
- Server Installer (SteamCMD).
- Lots of default startup parameters (including workshop support)
- Start/Stop/Restart the server.
- Server console.
- Server monitoring (including email notifications).
- Server Updates (SteamCMD).
- Server backup.
compatibility
Linux Game Server Manager has been tested to run on the following Linux distributions:
- Debian-based distributions (Ubuntu, Mint, etc.).
- Redhat based distributions (CentOS, Fedora, etc.).
Get the script at gameservermanagers.com.
For more information:Github Wiki.
Get Help:LGSM Steam Group.
Windows Software/Scripts
SteamCMD GUI
This tool allows users to use SteamCMD on Windows without having to touch the command line and batch files.
GitHub address: https://github.com/DioJoestar/SteamCMD-GUI.git
pyr0s-csgo-server-launcher
A simple script to start 3 different servers, usable in any of the 4 game modes. My first attempt at any kind of scripting.
Website:https://code.google.com/p/pyr0s-csgo-server-launcher/
CSGO server advanced settings
Configuring your new CS:GO server is different from what server administrators have seen in the past with dedicated servers. We'll cover the main differences.
autoexec.cfg
This file is located in \csgo\cfg.
This file will be executed before the first map is loaded. valve.rc executes autoexec.cfg, and in the next command, stuffcmds, it will execute the parameters with + from the command line
In your autoexec.cfg you only need to set the directive once:
log on //This will enable logging, don't put this in the server.cfg file hostname "Counter-Strike: Global Offensive Dedicated Server" //Server name rcon_password "yourrconpassword" //Your rcon password (remote management server) sv_password "" //This option is only needed if you plan to set up a private server! sv_cheats 0 //Turn off cheats, this should be set like this, don't change sv_lan 0 //Not only LAN connection, this should be set like this, don't change exec banned_user.cfg //Blacklist user exec banned_ip.cfg //Blacklist IP
server.cfg
The server.cfg file is in the \csgo\cfg directory (if it doesn't exist, create one yourself)
This file is loaded every time you switch maps, and is loaded before the gamemode files listed below. Here is a very simple example of a server.cfg file:
mp_autoteambalance 1 //Enable team balance mp_limitteams 1 //The maximum allowed difference in the number of people in a team writeid //Whitelist users writeip //Whitelist IP
gamemodes.txt
This file is located in the \csgo\ folder.
Essentially, this file is the standard "rules" defined by Valve. For example, in casual mode, CTs are automatically given defuse kits, while in competitive mode they are required to be purchased manually by the player, just like in old CS. You should not edit this file, as Valve may decide or change the rules for any particular mode at any time. If you customize this file, your changes will be overwritten when the server is updated.
Although you should not edit this file, changes to it will still work. Find the section you wish to edit and you will be presented with a set of parameters you can set. Again, you will need to make the actual changes in gamemodes_server.txt.
Each section of the file is separated by game type. Game types include casual, competitive, arms race (gungameprogressive), blasting (gungametrbomb), and deathmatch.
gamemodes_server.txt
This file must exist, or be generated from gamemodes_server.txt.example in the \csgo\ folder. This file allows server administrators to customize each game mode on their server. This will override Valve's default gamemodes.txt. For example, using this file you can change the maximum number of rounds in a match or enable friendly fire but reduce the damage.
It is very important to keep the same hierarchy and syntax as the gamemodes.txt file!!! The server includes a gamemodes_server.txt.example file when you install it to help you learn the syntax. In a standard server, there is no gamemodes_server.txt file at the beginning. You must copy, rename or create a new gamemodes_server.txt file to apply your gamemode.
Robot Settings
You can modify the following to change the number of bots, their distribution on the server, and how chatty they are:
"bot_quota_mode" "fill" // Fill mode: fill empty slots"bot_defer_to_human_items" "1" "bot_defer_to_human_goals" "0" "bot_difficulty" "1" // Bot difficulty: 1 "bot_dont_shoot" "0" // Bot harmless: off "bot_chatter" "normal" // Bot radio: normal "bot_autodifficulty_threshold_low" "-2.0" // Bot autodifficulty threshold low value: value between -20.0 and 20.0, (lowest human average score, below which the bot will increase the difficulty) "bot_autodifficulty_threshold_high" "0.0" // Bot autodifficulty threshold high value: value between -20.0 and 20.0, (higher than the human average score, above which the bot will reduce the difficulty)
Round Settings
You can change the rules of each round by using the settings below. You can change from round count to round time limit, change the initial freeze time, change whether the player can observe enemies after death. Each convar is set for a specific game type, so you must modify each different game mode to get updates. These may be overwritten by cfg/gamemode_XXX.cfg and cfg/gamemode_XXX_server.cfg, as described below.
"mp_afterroundmoney" "0" "mp_playercashawards" "1" "mp_teamcashawards" "1" "mp_maxrounds" "30" "mp_timelimit" "0" "mp_roundtime" "2" "mp_freezetime" "15" "mp_buytime" "45" "mp_forcecamera" "1" // Set to 1 for team only spectating. "mp_defuser_allocation" "0" "mp_death_drop_gun" "1" // 0=none, 1=best, 2=current or best "mp_death_drop_grenade" "2" // 0=none, 1=best, 2=current or best "mp_death_drop_defuser" "1"
Gun Settings
You will find convars that can modify what weapons players on the Arms Race server use. You can set the weapon order and kill requirements to move to the next weapon. The two teams use different settings, so be careful to modify them to avoid unbalancing the game.
For example, here is a progress chart of weapons/kill requirements for Arms Race:
"mp9" { "kills" "1" } "mac10" { "kills" "1" } "mp7" { "kills" "1" } "bizon" { "kills" "1" } "ump45" { "kills" "1" } "p90" { "kills" "1" } "nova" { "kills" "1" } "mag7" { "kills" "1" } "xm1014" { "kills" "1" } "sawedoff" { "kills" "1" } "galilar" { "kills" "1" } "famas" { "kills" "1" } "ak47" { "kills" "1" } "m4a1" { "kills" "1" } "sg556" { "kills" "1" } "aug" { "kills" "1" } "awp" { "kills" "1" } "m249" { "kills" "1" } "negev" { "kills" "1" } "glock" { "kills" "1" } "hkp2000" { "kills" "1" } "tec9" { "kills" "1" } "p250" { "kills" "1" } "deagle" { "kills" "1" } "fiveseven" { "kills" "1" } "elite" { "kills" "1" } "knifegg" { "kills" "1" }
For example, here is a progression chart of weapons/kill requirements for Demolition Mode:
"m4a1" { "kills" "1" } "p90" { "kills" "1" } "ump45" { "kills" "1" } "deagle" { "kills" "1" } "nova" { "kills" "1" } "fiveseven" { "kills" "1" } "hkp2000" { "kills" "1" } "ssg08" { "kills" "1" } "awp" { "kills" "1" } "Scar20" { "kills" "1" }
Please note that Arms Race mode uses random weapons by default, to force using a custom list change mp_ggprogressive_use_random_weapons to 0 .
gamemode_casual_server.cfg
The gamemode_casual_server.cfg and gamemode_casual.cfg files reside in the cfg directory. The latter (gamemode_casual.cfg) are set by Valve and are set at the start of every casual game (they are applied every time a map is loaded). There is a file for each game mode (replace casual with the appropriate mode. competitive or armsrace). The format of the file is very simple, just "convar setting // optional comment". Take the gamemode_casual.cfg file as an example:
bot_autodifficulty_threshold_high 0.0 // Value between -20.0 and 20.0... cash_player_bomb_defused 200 // Player reward for defusing a bomb
Administrators should not modify files named gamemode_XXX.cfg. Due to Valve's naming convention, these files may be modified in the future and overwrite your settings files. Instead, you should create files ending in _server.cfg.
Each gamemode_XXX.cfg file should have a corresponding gamemode_XXX_server.cfg file in the cfg folder. Valve's file naming convention is that the _server.cfg file will not be overwritten by updates. Any changes made in the _server.cfg file will overwrite the original configuration file, because the _server.cfg file will be executed after it. This combination is visible in gamemodes.txt
Settings in gamemode_XXX.cfg and gamemode_XXX_server.cfg override gamemodes_server.txt, and server.cfg. Also, it seems easier to modify gamemode_XXX_server.cfg because of the format.
When modifying settings, there seems to be no limit to the amount of space between variables and properties, but it is required. Comments are C++ single-line comments and must be placed after //.
Once you have started your dedicated server, you can enable logging by typing
//These logs will be stored in the csgo folder of your dedicated server cvarlist log cvarlist.txt
Maps
The game no longer uses maplist.txt files, your game is now controlled by mapgroups. Servers must use mapgroup or workshop_collection, otherwise maps will not cycle properly. See the mapgroup example in the gamemodes_server.txt.example file.