Counter Strike 2

Counter Strike 2 is a legendary first-person shooter (FPS) game known for its intense multiplayer battles and strategic gameplay. Developed by Valve Corporation, Counter Strike 2 is a sequel to the highly acclaimed Counter-Strike series, offering enhanced graphics, new weapons, maps, and gameplay mechanics. Engage in thrilling team-based matches where you must choose between Counter-Terrorists and Terrorists as you compete to complete objectives or eliminate the opposing team.

Preview 1

Preview 2

Software Included

Package Version License
Counter Strike 2 13593156 Custom
LinuxGSM 24.1.4 MIT
SteamCMD 0~20180105-4:i386 Custom

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating a Droplet from the Counter Strike 2 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB Counter Strike 2 Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token) to an environment variable or substitute it in the command below.

curl -X POST -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer '$TOKEN'' -d \
        '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "sharklabs-counterstrike2"}' \
        "https://api.digitalocean.com/v2/droplets"

Getting Started After Deploying Counter Strike 2

Welcome to the Counter Strike 2 Droplet on DigitalOcean! This guide will walk you through the steps to set up and manage your own Counter Strike 2 server powered by LinuxGSM.

It is recommended to use 4GB RAM and 2 Cores Premium Intel Droplet size for the best experience.

Note: After Counter Strike Droplet is created, it will take ~5 minutes to initialise depending on the Droplet size. If you are getting Timed out errors - make sure to give your server a minute.

Access Your Server

  1. Once your Droplet is created, use an SSH client like PuTTY (Windows) or Terminal (macOS/Linux) to connect to your server using the provided credentials.

Initial Configuration

Counter Strike 2 Configurations

  1. Navigate to the Steam Game Server Account Management page here.
  2. Log in with your Steam account credentials.
  3. Click on “Create Token” to generate a new authentication token.
  4. Enter a description for your token (e.g., “Counter Strike 2 Server”).
  5. Use the App ID “730” which corresponds to Counter Strike 2.
  6. Click on “Create” to generate your unique token.
  7. Copy the generated token.
  8. Navigate back to your server’s terminal.
  9. Edit the server.cfg file located at /home/steam/serverfiles/game/csgo/cfg/cs2server.cfg in the Counter Strike 2 server directory.
  10. Add the following line to the server.cfg file, replacing your_token with the token you copied:
sv_setsteamaccount "your_token"
  1. You also update other server configurations in the server.cfg file to set game modes and the default map.
  2. Save and close the file.

Game Server Configurations

  • If you want to change the default port for the game server or override the startup options, edit the server.cfg file located at /home/steam/lgsm/config-lgsm/cs2server/cs2server.cfg.
  • Following predefined configurations can be updated:
defaultmap="map_name"
gamemode="game_mode"
maxplayers="42"
port="27015"
  • Add the following to override server start up options:
startparameters="-game nmrih -strictportbind -ip 91.121.72.41 -port 27015 +clientport 27017 +tv_port 27016 +map nmo_broadway +servercfgfile nmrih-server-1.cfg -maxplayers 8"

Note: Replace the start parameters with your own according to the supported Counter Strike 2 startup options

Game Modes

Here are some common game modes and their configurations:

Gametype Gamemode Gamemode Flags Skirmish ID Mapgroup
Arms Race 1 0 0 mg_armsrace
Boom! Headshot! 1 2 0 mg_skirmish_headshots
Classic Casual 0 0 0 mg_casualsigma, mg_casualdelta
Classic Competitive (Default) 0 1 0 mg_active, mg_reserves, mg_hostage, mg_de_dust2, …
Classic Competitive (Short Match) 0 1 32 mg_active, mg_reserves, mg_hostage, mg_de_dust2, …
Danger Zone 6 0 0 mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco)
Deathmatch (Default) 1 2 0 mg_deathmatch
Deathmatch (Free For All) 1 2 32 mg_deathmatch
Deathmatch (Team vs Team) 1 2 4 mg_deathmatch
Demolition 1 1 0 mg_demolition
Flying Scoutsman 0 0 0 mg_skirmish_flyingscoutsman
Hunter-Gatherers 1 2 0 mg_skirmish_huntergatherers
Retakes 0 0 0 mg_skirmish_retakes
Stab Stab Zap 0 0 0 mg_skirmish_stabstabzap
Trigger Discipline 0 0 0 mg_skirmish_triggerdiscipline
Wingman 0 2 0 mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke, mg_de_shortdust, mg_de_lake

Invite Players

  1. Share your server’s IP address and port with your friends and fellow gamers.
  2. They can connect to your server directly from the Counter Strike 2 client by entering the IP address and the port in the server browser.

Connect To The Server

  1. From the main menu click “Play” and then click the globe icon to open the community server browser.
  2. In the server browser window, you’ll see different tabs like “Internet,” “Favorites”, “History” and “Lan”.
  3. Navigate to the “Favourites” tab and click the “+” button and add your server-ip:port in the prompt and click “Add”.
  4. Click on the newly added server from the list to connect to it.

OR

From the developer console, run the following command:

connect <droplet-IP>:<port>

Note: Replace the droplet IP and port with your droplet IP and port. The default port for the server is 27015.

Managing Your Server

To manage your Counter Strike 2 run the following commands as steam user:

Running Commands

  • Start: ./cs2server start
  • Stop: ./cs2server stop
  • Restart: ./cs2server restart
  • Console: Allows you to view the live console of a server as it is running and allows you to enter commands; if supported. To exit the console, press CTRL+b d. Pressing CTRL+c will terminate the server. Command: ./cs2server console

Updating

  • Update: Checks for any server updates and applies them. The server will update and restart only if required. Command: ./cs2server update
  • Force Update: Bypasses the check and goes straight to SteamCMD update. Command: ./cs2server force-update
  • Validate: You can use the SteamCMD validate option when updating the server. Command: ./cs2server validate

Debugging

  • Details: Get all important and useful details about the server such as passwords, ports, config files, etc. Command: ./cs2server details
  • Debug: Use debug mode to help you if you are having issues with the server. Debug allows you to see the output of the server directly to your terminal allowing you to diagnose any problems the server might be having. Command: ./cs2server debug

Logs

  • Server logs are available to monitor and diagnose your server. Script, console, and game server (if available) logs are created for the server. Location: /home/cs2server/logs

Backup

  • Backup will allow you to create a complete tar bzip2 archive of the whole server. Command: ./cs2server backup

Monitor

  • LinuxGSM can monitor the game server by checking that the process is running and querying it. Should the server go offline LinuxGSM can restart the server and send you an alert. You can use cron jobs to set up monitoring. Command: ./cs2server monitor

Configure LinuxGSM

Documentation

Cronjobs

  • To automate LinuxGSM you can set scheduled tasks using cron jobs, to run any command at any given time. You can edit the crontab using the following: crontab -e

Recommended cron tasks:

*/5 * * * * /home/cs2server/cs2server monitor > /dev/null 2>&1
*/30 * * * * /home/cs2server/cs2server update > /dev/null 2>&1
0 0 * * 0 /home/cs2server/cs2server update-lgsm > /dev/null 2>&1

For more detailed and up-to-date information on Counter-Strike 2 game modes, visit the Valve Developer Community page.

Congratulations! You are now ready to embark on your Counter Strike 2 adventure with your very own dedicated server. Get ready to strategize, compete, and dominate the virtual battlegrounds with your friends and foes. Good luck, and may the best team emerge victorious!