Skip to content

Counter-Strike 2: Server Configuration

Learn how to configure the server name, passwords, game mode, starting map, CSTV, and custom commands for your Counter-Strike 2 server → Find out more

1 December 20267 min read95 Views0 helpful

Don't have your own server yet? Host your Counter-Strike 2 server with ZAP-Hosting from €4.99 / month.Or try 3 days from €0.90

Introduction

With the right configuration, you can turn your Counter-Strike 2 server into exactly the server you have in mind: with your own name, password, game mode, starting map, and game rules. In this guide, we’ll show you which settings are available, where to find them in ZapX, and what you can customize yourself in the configuration files.

How configuration works

You’ll find your CS2 server’s most important settings in ZapX under the Configuration tab, in Startup parameters. You can set everything else in the configuration files in the csgo/cfg folder, which you can open in the Files tab.

Whenever your server starts, it writes the values from the startup parameters to the zapx.auto.cfg file in the csgo/cfg folder. This file contains the server name (hostname), server password (sv_password), RCON password (rcon_password), displayed player slots (sv_visiblemaxplayers), CSTV settings, and sv_lan 0, sv_cheats 0, and sv_hibernate_when_empty 0. Your server loads this file whenever a map starts: first, it runs your server.cfg, then it applies the values from the startup parameters.

Important

Always set the server name, server password, RCON password, displayed player slots, and CSTV in Startup parameters, not in server.cfg. If hostname, sv_password, rcon_password, sv_visiblemaxplayers, or tv_enable are also in your server.cfg, the values from the startup parameters still take precedence. Delete those lines from server.cfg so you don’t have to look in two places. You don’t need to edit zapx.auto.cfg itself—your server overwrites it every time it starts.

Info

This applies to the current server image and later. If ZapX shows an update for your server, apply it first using Apply update.

After you save your changes, ZapX will offer to restart the server. Your changes won’t take effect until the server has restarted.

Startup parameters at a glance

Startup parameterDescription
Server nameYour server’s name in the server list. Default: ZAP Counter-Strike 2
Server passwordPassword required to join. Leave it blank for a public server without a password.
RCON PasswordPassword for the remote console (RCON). ZapX creates one automatically during setup, and you can change it at any time.
Steam server token (GSLT)A Steam Game Server Login Token that makes your server appear in the server list. See Create a GSLT
Max. playersHow many players can play on your server at the same time. Bots also occupy slots, and your server automatically gets one extra slot for CSTV. Maximum: 64. Default: 16
Game modeThe game mode the server starts with, e.g. competitive (default), casual, wingman, or deathmatch (+game_alias)
Game type (game_type)Raw game_type value, e.g. 0 = Classic, 1 = Gun Game. Only applies when Game mode is blank. Default: 0
Mode number (game_mode)Raw game_mode value, depending on the game type (e.g. Classic + 1 = Competitive). Only applies when Game mode is blank. Default: 1
Map groupThe map pool your server uses to choose the next map after a match. Default: mg_active
Starting mapThe map your server starts with. Default: de_dust2
Enable CSTVAllows viewers to watch matches live via CSTV. Default: off
Record CSTV demosAutomatically records every match as a demo. Only applies when CSTV is enabled. Default: off
Additional startup parametersOptional command-line parameters for the dedicated server, e.g. -insecure for a test server without VAC

Game mode and map

Choose a game mode

Enter the name of the mode in the Game mode field, for example competitive, casual, wingman, or deathmatch. Your server will then start with +game_alias and that name.

If you’d rather use the raw game_type and game_mode values, leave Game mode blank and set Game type (game_type) and Mode number (game_mode). If Game mode is filled in, your server ignores these two fields.

Starting map and map group

Use Starting map to choose the map your server starts on. Enter the map name without the file extension, for example de_mirage. Use Map group to choose the map pool your server will use to select the next map after a match. In addition to the included groups such as mg_active, you can create your own group. See Create your own map group below. While the server is running, you can change the map in the Console using changelevel <karte>.

Upload your own maps

Add your own maps as <kartenname>.vpk files in the csgo/maps folder in the Files tab. Your server will load them alongside the included maps every time it starts. Then enter the map name without .vpk as the Starting map, or load the map in the Console using map <kartenname>.

Info

If your file has exactly the same name as an included map, your server will skip it and keep the original map. Give your own maps unique names.

Create your own map group

Create your own map group in the gamemodes_server.txt file. In the Files tab, place it directly in the csgo folder, not in csgo/cfg. Your server will load it every time it starts. Here’s an example of a group with three maps:

Code
"GameModes_Server.txt"
{
	"mapgroups"
	{
		"mg_meine_karten"
		{
			"name"	"mg_meine_karten"
			"maps"
			{
				"de_inferno"	""
				"de_mirage"	""
				"de_nuke"	""
			}
		}
	}
}

Then enter the group name—in this example, mg_meine_karten—in the Map group startup parameter and restart your server. In the Console, use print_mapgroup_sv to check whether your server recognizes the group and all its maps. After a match, it will choose the next map from this group, for example through the vote at the end of the match.

Info

A group needs at least two maps; otherwise, your server will stay on the current map after the match. Your server won’t choose Workshop maps from gamemodes_server.txt after a match. For Workshop maps, use a Workshop collection via +host_workshop_collection <ID> in Additional startup parameters. If a collection is set, your server will use its maps as the map group, and your own group won’t take effect.

Custom map groups are supported starting with the current server image. If ZapX shows an update for your server, apply it first using Apply update.

Custom settings in the configuration files

The server.cfg file in the csgo/cfg folder is yours to edit: your server creates it on first start and doesn’t change it afterward. By default, it only contains settings for server logs (sv_logfile, sv_logdir logs, and others). Add commands here that should apply every time a map starts.

The game rules for each game mode are in the gamemode_<modus>.cfg files in the same folder, for example gamemode_competitive.cfg or gamemode_casual.cfg. Your server copies these files to your csgo/cfg folder on first start and doesn’t overwrite them afterward.

Whenever a map starts, your server loads the files in this order: first zapx.auto.cfg (which includes your server.cfg, followed by the values from the startup parameters), then the gamemode_<modus>.cfg file for the active game mode, and finally, if present, gamemode_<modus>_server.cfg. If the game mode file sets a command that’s also in your server.cfg, the value from the game mode file applies. For example, gamemode_competitive.cfg sets mp_roundtime, mp_startmoney, mp_maxrounds, and bot_quota itself. As a result, these commands won’t take effect when added to server.cfg.

The best way to set custom rules for a game mode is to create a new gamemode_<modus>_server.cfg file in the csgo/cfg folder, for example gamemode_competitive_server.cfg. It loads last, so you don’t have to modify the included game mode file.

Info

The file name depends on the game mode: competitive uses gamemode_competitive.cfg, casual uses gamemode_casual.cfg, deathmatch uses gamemode_deathmatch.cfg, and wingman uses gamemode_competitive2v2.cfg. You can see which file your server loads after a map starts in the Console, on the line execing gamemode_…cfg.

You can use these commands in your configuration files:

CommandDescription
mp_freezetime <sekunden>Duration of the freeze time at the start of a round
mp_roundtime <minuten>Round time in minutes
mp_roundtime_defuse <minuten>Round time on bomb defusal maps
mp_maxrounds <anzahl>Maximum number of rounds in a match
mp_winlimit <anzahl>Number of round wins a team needs to win the match
mp_halftime <0/1>Turn the halftime side switch off/on
mp_overtime_enable <0/1>Turn overtime in the event of a tie off/on
mp_friendlyfire <0/1>Turn damage from teammates off/on
mp_autoteambalance <0/1>Turn automatic team balancing off/on
mp_limitteams <anzahl>Maximum difference in player count between teams
mp_startmoney <betrag>Players’ starting money
mp_maxmoney <betrag>Maximum amount of money a player can have
mp_buytime <sekunden>How long players can buy items at the start of a round
mp_buy_anywhere <0/1>Turn buying outside the buy zone off/on
mp_c4timer <sekunden>Time until the bomb explodes
mp_warmuptime <sekunden>Duration of the warmup period
mp_forcecamera <0/1/2>Which spectator views are available after death
bot_quota <anzahl>Desired number of bots
bot_difficulty <0/1/2/3>Bot difficulty
sv_alltalk <0/1>Voice chat between all players, regardless of team
sv_voiceenable <0/1>Turn voice chat on the server off/on
Tip

You can also enter any of the commands in the table in the Console while the game is running, for example, to test them. Add commands you want to keep in effect to a configuration file.

More settings and guides

  • Admin permissions: Learn how to give yourself admin permissions in Become an admin.
  • Plugins: Install Metamod:Source and plugins in the csgo/addons folder. If addons/metamod is present, your server automatically adds Metamod to gameinfo.gi every time it starts. Learn more in Install plugins.
  • CSTV: Use Enable CSTV and Record CSTV demos to record matches. Your server moves completed demos to the csgo/demos folder, where you can find them in the Files tab. Learn more in CSTV.
  • Server messages: Learn how to set up automatic messages in Automated server messages.
  • Deathmatch, Surf, and Warmup servers: See DM, Surf & Warmup servers.

Conclusion

Your Counter-Strike 2 server is now configured the way you want it. If something isn’t working as expected, our guide Common issues can help. If you have any other questions, our support team is available every day! 🙂

Free tools

CS2 Tools

View all

FAQ

Frequently asked questions

Set the server name, server password, RCON password, GSLT, game mode, starting map, map group, and CSTV under Startup parameters in the Configuration tab. Add other commands to files in the csgo/cfg folder under the Files tab, such as server.cfg.
Change them in Startup parameters under the Configuration tab. Your server writes them to zapx.auto.cfg every time it starts and applies them after server.cfg every time a map starts. If hostname, sv_password, or rcon_password are also in server.cfg, the start parameter values still apply. Remove those lines from server.cfg.
Enter a mode in the Game mode field, such as competitive (default), casual, wingman, or deathmatch. If you leave the field blank, your server uses the raw Game type (game_type) and Mode number (game_mode) values instead.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.