Do you have a VPS or Dedicated Server and want to install game servers on it? For example, a Counter-Strike: Source 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: Source 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 where you extract the file. In the end, you should see steamcmd.exe. Start it and wait until the installation process completes.
Once the message Loading Steam API.... OK appears, the process has completed successfully and you can begin installing the Counter-Strike: Source server.
After installation, you should be able to run commands in the Steam command line (steamcmd.exe). You need to log in there. Use the user anonymous. Run the following command: login anonymous
The next step is the installation. This is done with the command app_update 232330. The app ID 232330 corresponds to the Counter-Strike: Source Dedicated Server application.
Please be patient until the download finishes, as it can 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: Source server. Further server settings can be made by editing the startup file. Navigate to your root directory. There you will find the cfg folder, where you open the file server.cfg. Here you can adjust server options.
../steamapps/common/css-ds/cstrike/cfg/server.cfg
For other players to join your server, you need to generate and integrate 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 232330, which stands for Counter-Strike: Source.
Then add the token to your server start parameters with +sv_setsteamaccount <TOKEN>.
Now for the main part: start your server. Switch to the game’s main directory and run the following start command:
start srcds.exe -console -game cstrike -secure +maxplayers 22 +map de_dust +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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 server list search bar.
