VGKAMI
Advertise Get listed

Game Guides

How to Make a CS2 Server: Step-by-Step Setup Guide

October 26, 2026 16 min read

You can make a public or private Counter-Strike 2 server by installing Steam app 730 with SteamCMD, creating a Steam Game Server Login Token (GSLT), configuring server.cfg, forwarding the game port, and launching the executable with the -dedicated flag. The same installation works on 64-bit Linux or Windows. For planning, allow about 60–65 GB for the initial files plus headroom; a published 10–32-player VPS example uses 4 vCPUs, 8 GB RAM and 80 GB of disk, but no source guarantees a particular player count on that hardware.

This guide covers a home computer and a VPS, including the exact install commands, token handling, ports, game-mode flags, testing, persistence, updates and the common reasons a server is not reachable.

What do I need before making a CS2 server?

You need a 64-bit Windows or Linux machine, administrator access, enough disk space, a public IP address or a router you can configure, and a way to allow inbound traffic. Decide first whether the server is for a few friends on your home network, a public Internet server, or a continuously available service on a VPS.

Hardware and operating-system checklist

  • Use a supported 64-bit installation of Windows or a current 64-bit Linux distribution. The commands below use Ubuntu-style paths for Linux and PowerShell paths for Windows.
  • Reserve at least 80 GB of free disk space for a comfortable initial installation. Valve’s dedicated-server files are reported at about 65 GB, while another guide describes roughly 60 GB before adding workshop maps; both figures are planning references, not a fixed requirement. See the storage guidance from LochStudios and TheCrewHost.
  • Use a wired connection to the router when possible for a home host. A wired link is optional for a VPS, which is already in a data center.
  • For a VPS, choose a region close to your players and confirm that you receive a public IPv4 address and can control both the provider firewall and the operating-system firewall.
  • Have a separate directory for launch scripts, configuration backups and administrative files. Keeping those files outside the game tree makes updates and reinstalls safer.

Home computer or VPS?

A home server avoids a monthly hosting bill but requires router forwarding, a stable private address, local firewall rules and a computer that remains powered on. A VPS gives you a public address and data-center connectivity, but you are responsible for operating-system updates, firewall policy, storage and recovery. Managed game hosting can reduce administration, but compare the provider’s CPU performance, RAM and disk headroom, location, IPv4 and port control, DDoS protection, snapshots, reboot automation, workshop or plugin support and support quality before committing.

Which hardware should I choose for 10 to 32 players?

Use the published specifications as a starting point rather than a performance guarantee. A current VPS tutorial uses 4 vCPUs, 8 GB of RAM and an 80 GB disk for a 10–32-player example, while another guide reports a 2 GB published minimum and practical tiers between 4 and 16 GB of RAM. There is no controlled player-count benchmark in the available documentation.

Planning item Reference figure How to interpret it
Initial game files About 60–65 GB Allow more for updates, logs and workshop maps; figures are reported by 2026 guides, not a guarantee of the final install size.
Free disk recommendation At least 80 GB Provides headroom over the initial files and is the disk size in the 10–32-player VPS example.
Published memory minimum 2 GB RAM A minimum reference is not a sensible target for a busy public server or for running other services.
Example VPS 4 vCPU, 8 GB RAM, 80 GB disk An example configuration for 10–32 players; actual capacity depends on tick workload, maps, plugins and other processes.

Prioritize strong single-core CPU performance and free memory rather than choosing a plan solely by its advertised player count. Leave room for the operating system, SteamCMD updates, map downloads and logs. If players experience simulation or connection problems, measure CPU and memory use while the server is busy instead of assuming that adding disk space will solve it.

How do I install the CS2 dedicated server with SteamCMD?

Install SteamCMD in a writable directory, select an absolute game-install path, log in anonymously and download app 730. Counter-Strike 2’s client and dedicated server are distributed together under app ID 730; app 740 is the older CS:GO packaging and is the wrong target. The merged packaging is documented by ForgeWorld Gaming.

Linux installation

  1. Install SteamCMD using your distribution’s package method or Valve’s SteamCMD download, then note its real path. Create a directory owned by the account that will run the server, for example /home/you/cs2-ds.
  2. Start SteamCMD and use an absolute install path:
force_install_dir /home/you/cs2-ds/
login anonymous
app_update 730 validate
quit
  1. Wait for SteamCMD to report a successful completion before trying to launch the server. The first install can take substantial time because the download is tens of gigabytes.
  2. For later updates, stop the running server and use app_update 730 without validate. Reserve validation for the initial install or suspected corruption because validation can replace customized files.

Windows installation

  1. Download and extract SteamCMD to a directory such as C:steamcmd. Create a separate game directory such as C:cs2-ds and ensure the account running the process can write there.
  2. Run SteamCMD and enter an absolute Windows path, using the same app ID:
force_install_dir C:cs2-ds
login anonymous
app_update 730 validate
quit

Do not install into a protected location where Windows permissions prevent SteamCMD from writing updates. Keep the path consistent with the path in your launch script; a mismatch is a common reason for starting an old or incomplete copy.

How do I prepare the Steam library on Linux?

After SteamCMD downloads the files, create the Steamworks SDK library path and link the client library that the server expects. Use the actual SteamCMD location and the home directory of the non-root account that will launch CS2.

mkdir -p ~/.steam/sdk64
ln -sfn ~/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so

If your SteamCMD directory is elsewhere, replace ~/steamcmd with that absolute or home-relative path. Launch from the installed game/cs2.sh script; it applies the required library setup described in the Linux instructions from LochStudios. Running the service as a dedicated, non-root account limits the damage from a misconfiguration or compromised plugin.

How do I create and protect a CS2 Game Server Login Token?

A public Internet server needs a Game Server Login Token for App ID 730. Create it in Steam’s Game Server Account Management, select app 730, and pass the resulting token with +sv_setsteamaccount when launching the server.

  1. Open Steam Game Server Account Management while signed in to the account that will own the server.
  2. Create a token for App ID 730. Do not select the legacy app 740.
  3. Copy the token into a protected environment variable, private launch script or service configuration. Never publish it in a tutorial snippet, commit it to a repository or paste it into a support ticket.
  4. Create a separate token for every running public server. If you rotate or revoke one, update the corresponding launch configuration before restarting.

The token is a credential, not a server name or password. A server can start without one for local testing, but a public server should include it so Steam can authenticate the instance. The token requirement and launch parameter are described in ForgeWorld Gaming and LochStudios.

How do I configure server.cfg and the game mode?

Put general server behavior in game/csgo/cfg/server.cfg, then choose the mode, map and player limit on the launch line. Use mode-specific gamemode_*_server.cfg files for settings that should apply only when a particular mode loads.

Create the main configuration

Create or edit /home/you/cs2-ds/game/csgo/cfg/server.cfg on Linux, or the equivalent gamecsgocfgserver.cfg path on Windows. A minimal private configuration might look like this:

hostname "Friends' CS2 Server"
rcon_password "replace-with-a-long-secret"
sv_password "replace-with-a-player-password"

Replace both example secrets before use. Do not reuse an administrative password, and do not paste real credentials into public documentation. If you want an open public server, omit sv_password rather than leaving a known example value.

Select a mode and map

Pass +game_type, +game_mode and +map after the executable flags. Competitive, casual, wingman and deathmatch use different type/mode combinations; verify the aliases in the current game files because Valve can change mode definitions. The launch examples below use a commonly documented competitive-style pair, but the pair must match the mode you actually want.

Use +exec server.cfg explicitly so the file loads on startup. Keep custom configuration, admin files and launch scripts outside the install directory as backups, then copy or reference them deliberately after an update. Configuration and mode-file locations are covered in TheCrewHost and ForgeWorld Gaming.

Which ports does a CS2 server use?

Allow and forward UDP 27015 for normal game traffic. Allow TCP 27015 only when you use RCON; Steam documents UDP 27015 as the default gameplay port and TCP 27015 as the default SRCDS RCON port in its Required Ports for Steam reference.

Home-network rules

  1. Reserve a fixed private address for the server computer in the router’s DHCP settings, or configure a static address on the host.
  2. Create a router port-forward rule from UDP 27015 on the public interface to the server’s private address and the same UDP port.
  3. If using RCON, add a separate TCP 27015 rule to that same private address. Do not expose RCON unless you have a strong password and need remote administration.
  4. Allow the same protocol and port in the host firewall. A router rule alone does not override Windows Firewall or Linux firewall policy.
  5. Give friends your public IPv4 address and port, not the private address used inside your LAN.

Steam’s router guidance explains the forwarding concept in more detail at Configuring a Router for use with a Half-Life or Source Dedicated Server. Test from a connection outside your home network; a test from the same LAN can succeed even when Internet forwarding is wrong.

VPS firewall rules

Add an inbound UDP 27015 rule in the provider firewall and an equivalent rule in the operating-system firewall. Add TCP 27015 only for RCON. CSTV, Steam networking features and other add-ons may require additional ports; open only the ports required by the feature you enable, and document each rule so it can be removed later.

How do I launch a dedicated CS2 server on Linux?

Run the Linux wrapper with -dedicated. Without that flag, the executable can launch the ordinary game client instead of a server. Change the token, mode, map and player limit to your own values.

cd /home/you/cs2-ds/game
./cs2.sh -dedicated -port 27015 -maxplayers 10 -usercon 
  +sv_setsteamaccount YOUR_TOKEN +game_type 0 +game_mode 1 +map de_dust2 
  +exec server.cfg
  • -dedicated selects server mode.
  • -port 27015 selects the UDP and, when enabled, RCON port.
  • -maxplayers 10 sets the ceiling for this process; choose a value your hardware can sustain.
  • -usercon enables the user-console/RCON path. Keep TCP access restricted if you use it.
  • +sv_setsteamaccount YOUR_TOKEN supplies the GSLT for a public server.
  • +game_type, +game_mode and +map select the initial ruleset and map.
  • +exec server.cfg loads your saved settings.

The Linux executable path and required dedicated flag are documented in the launch instructions at ForgeWorld Gaming.

How do I launch a dedicated CS2 server on Windows?

Use the Windows 64-bit executable with the same logical flags. Open PowerShell, change to the installed directory and keep the token private.

cd C:cs2-dsgamebinwin64
.cs2.exe -dedicated -port 27015 -maxplayers 10 -usercon `
  +sv_setsteamaccount YOUR_TOKEN +game_type 0 +game_mode 1 +map de_dust2 `
  +exec server.cfg

PowerShell uses the backtick at the end of a line for continuation. You can put the command on one line if a copied script loses the continuation characters. If the console closes immediately, launch from an existing PowerShell window so you can read the error, then check the install path, permissions, missing libraries and firewall rules.

How do I test that the server is reachable?

First confirm that the process remains running and that the console shows no fatal startup error. Then connect from a CS2 client using the developer console:

connect PUBLIC_IP:27015
  1. Enable the developer console in the CS2 client settings if it is not already enabled.
  2. Open the console and replace PUBLIC_IP with the server’s public address. Include a non-default port if you changed -port.
  3. Test from outside the server’s LAN. Ask a friend on another network to connect, or use a separate Internet connection.
  4. If the connection fails, check the server process, the host firewall, the router or provider firewall, the forwarding destination and the address your friends are using.

A successful local connection proves only that the process is listening. It does not prove that the public route, NAT rule or provider firewall is correct.

How do I keep the server running after I close the terminal?

Use screen or tmux for an initial test, then move to systemd or another service manager for automatic restart and boot recovery. Run the service under a dedicated non-root account.

Quick persistent session

On Linux, start a named session before running the launch command:

tmux new -s cs2
cd /home/you/cs2-ds/game
./cs2.sh -dedicated -port 27015 -maxplayers 10 -usercon 
  +sv_setsteamaccount YOUR_TOKEN +game_type 0 +game_mode 1 +map de_dust2 
  +exec server.cfg

Detach with the tmux detach key sequence without stopping the process, then reattach later with tmux attach -t cs2. The equivalent screen workflow is also suitable. This is useful for verifying the command before introducing service-manager files.

Service-manager operation

Once the command works, put it in a controlled service definition with the working directory, account, restart policy and environment for the token. Configure the service to start after networking is available and to write logs where you can inspect them. Keep the unit definition and launch script outside the game install tree, and test a manual stop/start cycle before relying on automatic recovery.

How do I update CS2 without breaking my configuration?

Stop the server cleanly, update app 730, verify custom content, and restart with the same saved command. Routine updates use app_update 730; do not run SteamCMD against files that the server is actively using.

  1. Announce a maintenance window and stop the process or service.
  2. Back up server.cfg, mode-specific configuration, admin files, launch scripts and any custom map or plugin data. Store the backup outside the game directory; a snapshot or cloud-backup category can provide an additional recovery copy.
  3. Run SteamCMD:
force_install_dir /home/you/cs2-ds/
login anonymous
app_update 730
quit
  1. Check that plugins, workshop maps and custom scripts still support the new game build. If a plugin causes a crash, remove it temporarily and test the unmodified server.
  2. Restore or reference your saved configuration, then restart with the unchanged token, port, mode and map flags.
  3. Connect as a player and inspect the console before declaring the update complete.

Use app_update 730 validate only for a first install or suspected corruption. Validation can overwrite customized files, so a backup is essential. The update and backup workflow is also described in TheCrewHost and ForgeWorld Gaming.

Why can nobody connect to my CS2 server?

Most failures are caused by a stopped process, an incorrect public address, a missing UDP rule, a wrong forwarding destination or a second firewall blocking the packet. Check the path in order instead of changing several settings at once.

The process exits immediately

  • Confirm that you used -dedicated and launched the correct Linux wrapper or Windows executable.
  • Verify that the working directory is the installed game directory and that the account can read and write it.
  • Check for a typo in the token, map name or mode flags. Temporarily remove optional plugins and custom launch arguments to isolate the failure.
  • On Linux, confirm the ~/.steam/sdk64/steamclient.so link points to the SteamCMD library.

Friends see a timeout

  • Confirm that the server is listening on the chosen port and that friends are using the public IP, not a private address such as 192.168.x.x.
  • Check UDP 27015 in the host firewall, router or provider firewall and the forwarding rule. If you changed -port, change every matching rule and the connection command.
  • Test from a truly external network. Hairpin NAT can make a same-house test misleading.
  • If a home connection has no usable public address or does not allow inbound forwarding, a VPS or managed host may be required.

Players connect but RCON does not

RCON requires TCP 27015 in addition to the UDP gameplay rule, and the process must include -usercon. Check that the RCON password is set in server.cfg, that TCP is allowed only from trusted administrator addresses where possible, and that the client is targeting the correct port.

The server appears to be LAN-only

Recheck the GSLT and public launch flags, then inspect the server console for authentication or networking errors. A missing token can prevent a public listing even when local connections work. Use a separate token for each simultaneously running public instance.

What are the trade-offs between home hosting, a VPS and managed hosting?

Home hosting is cheapest when you already own suitable hardware, a VPS offers control and a public address, and managed hosting exchanges some control for less routine administration. The right choice depends on uptime expectations and whether you want to maintain the operating system yourself.

Decision factor Home computer VPS Managed game host
Upfront versus recurring cost Uses existing hardware and Internet service; electricity and bandwidth still matter. Recurring infrastructure cost with selectable CPU, RAM and disk. Recurring fee that may bundle the control panel and support.
Setup and maintenance You handle router, firewall, OS and power interruptions. You handle OS updates, firewall, backups and server software. Provider may handle platform maintenance; read exactly what is included.
Performance Depends on your CPU’s single-core speed and other household workloads. Look for dedicated or predictable CPU performance and sufficient RAM. Check whether CPU resources are shared and how limits are enforced.
Network control Requires router forwarding and a reachable public connection. Usually includes a public address and configurable provider firewall. Verify port choices, IPv4 availability and geographic locations.
Resilience Power, ISP outages and reboots are your responsibility. Snapshots and reboot automation may be available as separate features. Ask about backups, DDoS mitigation, recovery time and support coverage.
Customization Full access to files, plugins and workshop content. Full operating-system access subject to the provider’s terms. Confirm plugin, workshop-map and configuration access before purchase.

For a short private session, a home machine and a temporary tmux session are usually sufficient. For a public community server that must survive a reboot, choose a setup with a fixed public address, automated service restart and a tested backup path.

How should I secure and operate the server?

Keep credentials private, minimize exposed ports and make recovery repeatable. Operational discipline matters as much as the first download.

  • Run CS2 and SteamCMD under a dedicated non-root account.
  • Use a long, unique RCON password and restrict TCP access to trusted administrator addresses when the firewall supports source filtering.
  • Do not publish the GSLT, commit it to source control or include it in screenshots and public support posts.
  • Back up configuration and administrative files before every update; keep at least one copy outside the server machine.
  • Record the exact launch command, port, map rotation and mode settings so another administrator can restart the process.
  • Monitor disk space because updates, logs and workshop maps grow beyond the initial 60–65 GB planning figure.
  • After a reboot, verify that the service starts, the token authenticates, the port is reachable and a client can load a map.

With app 730 installed, a protected GSLT, matching firewall rules and a repeatable launch command, the server is ready for friends or public players. Treat the hardware figures as capacity planning, not a promise: observe CPU, memory, network and disk use under your own player load and adjust the plan when those measurements show a limit.

Frequently Asked Questions

Can I run a CS2 server and play CS2 on the same PC?

Yes, provided the machine has enough CPU, memory and disk headroom for both processes. Expect the server’s available capacity to fall while you play, and test with the intended player count rather than relying on the published minimum memory figure.

Can I change the default CS2 server port?

Add a different value to the -port launch argument, then use that same value in the router or provider firewall, host firewall and the client’s connect command. Every layer must match; changing only the launch line makes the server appear unreachable.

Why does adding workshop maps require more storage?

The commonly cited 60–65 GB figures describe the initial server files, before workshop content and future updates. Downloaded maps are additional files, so leave disk headroom and monitor free space instead of treating 80 GB as a permanent ceiling.

What happens if my GSLT is exposed?

Treat an exposed token as compromised: revoke or replace it in Steam Game Server Account Management, update the protected launch configuration and restart the affected server. Use a different token for each public instance so one leak does not identify every server you operate.