Tools / Counter-Strike 2
CS2 server config generator
Choose a mode, a starting map, the slot count and the port. You get a launch line and a server.cfg to copy. Tokens and passwords are left as marked placeholders, and nothing you type leaves this page.
Generator
Your server
Output
Launch line
./game/bin/linuxsteamrt64/cs2 -dedicated -port 27015 -maxplayers 10 +game_type 0 +game_mode 1 +sv_setsteamaccount YOUR_GSLT_HERE +map de_dust2
One line. On a game panel, set the same values in the startup variables.
server.cfg
// server.cfg for My CS2 Server // Competitive: game_type 0, game_mode 1 (set on the launch line) // Save as game/csgo/cfg/server.cfg hostname "My CS2 Server" sv_lan 0 sv_cheats 0 sv_password "" // public server, no join password rcon_password "" // RCON off: an empty password refuses every RCON login tv_enable 0
Save as game/csgo/cfg/server.cfg.
Fill in on your own machine
This page has no field for secrets. After you paste the output into your server, replace each placeholder there:
- YOUR_GSLT_HERE
Generated in your browser. Nothing you enter here is sent or stored.
Method
How the output is put together
A Counter-Strike 2 server takes its shape from two places. The launch line sets things that must be known before the server starts: the port, the slot count, the mode, the Steam login token and the first map. The server.cfg file sets things that are applied once it is running: the name, the passwords and GOTV.
The mode is a pair of values, game_type and game_mode. The generator uses the pairs from our guide, How to Set Up a CS2 Server With Plugins:
- Competitive: game_type 0, game_mode 1
- Casual: game_type 0, game_mode 0
- Wingman: game_type 0, game_mode 2
- Deathmatch: game_type 1, game_mode 2
Slots are set with -maxplayers and the port with -port. A stock map loads with +map. A Workshop map loads by its numeric id with +host_workshop_map, and the line then also carries -authkey for a Steam Web API key. Turning on RCON adds -usercon and an rcon_password line. Turning on GOTV adds tv_enable and tv_port, on a port of its own.
Four values are secrets, so the generator never asks for them. It writes YOUR_GSLT_HERE, YOUR_STEAM_WEB_API_KEY_HERE, YOUR_RCON_PASSWORD_HERE and YOUR_SERVER_PASSWORD_HEREwhere they belong, and you replace them on your own machine. The binary path in the launch line is the Linux one, game/bin/linuxsteamrt64/cs2. On a game panel you usually do not paste the whole line: set the same values in the panel's startup variables.
FAQ
CS2 config generator: questions
Where do I get the Steam login token?
Create it on Steam's game server account management page using app ID 730. The Steam account must not be limited, must have a phone number attached and must own the game. Put the token where the launch line says YOUR_GSLT_HERE, or in the matching field in your panel. Use one token per server and keep it private.
Why does the generator not ask for my passwords or token?
A secret typed into a web page is a secret that page could keep. The generator has no field for the login token, the RCON password, the server password or the Steam Web API key. It writes a marked placeholder instead, and you replace it on your own server after pasting.
Where does server.cfg go?
Save it as game/csgo/cfg/server.cfg inside the server install. The server runs it on start and on every map change.
Why do my round and overtime settings reset after a map change?
Mode settings such as mp_maxrounds and mp_overtime_enable are applied by the gamemode cfg files, which run after server.cfg. Put mode-specific settings in the matching file, for example cfg/gamemode_competitive_server.cfg, and keep server.cfg for the server name, passwords and GOTV.
Do I need a second port for GOTV?
Yes. GOTV listens on its own port, 27020 by default, separate from the game port. If your host gives each server a single port, ask for a second one before you rely on spectators or demos.
Is anything I enter sent to Puranode?
No. The launch line and the config are built in your browser. The page makes no request with your inputs and stores nothing.
Need somewhere to run it?
Puranode hosts Counter-Strike 2 servers in the EU, with Metamod:Source and CounterStrikeSharp supported.