To make a public Counter-Strike 2 server, install the dedicated-server files with SteamCMD app ID 730, create a Steam Game Server Login Token for that app, place your durable settings in game/csgo/cfg/server.cfg, launch the server with -dedicated, and forward the launch port on both TCP and UDP. The default port is 27015. A Windows or Linux machine can host the server, but public players also need a reachable public address, correct router forwarding, and firewall rules.
This guide covers a first installation, token creation, configuration, launch commands, port testing, browser visibility, safe updates, and the failures that most often prevent players from joining.
What do I need before making a Counter-Strike 2 server?
You need a Windows or Linux machine where you have permission to install SteamCMD, write files, run a long-lived process, and change firewall rules. For an Internet-facing server, that machine must have a reachable public address, or your router must forward traffic to it. A VPS is an alternative when you want a persistent host without keeping a home computer powered on and maintaining its network.
- A supported Windows or Linux host with enough CPU, memory, storage, and network capacity for the players you expect.
- SteamCMD installed for that operating system.
- A writable, absolute installation directory such as
/home/you/cs2-ds/orC:cs2-ds. - A Steam account that meets Steam’s requirements for a Game Server Login Token.
- Router and host-firewall access if the server will be public.
- The Counter-Strike 2 map and mode you want to start.
Self-hosting gives you direct administrative access and avoids a separate hosting control panel, but you are responsible for uptime, operating-system maintenance, backups, updates, and network troubleshooting. A VPS shifts the physical-machine work to a provider; compare its public IPv4 or IPv6 availability, CPU and memory headroom, geographic latency, DDoS protections, backup options, update automation, mod support, and administrative access before choosing one. The available setup guidance does not establish universal monthly prices, performance benchmarks, or uptime guarantees, so treat those as provider-specific questions rather than assumptions.
Which SteamCMD app ID installs the CS2 dedicated server?
Use app ID 730. It is the current Counter-Strike 2 dedicated-server content ID; do not use the old CS:GO dedicated-server ID. Set the install directory before logging in, then download and validate the first installation.
Linux or macOS-style SteamCMD command sequence
Run these commands inside SteamCMD, replacing the path with an absolute directory you control:
force_install_dir /home/you/cs2-ds/
login anonymous
app_update 730 validate
quit
force_install_dir determines where the server files are written. The anonymous login is sufficient for downloading the dedicated content. The first app_update uses validate so SteamCMD checks the downloaded files before it exits.
Windows installation path
On Windows, use an absolute Windows path, for example:
force_install_dir C:cs2-ds
login anonymous
app_update 730 validate
quit
Keep the directory consistent: later updates must target the same location, or SteamCMD will create a second installation that your launch command does not use. When SteamCMD reports completion, confirm that the directory contains the server executable and the game tree before moving on.
How do I create a Steam Game Server Login Token?
A public server needs a Steam Game Server Login Token, commonly called a GSLT, for app ID 730. While signed in to the Steam account that will own the server, open Steam’s Game Server Account Management page, create a token for app 730, and copy it into a password manager or another private store.
Steam requires an eligible account. The account requirements shown on the management page include no community ban or lock, no limited status, a qualifying registered phone, and ownership of the game. Steam also warns: You are solely responsible for these tokens.
Do not post a token in a forum, paste it into a public script repository, or send it to another administrator unless you are prepared to revoke and replace it.
Unused tokens can expire after a long period. Resetting the Steam account password regenerates the tokens associated with that account, so a server that suddenly stops authenticating after a password change may need the newly generated value. If the account page refuses to create a token, resolve the account-status requirement first; changing launch parameters will not bypass it.
How should I configure server.cfg?
Create or edit game/csgo/cfg/server.cfg inside the dedicated-server installation. Put settings that should survive restarts in this file rather than typing them manually every time the process starts.
A minimal baseline
hostname "My CS2 Server"
sv_lan 0
sv_logfile 1
game_alias competitive
hostnameis the name players see in server listings and connection details.sv_lan 0marks the server as Internet-capable instead of LAN-only.sv_logfile 1enables server log-file writing.game_alias competitiveselects the competitive preset.
Change the hostname to something recognizable and choose the alias that matches your intended rules. The documented aliases are competitive, casual, wingman, deathmatch, and custom; each selects its corresponding game-type and mode preset.
Why can a setting in server.cfg appear not to work?
Mode-specific configuration files can load after or alongside server.cfg and override a value. If a setting reverts, inspect the mode-specific files for a later assignment before changing the launch command. Keep one intentional value in the file that actually wins, and restart the server after edits so you are testing a clean configuration.
What launch command starts a CS2 dedicated server?
Start the executable from the installation directory with -dedicated. Add the token, a starting map, the selected port, and the configuration file. The examples below use port 27015 and the competitive alias.
Linux launch command
./cs2.sh -dedicated -port 27015 +sv_setsteamaccount YOUR_TOKEN +game_alias competitive +map de_dust2 +exec server.cfg
Run it as the same account that owns the files and any Steamworks libraries. Replace YOUR_TOKEN with the private GSLT; do not include angle brackets or quotation marks around it unless your shell requires them for a special value.
Windows launch command
.cs2.exe -dedicated -port 27015 +sv_setsteamaccount YOUR_TOKEN +map de_dust2 +exec server.cfg
Run the executable from a terminal rather than double-clicking it. A terminal keeps initialization and authentication errors visible while you test.
What does each argument do?
| Argument | Purpose |
|---|---|
-dedicated |
Runs the executable as a headless dedicated server. |
-port 27015 |
Selects the game and query port; replace 27015 if you have a deliberate reason to use another port. |
+sv_setsteamaccount YOUR_TOKEN |
Supplies the Steam Game Server Login Token used for public authentication. |
+game_alias competitive |
Chooses the competitive game preset; other documented aliases are casual, wingman, deathmatch, and custom. |
+map de_dust2 |
Loads the first map when the process starts. |
+exec server.cfg |
Executes the persistent configuration file after launch. |
You can put the alias in server.cfg and omit the command-line version, but using it on the launch line makes the intended startup mode obvious while troubleshooting. If you select a different port, every network rule and connection test must use that same number.
Which ports must I forward for a public server?
Forward the port supplied with -port on both TCP and UDP. The default dedicated-server port is 27015 TCP and UDP; it carries gameplay traffic, server-list pings, and RCON in the standard setup.
- Create a router forwarding rule from the public port to the host machine’s local IP address.
- Allow the same TCP and UDP port in the host operating system’s firewall.
- Confirm that the launch command uses that port, for example
-port 27015. - Check that no second process is already listening on the port.
Optional features such as SourceTV, client functions, or Steam networking can require additional ports. Add those only when you enable the corresponding feature and follow its documented port requirements. Do not forward a random range and assume it will compensate for a mismatch: the router rule, firewall rule, launch line, and connection test must agree.
How do I test the server before inviting players?
First watch the startup console for file, token, map, and binding errors. Then test from outside the host’s LAN; a connection from the same home network can succeed even when the public route is broken.
- Find the public address that players will use.
- From the CS2 developer console on a separate Internet connection, enter
connect PUBLIC_IP:27015, replacing the port if you selected another one. - Join the map and verify that the hostname, mode, logs, and basic movement work.
- Ask a player on a different network to repeat the connection test.
If the direct connection works but the server is absent from the public browser, treat those as separate problems. Verify the GSLT, sv_lan 0, public addressing, and browser filters before changing unrelated gameplay settings.
Why can players not connect to my CS2 server?
The process starts, but nobody can join
Check that the launch line contains a valid GSLT and that the token has not been reused incorrectly. Confirm that sv_lan 0 is active and that the router and firewall forward both protocols to the host’s current local address. A DHCP address change can silently point an old forwarding rule at the wrong computer.
The server is missing from the browser
Use a direct connect test first. If direct connection fails, fix public reachability and port forwarding. If it succeeds, verify the token, LAN setting, public address, and browser filters; a listing problem does not necessarily mean the game process is unhealthy.
Linux reports a Steamworks or steamclient.so error
The setup reference reports missing steamclient.so errors on Linux. Correct the Steam SDK symlink for the account running the server, then restart from the same account and installation directory. Keep the terminal open so you can see whether the library initializes on the next attempt.
Windows reports a Steamworks initialization error
Install Steam on the host and run the server executable from a terminal. The visible console output usually identifies the initialization failure more clearly than a double-clicked process that closes immediately.
My settings revert after launch
Inspect mode-specific configuration files for a later override. Confirm that the command really executes server.cfg, that the file is in game/csgo/cfg/, and that the line uses the correct spelling and value. Restart after each controlled change so an old process is not masking the result.
How do I update a CS2 dedicated server safely?
Stop the running server before updating, then target the same installation directory with SteamCMD. Routine updates use app_update 730 without validation:
force_install_dir /home/you/cs2-ds/
login anonymous
app_update 730
quit
On Windows, substitute the same absolute path used for the original installation. Start the server again after SteamCMD finishes and read the console for errors before announcing that it is available.
Use validate for the first installation or when files appear damaged. Validation compares files with Steam’s defaults and can overwrite customized files, so running it on every update risks replacing deliberate changes. Keep backups of server.cfg and any other files you customize, especially before a repair operation.
Should I self-host at home or use a VPS?
Choose a home machine when you already have a stable public connection, can configure forwarding and firewall rules, and want complete control without a recurring host-management layer. Choose a VPS when you need a persistent server, a datacenter location closer to your players, or a host that remains online while your home computer is off.
- Network reachability: verify that the home connection or VPS supplies a usable public IPv4 or IPv6 address and permits the selected TCP and UDP port.
- Capacity: leave CPU and memory headroom for the operating system and any other services rather than allocating every resource to the game process.
- Latency: select a geographic location close to the players who will actually connect.
- Protection: ask what DDoS mitigation and traffic filtering are included; do not assume every VPS has equivalent protection.
- Operations: decide who performs updates, backups, firewall changes, and recovery when the process stops.
- Administration: confirm that you retain the shell or desktop access needed to inspect logs, edit configuration, and restart the server.
The game-server procedure is the same on either platform: app 730, a valid token, a persistent configuration, a matching port, and a remote connection test. The hosting choice changes who supplies the machine and network, not the CS2 launch requirements.
What should I check before calling the server finished?
- SteamCMD downloaded app 730 into the intended absolute directory.
- The account can create and use a token for app 730, and the token is stored privately.
server.cfgcontains the hostname,sv_lan 0, logging, and the intended game alias.- The launch command includes
-dedicated, the token, a map, the selected port, and+exec server.cfg. - The router forwards the selected port to the host, and the host firewall allows both TCP and UDP.
- A player outside the host’s LAN can use
connect PUBLIC_IP:PORT. - The browser listing is checked separately from direct connectivity.
- Backups exist before updates or file validation.
Frequently Asked Questions
How many game-server accounts can one Steam account create?
Steam’s Game Server Account Management page currently allows up to 1,000 game-server accounts per Steam account. That limit does not remove the eligibility requirements for creating tokens or the responsibility to keep each token private.
What happens to my server tokens after I reset my Steam password?
Steam regenerates the tokens associated with the account after a password reset. Replace the value in your launch command or secret store with the newly generated token before restarting the server.
How long can an unused CS2 login token remain valid?
Steam warns that a token left unused for a long period can expire, but the management page does not provide a universal number of days. If an old server is being brought back online, generate or verify a current token instead of assuming the original value is permanent.
Can I repair a broken installation by running SteamCMD validation every time?
You can use validation when the initial download is incomplete or files appear damaged, but it is not a routine-update command. Validation may replace customized files with Steam’s defaults, so back up your configuration and prefer a normal app_update 730 for ordinary updates.