Counter-Strike 2

Counter-Strike 2

Ikke nok vurderinger
Counter-Strike 2 Dedicated Server (SteamCMD) [English/Englisch] [Windows]
Af Zeromix
This guide will show you how to set up a server with the SteamCMD.

The following ports must be open:
TCP 27014-27050 UDP 3478 UDP 4379-4380 UDP 27000-27030

Looking for the german Version?
http://steamcommunity.com/sharedfiles/filedetails/?id=711630778

I also created a tool, that automates the installation process. You can find this tool here:
https://steamcommunity.com/groups/ServerTool
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
SteamCMD Download
First of all you need the SteamCMD. You can download it here:
https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip
SteamCMD Login
Now you need to execute this file.
After a few seconds you can login:


login anonymous

By now you should be logged.
Server Files Download
Now you need to enter the following in the console:
force_install_dir ./cs2_ds/
This will create a folder with the name "cs2_ds" and it will put in the files in this folder.

Now you can start the download with:
app_update 740 validate

If the download was sucessful, you have to type
exit
in the console close the SteamCMD.
Run the Server
First you will need a Servertoken, this will be needed, if you want the server to be shown at the serverlist.
You can get it here:
http://steamcommunity.com/dev/managegameservers
For AppID you can fill "730"

The best option is to create a .bat file in your "cs2_ds" folder (e.g. start.bat)
You need to create the bat file in this folder:
C:\Steam-Server\cs2_ds

The following code depends on which mode you want to play:
Classic Casual:
start srcds -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2 +sv_setsteamaccount <TOKEN> -maxplayers_override 24

Classic Competitive:
start cs2.exe -dedicated -insecure +game_type 2 +game_mode 0 +map de_dust2 +servercfgfile server.cfg +sv_setsteamaccount <TOKEN> -maxplayers_override 24

Arms Race:
start srcds -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace +map ar_shoots +sv_setsteamaccount <TOKEN> -maxplayers_override 24

Demolition:
start srcds -game csgo -console -usercon +game_type 1 +game_mode 1 +mapgroup mg_demolition +map de_lake +sv_setsteamaccount <TOKEN> -maxplayers_override 24

Deathmatch:
start srcds -game csgo -console -usercon +game_type 1 +game_mode 2 +mapgroup mg_allclassic +map de_dust +sv_setsteamaccount <TOKEN> -maxplayers_override 24

You can also change the port with "-port 27015"

A list of arguments to run the server can be found here:
https://developer.valvesoftware.com/wiki/Command_Line_Options
Configurate the Server
You need to put the following in the "server.cfg" which is located here:
C:\Steam-Server\cs2_ds\csgo\cfg

// read in any bans. this needs to be done at the start to give the server // time to process them before we ask them to be written back out. exec banned_user.cfg exec banned_ip.cfg hostname "teamBYE - Classic/Custom Competitive [NYC - FASTDL]" rcon_password "not_going_to_give_this_out" sv_password "" Fastdownload: //sv_downloadurl "http://bye.site.nfoservers.com/csgo" //sv_allowdownload 1 //sv_allowupload 1 //The amount of time players are frozen to buy items mp_freezetime 5 //The amount of time players can join teams after a round has started mp_join_grace_time 15 // Defines whether a map should be restarted after a game has ended mp_match_end_restart 0 sv_cheats 0 sv_lan 0 // These are important for performance reasons. FPS needs to be 0 // in order to maintain a high FPS (the default is 300) and therefore // prevent missed ticks; having a high sv_minrate makes sure that // clients don't get choke. fps_max 0 sv_minrate 128000 sv_maxrate 0 // We could also require clients to have a high cmdrate here, // so that they have a smoother gameplay experience. // 128 is the maximum supported by the engine. sv_mincmdrate 128 // The engine does not support sv_minupdaterate as of 8/23/2012. // This is unlike CS:S. // bot-related commands bot_difficulty 2 bot_chatter "off" bot_join_after_player 1 bot_quota 0 bot_quota_mode "fill" // write out any bans writeid writeip // further settings can be adjusted in "cfg/autoexec.cfg" and "gametypes.txt". // "cfg/autoexec.cfg" is used to define the default map, mapcycle, and game // mode, and "gametypes.txt" can be used to define settings like the ones // above, and others, on a finer-grained level, as well as to set up the // "map groups", which determine which maps are played for each game mode. sv_region 0 log 1

These code lines can also be found here to copy:
https://pastebin.com/n1XcFu5F
Backup Link:
https://hastebin.com/zuyavaheto.php

You can change in your gamemode config anything else, that you need!
Configurate Sourcemod/Add Admins
At first you will need "Metamod Source" you can get it from here.[www.metamodsource.net]
You have to unzip the files in the following folder:
E:\Server\SteamCMD\cs2_ds\csgo

By now there should be an "addons" folder.
Now you need Sourcemod, you can get this here.[www.sourcemod.net]
You can also get the Plugins from there later.

Also extract that in this folder:
E:\Steam-Server\cs2_ds\csgo

For the following you will need your SteamID, you can find yours out here:
http://steamidfinder.com

To configurate an admin, go to:
E:\Server\SteamCMD\cs2_ds\csgo\addons\sourcemod\configs
and open the
admins.cfg

As you can see, you just have to add something like this:
"Zeromix" //A name for yourself { "auth" "steam" "identity" "STEAM_0:1:31843021" "flags" "z" //Access Commands }

You can see the flags in the
admin_levels.cfg
file.

If you have configurate it, write in the chat "!admin" or in the console "sm_admin" to open the menu.

And that´s it! Have fun! ^_^
Frequently Asked Questions
I can not see my server / No one can connect to my server
Please make sure, that you have opened all the required ports in your router. If the everything is set correctly, but the problem still occurs, please contact your internet provider.
Or look for your router model here:
https://portforward.com/router.htm

Is there another way instead of opening the ports?
Yes, you can also host your server through a VPN network like "Hamachi". Of course only the people in the VPN network will be able to join the server then.
If forwarding your ports doesn´t work, please contact your ISP, i won´t be able to help you.

How can i change my server port?
Just edit the bat file with "-port 27015"

The SteamCMD download failed! What should I do now?
Mostly you just need to retry the download, then the problem should be fixed.

How do I update my server?
Just open the SteamCMD and login again, then retry the Step "Downloading the files" it will be checked which files need to be updated.
Server Creation Tool
To automate these steps to setup/upgrade a server, i created a tool, the group can be founde here:
http://steamcommunity.com/groups/ServerTool

The tool itself is hosted on Github, which can be found here:
https://github.com/Zeromix9/ServerTool

I hope, that will help you in the future!

If you like, you are also welcome to leave a small donation.
https://paypal.me/Zeromix
10 kommentarer
Thakc1 9. okt. 2024 kl. 4:29 
zeromin you are legend:cool_seagull:also GO :csgob:
Zeromix  [ophavsmand] 29. juni 2021 kl. 3:16 
@Am1n Arrrgh...
Then it seems like your ports aren´t forwarded correctly/your ISP doesn´t support it.
Use a VPN or contact your ISP i can´t help you with that.
Vo1dborne 29. juni 2021 kl. 3:07 
But now the server is not visible and when i try to connect via IP it keeps on trying but won't connect
Zeromix  [ophavsmand] 29. juni 2021 kl. 2:30 
@Am1n You´re welcome, have fun. ^^
Vo1dborne 28. juni 2021 kl. 9:18 
Oh i removed the <> and it got fixed. Thanks anyway.
Vo1dborne 28. juni 2021 kl. 9:13 
and i used my token in the TOKEN field
Vo1dborne 28. juni 2021 kl. 9:12 
start srcds -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2 +sv_setsteamaccount <TOKEN> -maxplayers_override 24
Zeromix  [ophavsmand] 28. juni 2021 kl. 9:10 
@Am1n What exacly did you use as launch code?
Vo1dborne 27. juni 2021 kl. 15:47 
The dedicated server won't even launch! i did exactly as you said and made a bat file with the given commands. but nothing happens! what is the problem?
cookieoreo18 1. sep. 2019 kl. 12:34 
Nice guide