Advertisement

Generate a Counter-Strike 2 server.cfg

CS2's server.cfg is just a sequence of console commands — but a handful of settings will never take effect from it.

Start from a preset

Visual Settings

source Format
Identity

Server name in the browser. Quote it — this format separates command and value with a space, not an equals sign.

Gameplay

Rounds per map. 0 means unlimited.

Minutes per map. 0 disables the time limit.

Seconds of buy time at the start of each round.

Round length in minutes. Competitive uses 1.92, which is 115 seconds.

Money cap per player.

Team damage.

Lets both teams hear each other on voice.

Cheat commands. Leave off on anything public.

Players & Access

Join password. Blank means public.

Network

Game server login token from your Steam account. Without it the server works but never appears in the community browser — this, not your ports, is usually why a reachable server is unlisted.

LAN mode. On, the server will not answer external queries at all.

RCON & Query

Remote console password. Change it, and do not leave the RCON port open to the internet.

server.cfg

rcon_password — This is still the example RCON password. Change it, and keep the RCON port off the public internet.
sv_setsteamaccount — Without a game server login token the server will not appear in the public browser, however your ports are configured.
hostname "My CS2"
sv_password ""
rcon_password "changeme"
sv_setsteamaccount 
mp_maxrounds 24
mp_timelimit 40
mp_freezetime 15
mp_roundtime 1.92
mp_maxmoney 16000
mp_friendlyfire 1
sv_alltalk 0
sv_cheats 0
sv_lan 0

Advertisement

The server.cfg format

Write a command, a space, then its value; no equals signs. Anything with a space in it gets quotes, numbers do not, and true/false become 1 and 0. Typos are dangerous because an unknown command fails silently: the console skips the line and continues.

Advertisement

The mistake that wastes an evening

A few settings are consumed before server.cfg is ever read, so they only work as launch parameters. The map the server starts on is the usual one. The tell is a setting that works typed into the console yet does nothing from the file.

Rather not run the server yourself?

These tools are free and funded by the two hosting services we run. If you want a server that is already set up, here they are.

Advertisement