You deployed the server, so you are the admin. This page lists the CS:GO server commands you will actually use on a private server: a copy-paste practice config, private match settings, bot commands, and the SourceMod admin commands to kick, ban and change map. SourceMod is installed on every 2hours.gg CS:GO server and your Steam account is admin automatically.
Where to type server commands
- Web console (easiest): open your server page on 2hours.gg and type any command as is, for example mp_restartgame 1. To send many lines at once, click ⛶ More and paste them into the Config box in the sidebar.
- In game: open the developer console with ~ and put sm_rcon in front of a server command (sm_rcon mp_restartgame 1), or sm_cvar in front of a setting (sm_cvar mp_freezetime 0). Type one command per line: a ; in your own console splits the line on your PC, so only the first part reaches the server.
CS:GO practice server config (copy-paste)
This turns your server into a practice server: rounds that do not end, infinite ammo, five grenades at once, a line showing where each grenade flies, and money to buy anything anywhere. In your web console, click ⛶ More, paste it into the Config box and press Apply & keep.
sv_cheats 1
sv_infinite_ammo 1
ammo_grenade_limit_total 5
sv_grenade_trajectory 1
sv_grenade_trajectory_time 10
sv_showimpacts 1
mp_freezetime 0
mp_roundtime_defuse 60
mp_roundtime_hostage 60
mp_maxmoney 60000
mp_startmoney 60000
mp_buy_anywhere 1
mp_buytime 9999
mp_limitteams 0
mp_autoteambalance 0
mp_warmup_end
bot_kick
mp_restartgame 1Useful extras once sv_cheats is 1. Any player can run these in their own console:
sv_rethrow_last_grenade- Throw your last grenade again from the same spot. Bind it to a key (bind h sv_rethrow_last_grenade) to repeat a smoke without walking back.
noclip- Fly through walls to check where a smoke landed. Type it again to land.
god- Take no damage, so your own molotovs and HE grenades do not kill you while you learn them.
bot_place- Drop a bot where you are aiming, to check an angle or a one-way smoke.
Apply & keep brings the config back after every map change. Typed commands and Apply once do not survive one: CS:GO reloads the game mode config on each map, which resets round time, money and buy settings. To end practice, press Reset to defaults, set sv_cheats 0 and change map.
Private match with friends
For a 5v5 or a scrim, turn off team balancing so everyone picks their own side, skip warmup, then restart so the score starts at zero:
mp_autoteambalance 0
mp_limitteams 0
mp_maxrounds 30
mp_overtime_enable 1
mp_warmup_end
mp_restartgame 1Bot commands
bot_add_t- Add one bot to the Terrorists. bot_add_ct adds one to the Counter-Terrorists.
bot_kick- Remove all bots.
bot_quota 6- How many bots to keep in the game.
bot_difficulty 2- Bot skill: 0 easy, 1 normal, 2 hard, 3 expert.
bot_stop 1- Freeze every bot in place, for aim practice on still targets. Needs sv_cheats 1.
bot_dont_shoot 1- Bots still move but never fire. Needs sv_cheats 1.
Three kinds of command
It helps to know which is which, because they are typed differently:
- Admin commands (SourceMod): kick, ban, change map, slay. Only admins can run them. Type them in chat with a ! (or / to hide the message from others), for example !kick. The same command works in the console as sm_kick.
- Server settings (cvars): round time, bots, friendly fire. These are game variables, not admin commands. Type them as is in the web console, or in game with sm_cvar <name> <value>, for example sm_cvar mp_roundtime_defuse 2.
- Player commands: anything any player runs on their own client (buying, voice, spectating). No admin needed, they affect only that player.
How to run admin commands
You need the developer console on (Settings > Game > Enable Developer Console, or add -console to your launch options). Then either:
- In chat: press Y, type the command with a ! prefix (!map de_nuke). Use / instead of ! to run it without other players seeing the message.
- In the console: press ~ (tilde, left of the 1 key) and type the sm_ version (sm_map de_nuke).
Easiest of all: type !admin in chat to open the SourceMod admin menu and point-and-click through every command below, no memorizing.
Managing players (admin)
!kick <name>- Remove a player from the server.
!ban <name> 30 <reason>- Ban a player for 30 minutes (use 0 for a permanent ban).
!slay <name>- Kill a player instantly for the current round.
!slap <name> 20- Deal 20 damage and knock a player around (0 for just the knockback).
!gag <name>- Block a player from text chat. !ungag to undo.
!mute <name>- Block a player from voice chat. !unmute to undo.
!noclip <name>- Let a player fly through walls (toggle).
Match and map control (admin)
!map de_inferno- Change to a new map now. de_ maps are Bomb Defusal, cs_ maps are Hostage Rescue.
sm_cvar mp_restartgame 1- Restart the match in 1 second: scores and rounds reset, everyone stays connected. This is what "restart game" means in CS:GO. (It does NOT restart the server itself.)
sm_rcon mp_warmup_start- Begin a warmup period (free buy, no score).
sm_rcon mp_warmup_end- End warmup and start the live match.
Do not run quit or _restart (for example through sm_rcon). They stop the server process and drop everyone. To restart the match, use mp_restartgame instead.
Server settings / cvars (admin)
Type these as is in the web console, with sm_cvar <name> <value> in your game console, or pick them from the !admin menu:
mp_roundtime_defuse 2- Minutes per round on de_ maps. Hostage maps (cs_) use mp_roundtime_hostage.
mp_timelimit 30- Minutes before the match ends (0 = no limit). Your server then restarts the match on the same map.
mp_maxrounds 24- Rounds played before the match ends / sides switch.
mp_friendlyfire 1- Friendly fire on (1) or off (0).
mp_startmoney 16000- Money each player starts a match with.
sv_full_alltalk 1- Let every player hear every other player on voice, both teams and spectators (1), or keep voice team only (0).
sv_cheats 1- Enable cheat commands like noclip and god for testing (1). Turn off (0) for real games.
Fun and votes (admin)
!beacon <name>- Put a ring + ping on a player so everyone can find them.
!freeze <name>- Freeze a player in place for a few seconds.
!burn <name>- Set a player on fire.
!votemap de_dust2 de_mirage- Start a map vote between the listed maps.
!votekick <name>- Start a vote to kick a player.
!csay <message>- Show a message in the centre of everyone’s screen.
Player commands (anyone)
These need no admin and affect only the player who runs them:
status- Console: list connected players, their SteamIDs and ping. Handy for finding a name to kick.
timeleft- Chat: how long until the map changes.
nextmap- Chat: what the next map will be.
Offline server commands
Every command on this page also works offline. Start a game from Play > Offline with bots and type the commands straight into your console, no sm_ prefix needed, because you are hosting the game. The catch: nobody else can join an offline game. Deploy a server when you want friends in the same practice session.
Insecure servers (custom clients)
By default your server runs with VAC (Valve Anti-Cheat) on, the same as public matchmaking. When you deploy you can switch it to insecure instead: VAC off, so custom clients, scripts and modded setups can connect. It only affects your own server, and it never puts your Steam account at risk.
This one is up to you. Some private groups run insecure servers for testing, modding, or their own rules (HvH and similar). Leave VAC on for normal, protected play; switch it off for a private lobby where everyone knows the deal.
