Counter-Strike: Global Offensive/Dedicated Servers: Difference between revisions
m (→Downloading and Running the SteamCMD Update Tool: fixed the list.. sort of) |
(REMOVED STEAMCMD, I split this into a new page, since SteamCMD is used for other games than CS:GO) |
||
Line 4: | Line 4: | ||
For known issues and workarounds, please visit [[Counter-Strike: Global Offensive Dedicated Servers Known Issues|CSGO DS known issues]]. | For known issues and workarounds, please visit [[Counter-Strike: Global Offensive Dedicated Servers Known Issues|CSGO DS known issues]]. | ||
== | == SteamCMD Update Tool == | ||
Counter-Strike: Global Offensive no longer uses [[hldsupdatetool]] to install and update the dedicated server. You should download and install the new [[SteamCMD]]. | |||
== Downloading the CS:GO Dedicated Server == | == Downloading the CS:GO Dedicated Server == | ||
: This describes the process of updating the CS:GO dedicated server application. These steps are required every time the game is updated. To automate this process for future updates, see [[#Automating SteamCmd]]. | : This describes the process of updating the CS:GO dedicated server application. These steps are required every time the game is updated. To automate this process for future updates, see [[SteamCMD#Automating SteamCmd]]. | ||
: 1. | : 1. [[SteamCMD|Download and install '''SteamCmd''']]. | ||
: 2. At the '''Steam>''' prompt, set your CS:GO Dedicated Server install directory. | : 2. Start SteamCMD. At the '''Steam>''' prompt, set your CS:GO Dedicated Server install directory. | ||
Note | : {{Note|On some Linux distributions the path cannot contain any capital letters - see [[SteamCMD#Known_issues]]}} | ||
:* Windows: | |||
: | |||
force_install_dir c:\csgo-ds\ | force_install_dir c:\csgo-ds\ | ||
force_install_dir .\csgo-ds\ | |||
: | :* Linux: | ||
force_install_dir . | force_install_dir ~/csgo-ds/ | ||
force_install_dir ./csgo-ds/ | |||
: 3. Install or Update CS:GO. | : 3. Install or Update CS:GO. | ||
Line 210: | Line 193: | ||
//The output file will be located in the csgo folder of your dedicated server | //The output file will be located in the csgo folder of your dedicated server | ||
cvarlist log cvarlist.txt | cvarlist log cvarlist.txt | ||
= FAQs and Common Problems = | = FAQs and Common Problems = | ||
== I was able to download or update the server package with | == I was able to download or update the server package with SteamCMD, but the server fails to start == | ||
Common causes: | Common causes: | ||
* Linux | * On some Linux distributions the path cannot contain any capital letters - see [[SteamCMD#Known_issues]]}} | ||
== Clients cannot connect to the server. They receive the error "Failed to get session data." == | == Clients cannot connect to the server. They receive the error "Failed to get session data." == |
Revision as of 12:55, 18 August 2012
UPDATE
For known issues and workarounds, please visit CSGO DS known issues.
SteamCMD Update Tool
Counter-Strike: Global Offensive no longer uses hldsupdatetool to install and update the dedicated server. You should download and install the new SteamCMD.
Downloading the CS:GO Dedicated Server
- This describes the process of updating the CS:GO dedicated server application. These steps are required every time the game is updated. To automate this process for future updates, see SteamCMD#Automating SteamCmd.
- 2. Start SteamCMD. At the Steam> prompt, set your CS:GO Dedicated Server install directory.
Note:On some Linux distributions the path cannot contain any capital letters - see SteamCMD#Known_issues
- Windows:
force_install_dir c:\csgo-ds\ force_install_dir .\csgo-ds\
- Linux:
force_install_dir ~/csgo-ds/ force_install_dir ./csgo-ds/
- 3. Install or Update CS:GO.
- If this is your first time installing or if you are trying to verify the integrity of the server files:
app_update 740 validate
- If this is simply an update to an existing CS:GO dedicated server:
app_update 740
- 4. Once finished, type quit at the Steam> prompt to properly log off of the Steam servers.
Starting the Server

Classic Casual:
srcds -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_bomb +map de_dust
Classic Competitive:
srcds -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_bomb +map de_dust
Arms Race:
srcds -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace +map de_dust
Demolition:
srcds -game csgo -console -usercon +game_type 1 +game_mode 1 +mapgroup mg_demolition +map de_dust
Advanced Configuration
Configuring your new Counter-Strike: Global Offensive server differs from what server administrators have seen with previous dedicated servers. There are some primary differences, which we'll cover here.
gamemodes.txt
This file can be found under the \csgo\ folder.
Essentially, this file defines Valve's standard "rules" for each game mode. For example, a classic casual game gives defuse kits to CTs automatically, while in a classic competitive game they are purchasable like in previous versions of CS. You should not edit this file because Valve may decide to change the rules for a particular game mode at any time. If you customize this file, and not the gamemodes_server.txt file, your changes will be wiped out any time Valve chooses to push an update to this file.
Even though you shouldn't edit this file, it's still useful to use this file to determine how exactly to make a particular convar change. Find the section you want to edit, and you'll see the group of appropriate convars you can set. Again, you will need to make your actual changes in gamemodes_server.txt.
Each section of the file is separated by the game type. The game types are Casual, Competitive, Arms Race (Gun Game) and Demolition (gungametrbomb).
gamemodes_server.txt
This file must be created or otherwise generated from gamemodes_server.txt.example under the \csgo\ folder. This file allows the server administrator to customize each game mode for their own server. It overrides and defaults set by Valve in gamemodes.tst. With this file, for example, you can change the maxrounds for a game type from the default, or enable friendly fire but reduce the amount of damage friendlies deal.
IT IS IMPORTANT TO MAINTAIN THE SAME HIERARCHY AND SYNTAX AS GAMEMODES.TXT!!! Included with your server installation is a gamemodes_server.txt.example file to help you learn the syntax. There is no file specifically named gamemodes_server.txt in the standard server install. You must rename, copy, or make a new file called gamemodes_server.txt to be able to customize your game modes.
Bots
You can change the amount of bots, the way the bots populate the server and how chatty they are by updating the convars below:
"bot_quota_mode" "fill" "bot_defer_to_human_items" "1" "bot_defer_to_human_goals" "0" "bot_difficulty" "1" "bot_dont_shoot" "0" "bot_chatter" "normal" "bot_autodifficulty_threshold_low" "-2.0" // Value between -20.0 and 20.0 (Amount below avg human contribution score, below which a bot should raise its difficulty) "bot_autodifficulty_threshold_high" "0.0" // Value between -20.0 and 20.0 (Amount above avg human contribution score, above which a bot should lower its difficulty)
Round Convars
The following convars can be changed to update how the rounds are played out. You can change from round limits to time limits, to how long you force players to freeze in place to buy to forcing the camera to only specatating your team members while dead. Each convar is set specifically for each game type, so you'll have to go through each of the different game modes to get them all updated!
"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 Game and Demolition Progression
You'll find convars available to update how the server progresses individuals through the weapons in both Gun Game modes. You can set the weapon order and the kill requirements in order to move on to the next weapon. These convars are separated by team, so be careful to make changes for both sides or you could potentially unbalance the matches on your server.
As an example, here is a list of the convars of weapon progression on Arms Race for a single team:
"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" }
Here is an example of the weapon progression on Demolition for a single team:
"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" }
Maps
The types of maps you play are now controlled by map groups.
autoexec.cfg
The file has to be created in \csgo\cfg.
This file is executed before the first map starts. The valve.rc executes the autoexec.cfg and in the next line the cmd stuffcmds, which will execute the parameters with + from the commandline.
In your autoexec.cfg you can set cvars which may need a mapchange or have to be set only one time
log on //This is set to turn on logging! Don't put this in your server.cfg //sv_password //Only set this if you intend to have a private server and don't want that a mapchange will reset your password.
server.cfg
The server.cfg file can be found under \csgo\cfg. (make it if it doesn't exist)'
This file has been significantly depreciated with CS:GO. It is no longer used as the primary way of configuring the convars of the server. Certain convars, like mp_timelimit, are not even available through the console, as they are now loaded using a different file (see gamemodes.txt below).
However, you will still use this config file to update the hostname, rcon, server password and other convars that you do have access to. Here is an example of a very simple server.cfg file:
hostname "Counter-Strike: Global Offensive Dedicated Server" rcon_password "yourrconpassword" sv_password "" //Only set this if you intend to have a private server!
From here, you can add additional commands to customize your server's game play experience:
mp_freezetime 5 //The amount of time players are frozen to buy items mp_join_grace_time 15 //The amount of time players can join teams after a round has started mp_match_end_restart 0 // Defines whether a map should be restarted after a game has ended sv_cheats 0 //This should always be set, so you know it's not on sv_lan 0 //This should always be set, so you know it's not on //**The bot commands below are mostly default with the exception of bot_difficulty 1 bot_chatter "off" bot_join_after_player 1 bot_quota 10 bot_quota_mode "fill" //**The following commands manage kicks and bans writeid writeip exec banned_user.cfg exec banned_ip.cfg
Once you've launched your dedicated server, you can type in the following command to output all available convars that can be altered using server.cfg:
//The output file will be located in the csgo folder of your dedicated server cvarlist log cvarlist.txt
FAQs and Common Problems
I was able to download or update the server package with SteamCMD, but the server fails to start
Common causes:
- On some Linux distributions the path cannot contain any capital letters - see SteamCMD#Known_issues}}
Clients cannot connect to the server. They receive the error "Failed to get session data."
This is probably caused by specifying an invalid map group in the startup command line. E.g., the August 10, 2012 update removed the "mg_allclassics" mapgroup. Changing it to a valid map group, e.g. mg_bomb, may fix the problem.
How do I determine whether a change I want to make should be done in autoexec.cfg, server.cfg, or gamemodes_server.txt?
This is where the gamemodes.txt (not gamemodes_server.txt) comes into play. Look for the value you want to change, and if it exists in this file, then make the override in gamemodes_server.txt (pay attention to hierarchy and syntax!!!). Otherwise, most other changes should be done in server.cfg.
Maxplayers doesn't work/is overridden
Progression of maxplayers configuration through the beta:
- In the beginning (pre-CS:GO), Valve created the +maxplayers command line argument. This generally allowed game server providers to set a value that couldn't be overridden by server operators through config files (and thus gaining access to more player slots than they paid for). Valve and GSPs saw that it was good.
- [Is this correct?] Then, Valve created CS:GO and removed +maxplayers from the command line. Thus Valve saith: "No longer shall you set maxplayers through the command line. In its stead, I have created the maxplayers convar in gamemodes.txt. You shall define maxplayers in gamemodes_server.txt as so:"
"GameModes_Server.txt"
{
"gameTypes"
{
"classic"
{
"gameModes"
{
"competitive"
{
"convars"
{
maxplayers "24"
}
}
}
}
}
}
As this now allowed server operators to easily set maxplayers from a generic and easily-editable text file, GSPs grew concerned. There was wailing and gnashing of teeth.
- Beginning with the [August 10?] update, Valve again moved the location of maxplayers again. While it was still in gamemodes/gamemodes_server.txt, it was moved one level up and out of the convars section, i.e.:
"GameModes_Server.txt"
{
"gameTypes"
{
"classic"
{
"gameModes"
{
"competitive"
{
maxplayers "24"
}
}
}
}
}
- Starting with the August 14 update, Valve heard the cries of its people and added a -maxplayers_override command line argument that overrides any other definitions of maxplayers. And there was much rejoicing.
In-game UI "Rounds left" counter starts at 30 and counts down from there, regardless of any mp_maxrounds value.
Seems to be a bug.
If the player count reaches around 25, no new players can connect to the server.
Seems to be a bug.
The info on the client in-game connecting screen is incorrect
Seems there might be a way to customize the info displayed here (UI sections in gamemodes.txt/gamemodes_server.txt). Does anyone know how?
My server has a password set and should be private, but once one player joins, the server fills up from lobby connections.
Bug. As a workaround, de-list your server from matchmaking with the convar sv_steamgroup_exclusive 1.
How do I force the server to reload gamemodes_server.txt after the server has started?
This may currently not be possible without restarting the server.
How can I run multiple/different server instances from a single install?
The -gamemodes_serverfile command line parameter allows specifying a file other than the default gamemodes_server.txt.
Problems with SourceMod/Metamod
See this thread.