All guides

CS2 Server Admin Commands: RCON and Management

This is a practical guide for Counter-Strike 2 dedicated server operators. It collects working RCON, moderation and match-control commands verified against current CS2 builds. Commands and values are given as is - copy them straight into the console or a config file.

What RCON is and why you need it

RCON (Remote Console) is a remote server management protocol. It lets an admin send commands to a CS2 dedicated server directly from the in-game console, without shell access to the machine running the server.

RCON runs over the same port as game traffic (27015 by default). To use it, the server must have an RCON password set, and the client must authenticate with that password before sending commands.

RCON in CS2 sends the password over the network. Use a strong password and do not connect to untrusted public servers - a captured password grants full control of the server.

Enabling RCON and setting the password

RCON is activated by setting a non-empty password. You can do this via a launch parameter, in the server config, or manually from the server console.

  1. 1Open your CS2 server.cfg (folder game/csgo/cfg).
  2. 2Add the line rcon_password "YourStrongPassword" - while the password is empty, RCON is disabled.
  3. 3Restart the server or run the command in the server console to apply the value.
  4. 4Make sure port 27015 (TCP and UDP) is open on the firewall, otherwise the client cannot connect.
// server.cfg
// Remote console password. Keep it secret.
rcon_password "ChangeMe_Strong_Pass_123"

// Optional: limit the number of failed login attempts
sv_rcon_maxfailures "5"
sv_rcon_banpenalty "10"

Connecting to RCON from the game client

After connecting to the server (via console or the server browser), the admin authenticates with the password, after which any command prefixed with rcon runs on the server.

  1. 1Connect to the server: connect IP:27015
  2. 2Authenticate with the password: rcon_password YourPassword
  3. 3Send any command with the rcon prefix, for example: rcon status
  4. 4If the response comes back without a Bad rcon_password error, authentication succeeded.
// In the client console
connect 203.0.113.10:27015
rcon_password ChangeMe_Strong_Pass_123
rcon status
rcon say Hello from the admin

Moderation commands: kick, ban, banid, kickid

The core moderation tools work by player name, by userid (the per-session index), or by SteamID. You can look up userid and SteamID with the status command.

banid and banip bans only last until the server restarts unless you save them. Run writeid and writeip, otherwise the ban list resets after a restart.

CommandPurposeExample
kickKick a player by namekick "Nick"
kickidKick by userid (with reason)kickid 3 Chat spam
banidBan by userid for N minutes (0 = permanent)banid 30 3
banBan the current player by userid for N minutesban 60 3
banipBan by IP addressbanip 30 203.0.113.55
writeidSave SteamID bans to banned_user.cfgwriteid
writeipSave IP bans to banned_ip.cfgwriteip
removeidRemove a ban by SteamIDremoveid STEAM_1:0:12345

Changing the map: changelevel and map

Two commands change the map. map fully restarts the game on the new map and resets the score; changelevel switches the map with a minimal restart, preserving part of the server state.

Map names are given without an extension. Workshop maps use a prefix with the workshop ID.

CommandDescription
map de_dust2Load a map with a full restart
changelevel de_mirageSwitch map without a full restart
host_workshop_map 3070...Load a workshop map by ID
maps *Show the list of available maps
rcon map de_inferno
rcon changelevel de_nuke
rcon host_workshop_map 3070287560

Match control: mp_ cvars

Cvars prefixed with mp_ control match logic: round length, economy, friendly fire and game format. Changes take effect from the next round, and for reliability apply them with mp_restartgame.

CvarPurposeExample
mp_maxroundsNumber of rounds in a matchmp_maxrounds 24
mp_roundtimeRound duration (minutes)mp_roundtime 1.92
mp_freezetimeFreeze time at round start (sec)mp_freezetime 15
mp_startmoneyStarting moneymp_startmoney 800
mp_maxmoneyMoney capmp_maxmoney 16000
mp_friendlyfireDamage to teammates (1 on)mp_friendlyfire 1
mp_warmup_endEnd warmup immediatelymp_warmup_end
mp_restartgameRestart the game in N secondsmp_restartgame 1
mp_pause_matchPause the matchmp_pause_match
mp_unpause_matchUnpause the matchmp_unpause_match

Bot commands

Bots are useful for server testing, practice and filling slots. Managing bots requires a game mode that supports them.

CommandPurpose
bot_addAdd a bot to any team
bot_add_tAdd a bot to the Terrorists
bot_add_ctAdd a bot to the Counter-Terrorists
bot_kickRemove all bots
bot_difficulty 0-3Bot difficulty (0 easy, 3 expert)
bot_quota 5Desired number of bots on the server
bot_stop 1Freeze bots in place
bot_mimic 1Bots copy your actions
rcon bot_difficulty 2
rcon bot_quota 6
rcon bot_add_ct
rcon bot_kick

sv_cheats and exec configs on a private server

On a private or practice server, sv_cheats mode unlocks debug commands (god mode, infinite ammo, teleport and more). Enable it only on a trusted server - on a public one it ruins the game and alarms players.

The exec command runs a config from the cfg folder. This is handy for quickly switching setting sets: competitive mode, practice, warmup.

After practice, remember to set sv_cheats 0 and restart the round, otherwise you cannot fairly let regular players onto the server.

CommandPurpose
sv_cheats 1Enable cheats (private server only)
godGod mode (requires sv_cheats 1)
sv_infinite_ammo 1Infinite ammo
noclipFly through walls
impulse 101Grant maximum money and armor
exec server.cfgRun the server.cfg config
exec practice.cfgRun your own practice config

Diagnostics: status and common moderation commands

The status command is the admin's main tool. It shows the server name, map, player count and a table with userid, names and SteamIDs, which you need for kickid and banid.

Once your server is configured and stable, add it to monitoring on monitoringcs2.com - you get a public page with player count, map and history, and players can find you in the server list.

CommandPurpose
statusServer summary and player list
usersList of connected clients
say textSend a chat message from the server
sv_alltalk 1Shared voice chat for both teams
sv_password "pass"Join password (private server)
sv_pausable 1Allow pausing the match
quitCleanly stop the server

Frequently asked questions

How do I find a player's userid and SteamID for a ban?+

Run status in the server console or via rcon status. The table includes userid and SteamID columns for each player - those are exactly the values used in kickid, banid and removeid.

Why do my bans disappear after a server restart?+

banid and banip keep a ban in memory only until the restart. To make them permanent, run writeid and writeip - the bans are then written to banned_user.cfg and banned_ip.cfg and applied on the next start.

Can I enable sv_cheats on a public server?+

Technically yes, but you should not. sv_cheats unlocks cheat commands and breaks the competitive integrity of the match. Use it only on a private or practice server, then set sv_cheats 0 back.

What is the difference between map and changelevel?+

map does a full game restart on the new map and resets the score, which is more reliable when switching mode. changelevel switches the map with a smaller restart and keeps part of the state, but is not suited for changing the game type.

RCON returns Bad rcon_password, what should I do?+

Check that the server has a non-empty rcon_password, that you entered the same password with the rcon_password command before sending commands, and that port 27015 is open. After changing the password in the config the server must be restarted.

How do I add my server to monitoring?+

Open the monitoring and register the server by its IP and port on monitoringcs2.com. After a check, a public page appears with player count, map and history, and the server joins the common list.