Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

The GSLT token and sv_setsteamaccount

According to Valve's documentation (Valve Developer Community), players can only join your server if it is launched with a Game Server Login Token (GSLT), a token that ties it to a Steam account.

  1. Open Steam's game server management page, steamcommunity.com/dev/managegameservers, logged in to the account that will own the server. It must not be limited and must have a registered phone number.
  2. Enter 730 as the app ID (the ID of Counter-Strike 2, client and server alike) and a memo to recognise the server, then create the token.
  3. Pass it to the server on its launch line, as in Valve's example: +sv_setsteamaccount VOTRE_JETON.
  • One token per server: a token only works for one server at a time. Create one per instance.
  • Keep it private, like a password: it is tied to your Steam account. If it has leaked, replace it from the same page, then update the launch line.
  • Without a token, the server starts, but players cannot join it.

The full installation (SteamCMD, systemd service, updates) is in the guide create a Counter-Strike 2 server.

02

Choose the game mode: game_type and game_mode

The mode is set with two variables, game_type and game_mode, or in one go with game_alias. The values given by Valve:

  • Competitive (the default mode): game_type 0, game_mode 1, or game_alias competitive;
  • Casual: game_type 0, game_mode 0, or game_alias casual;
  • Wingman (2 versus 2): game_type 0, game_mode 2, or game_alias wingman;
  • Deathmatch: game_type 1, game_mode 2, or game_alias deathmatch;
  • Custom: game_type 3, game_mode 0, or game_alias custom.

On the launch line, on Linux, put the mode before the map:

./cs2.sh -dedicated -port 27015 -maxplayers 10 +game_type 0 +game_mode 1 +map de_dust2 +sv_setsteamaccount VOTRE_JETON

To change mode while the server runs, from its console, Valve advises reloading a map after changing the values:

game_alias deathmatch
map de_mirage

Useful launch options: -port (game and query port), -maxplayers (number of slots), -ip (listen address, if the machine has several). The -insecure option disables VAC, Valve's anti-cheat: do not use it on a public server.

03

The server.cfg file

The game/csgo/cfg/server.cfg file holds the settings specific to your server. The one shipped with the game only contains a comment line: replace it, for example:

hostname "CS2 FR | Competitif"
sv_password ""
rcon_password "un-long-mot-de-passe-unique"
sv_lan 0
sv_logfile 1
  • hostname: the name shown in the server list.
  • sv_password: the password players must enter. Leave the quotes empty for a public server.
  • rcon_password: the remote console (RCON) password. Leave it empty if you manage the server over SSH or through a plugin; otherwise make it long and unique, as it gives control of the whole server.
  • sv_lan: 0 for an Internet server. At 1, the server switches to local network mode, without Steam authentication.
  • sv_logfile: 1 writes server information to a log file.

Do not put the GSLT token in this file: Valve passes it on the launch line. And since server.cfg is one of the game's files, an update run with validate may restore it to its original state: keep a copy of your version outside the game folder.

04

The gamemode_*.cfg files and their _server versions

Each mode has its rules file in game/csgo/cfg/: economy, round time, number of rounds, warmup, bots. The gamemode_competitive.cfg file sets, for example, mp_maxrounds 24, mp_freezetime 15 and mp_warmuptime 120.

The game's gamemodes.txt file lists which files run when a mode starts: first the mode's file, then its _server version.

  • Competitive: gamemode_competitive.cfg, then gamemode_competitive_server.cfg;
  • Casual: gamemode_casual.cfg, then gamemode_casual_server.cfg;
  • Wingman: gamemode_competitive2v2.cfg, then gamemode_competitive2v2_server.cfg;
  • Deathmatch: gamemode_deathmatch.cfg, then gamemode_deathmatch_server.cfg;
  • Custom: gamemode_custom.cfg, then gamemode_custom_server.cfg.

Do not edit the shipped files: updates replace them. The _server files are not shipped with the game: create the one for your mode and put your rules in it. Since it runs after the mode's file, its values win. Example for a competitive server without bots and with a one-minute warmup:

// game/csgo/cfg/gamemode_competitive_server.cfg
bot_quota 0
mp_warmuptime 60

To check that a setting applies, change map, then type its name alone in the server console (for example mp_warmuptime): it shows the value in force. To go further (retakes or admin plugins), see CounterStrikeSharp on CS2.

05

Port 27015 and firewall

The -port parameter sets both the game port and the query port, 27015 by default. On a Linux VPS with ufw:

sudo ufw allow 27015/udp
  • RCON uses port 27015 over TCP. Keep it closed if you manage the server over SSH (see connecting to a VPS over SSH); otherwise, open it only to your IP address.
  • Spectator broadcasting (CSTV, with tv_enable 1) also uses port 27020 over UDP.
  • Several servers on one machine: give each one its own -port, configuration folder and GSLT token. The logic is explained in game server ports.

If players cannot see the server, check in this order: the token (missing, already in use or deleted), sv_lan 0, the UDP port being open, then the server version: after a Valve update, a server that lags behind turns away up-to-date players.

06

On CloudFive

CloudFive has no ready-made Counter-Strike 2 plan: the server is installed on a VPS, with the method in this guide and the installation guide. Our VPS for game servers, from €5.99 per month, provide:

  • an AMD Ryzen 9 9950X, useful for a server that runs most of the match on one core, with DDR5 memory and NVMe storage;
  • root access and a dedicated IPv4 address;
  • basic anti-DDoS protection included; Premium Protection, with a game-specific filter, is a paid option (see protecting a game server from DDoS);
  • servers in France, monthly with no commitment, with support in French 7 days a week.

Valve requires at least 65 GB of disk: choose a plan with enough storage for the game and its updates. The guide which VPS for a game server helps you choose.

07

Frequently asked questions

How do I get a GSLT token for Counter-Strike 2?

On the steamcommunity.com/dev/managegameservers page, logged in to a non-limited Steam account with a phone number, create a token with app ID 730. Then pass it to the server with +sv_setsteamaccount on the launch line, one token per server.

Which game_type and game_mode values for each mode?

Competitive: 0 and 1. Casual: 0 and 0. Wingman: 0 and 2. Deathmatch: 1 and 2. Custom: 3 and 0. game_alias sets both at once, for example game_alias wingman.

Where should I put my match rules on a CS2 server?

In the gamemode_<mode>_server.cfg file in the game/csgo/cfg folder, for example gamemode_competitive_server.cfg. The game runs it after the mode's file, and updates do not replace it, unlike the shipped gamemode_*.cfg files.

Which port should I open for a Counter-Strike 2 server?

Port 27015 over UDP, configurable with -port, used for both gameplay and queries. RCON uses 27015 over TCP, to be opened only to your address, and CSTV broadcasting uses port 27020 over UDP.

Why does my setting in server.cfg not apply?

The mode's file, run when the mode starts, also sets most match rules (mp_maxrounds, mp_warmuptime…) and can replace your value. Put the rule in gamemode_<mode>_server.cfg, change map, then type the variable's name in the console to read its value.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay