Do you have a VPS or Dedicated Server and want to install game servers on it? For example, a Counter-Strike 2 Dedicated Server? Then you’re in the right place! Below, we explain step-by-step how to install such a service on your server.
To set up a Counter-Strike 2 server, SteamCMD is required. SteamCMD is the command-line version of the Steam client. With this tool, you can quickly and easily download dedicated server applications for popular Steam games. You can find SteamCMD on the official Valve developer page: https://developer.valvesoftware.com/wiki/SteamCMD.
Next, download the package. It contains the steamcmd.zip file, which must be extracted first. It’s recommended to create a dedicated folder to extract the files into. After extraction, you should see steamcmd.exe. Run this and wait until the installation process completes.
Once the message Loading Steam API.... OK appears, the process has finished successfully and you can start installing the Counter-Strike 2 server.
After installation, you should be able to run commands in the Steam command line (steamcmd.exe). You need to log in there using the user anonymous. Execute the following command: login anonymous
The next step is the installation. This is done with the command app_update 730. The app ID 730 stands for the Counter-Strike 2 Dedicated Server application.
Please be patient until the download finishes, as it may take some time for larger games. Once successful, a confirmation message will appear.
To make the server visible and accessible from outside, the server ports used must be allowed/forwarded in the firewall. Open the Windows Firewall settings.
In the settings, additional rules must be added. Click on inbound and outbound rules as described below and add them for the following ports: 27015-27020 for TCP/UDP protocols.
Up to this point, you have completed the basic installation of your Counter-Strike 2 server. Further server configurations can be done by editing the startup file. Navigate to your root directory. There you will find the cfg folder, where you can open the server.cfg file. You can adjust server options there.
../steamapps/common/cs2-ds/game/csgo/cfg/server.cfg
To allow other players to join your server, you must generate and embed a Game Server Login Token (GSLT). This token authenticates your server with Steam. To create a GSLT, visit http://steamcommunity.com/dev/managegameservers and generate a token with the Game ID 730, which stands for Counter-Strike 2.
Once you have the token, add it to your server startup parameters with +sv_setsteamaccount <TOKEN>.
Now for the main part: start your server. Switch to the main game directory and run the following start command:
.\cs2.exe -dedicated +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +map de_dust2
In the command line window, you should now see logs indicating that the start was successful. Note that the first start may take longer as everything is being set up. Alternatively, you can connect directly by searching for [your_ip_address]:2456 in the lower search bar of the server list.