Counter-Strike 2/Dedicated Servers: Difference between revisions
m (→Download the CS2 Dedicated server: Changed to 33GB as the decimal separator in English speaking countries is typically a point and not a comma (This could be interpreted as 32 thousand 7 hundred and 9 GB).) |
|||
Line 7: | Line 7: | ||
== Download the CS2 Dedicated server == | == Download the CS2 Dedicated server == | ||
{{note|The {{cs2|1|nt=0}} dedicated server and game client have been merged together (appid 730). Previously the {{csgo|1|nt=0}} client (appid 730) and dedicated server (appid 740) were separate. {{important|The total size of {{cs2|1}} download is approximately | {{note|The {{cs2|1|nt=0}} dedicated server and game client have been merged together (appid 730). Previously the {{csgo|1|nt=0}} client (appid 730) and dedicated server (appid 740) were separate. {{important|The total size of {{cs2|1}} download is approximately 33 GB}}}} | ||
This describes the process of installing/updating the CS2 dedicated server. These steps are required every time the game is updated. To automate this process for future updates, see [[SteamCMD#Automating SteamCMD]]. | This describes the process of installing/updating the CS2 dedicated server. These steps are required every time the game is updated. To automate this process for future updates, see [[SteamCMD#Automating SteamCMD]]. |
Revision as of 14:10, 8 November 2023
This page outlines how to setup and running an Counter-Strike 2 Dedicated Server.
Recommended system requirements
Download the CS2 Dedicated server


This describes the process of installing/updating the CS2 dedicated server. These steps are required every time the game is updated. To automate this process for future updates, see SteamCMD#Automating SteamCMD.
1. Download and install SteamCMD.
2. Start SteamCMD. At the Steam> prompt, set your CS2 Dedicated Server install directory.

Examples:
- Windows:
force_install_dir c:\cs2-ds\ force_install_dir .\cs2-ds\
- Linux:
force_install_dir /full/path/to/cs2-ds/
3. Install or Update CS2. If this is your first time installing or if you are trying to verify the integrity of the server files:
app_update 730 validate
If this is simply an update to an existing CS2 dedicated server:
app_update 730
4. Once finished, type quit at the Steam> prompt to properly log off of the Steam servers.
Registering Game Server Login Token

[Todo]
Starting the Server



Windows
Head to the folder where you downloaded the application and open a terminal there.
Head to the executeable for the server that is stored in game/bin/win64/cs2.exe
- But dont click on it as it will just launch the game.
In the terminal run the following command to start the server:
.\cs2.exe -dedicated +map de_dust2
Linux
Head to the folder where you downloaded the application.
Head to the executeable that is stored in game/bin/linuxsteamrt64/cs2
Run the following command to start the server:
./cs2 -dedicated +map de_dust2
Game Modes & Types

Remember to check for any notes left by the tagger at this article's talk page.


Competitive: game_alias competitive <- sets both game mode and game type commands game_mode 1 game_type 0 Wingman game_alias wingman <- sets both game mode and game type commands game_mode 2 game_type 0 Casual game_alias casual <- sets both game mode and game type commands game_mode 0 game_type 0 Deathmatch game_alias deathmatch <- sets both game mode and game type commands game_mode 2 game_type 1 Custom game_alias custom <- sets both game mode and game type commands game_mode 0 game_type 3
Tools and Helpers
Docker
If your server is running Docker, you can simply use:
docker run -d --name=cs2 -p 27015:27015 -p 27020:27020 joedwards32/cs2
The container will automatically update the game on startup, so if there is a game update just restart the container.
The config is located within the container here: /home/steam/cs2-dedicated/cs2/cfg
You can find the associated Docker Hub page
CS2 Multiserver
A launch and update script for Linux and WSL to run multiple game servers on one machine. It was originally made to run CS:GO LAN tournaments as painless and efficient as possible.
It includes:
- Guided setup and game update (cs2-server setup, cs2-server update)
- Game files are shared between instances, saving disk space and bandwidth
- Additional control upon launch via environment variables (MAP="de_inferno" cs2-server @lan01 start)
- Console access and support for logfiles
More Info and Download: CS2 Multiserver on GitHub. Testing, feedback and contributions are welcome!
Advanced Configuration
[Todo]
Troubleshooting
Linux
steamservice.so missing/failed to load
This is a common issue with a fairly easy fix.
The reason for this error is that SteamCMD doesnt place the file in the folder it should, as the games typically look for it there. So what you need todo is the following.
Create a symlink (shortcut) for each of the files like this: (run each seprately)
ln -s /home/your_user/.local/share/Steam/steamcmd/linux64/steamclient.so /home/your_user/.steam/sdk64/ ln -s /home/your_user/.local/share/Steam/steamcmd/linux32/steamclient.so /home/your_user/.steam/sdk32/
Replace your_user with the username you are using.
