If you are looking for the CS:GO version you can still access that here.
A single modded Counter-Strike 2 (CS2) Modded Dedicated Server that you can change the active mod on the server from chat or server console. Maps are preconfigured per game mode and change when the game mode changes.
Each game mode has a hand full of maps preset so you are ready to go and it's easy to add more.
- Competitive (using MatchZy)
- Practice (record grenade throws etc) (using MatchZy)
- Wingman (allows more than 4 players) (Steam API key required)
- GunGame (Steam API key required)
- Custom Deathmatch (Steam API key required)
- Prefire practice
- Retakes
- Executes
- Capture The Flag (Steam API key required)
- One In The Chamber
- 1v1 (with arenas) (Steam API key required)
- ScoutzKnivez (Steam API key required)
- KZ (Steam API key required)
- BHop (Steam API key required)
- Surf (Steam API key required)
- Mini Games (Steam API key required)
- Deathrun (Steam API key required)
- Course format (tests players with different traps, kz, surf, bhop) (Steam API key required)
- Hide n Seek (Steam API key required)
- Battle Royale (Steam API key required)
- Soccer (Steam API key required)
- Battle Ball (Steam API key required)
You can also enable modifiers in game modes from the !settings menu in chat i.e. Competitive with random rounds like NadeKings video.
- Random Rounds - CS2, but every round is a SURPRISE.
- WarcraftMod - An open-source Warcraft mod for CS2 featuring a fully-fledged RPG system.
- Roll The Dice - Roll the dice to get either a positive or negative effect for the current round.
- Bunny hopping
Every time you want to boot the server, you should run gcp.sh (if on Google Cloud) or install.sh (on Linux) or update.bat (on Windows) and it will ensure your OS is up to date, CS2 is up to date, and pull down the latest patches from this mod (any updates that I push up).
Obviously, any changes you have made to the files in this mod will be overwritten so I have created a "custom files" folder where you mirror the contents of the game/csgo/ folder, and any files you want to tweak, you put in there in the same spot and they will always overwrite the mods default files. Read more about it here.
The simple quick setup:
- Create your firewall rules
- Provision your server on Google Cloud
- SSH into server
- Install mod
- Create your custom files for hostname, admins etc
- Add admins
- Ensure you have followed the steps for creating an online server or LAN server
- Kill server if running
./stop.shand start againgcp.sh(if on Google Cloud) orinstall.sh(on Linux)
Your server should be up and running!
To check everything is working correctly run the following commands in the server console:
meta listand you should seeCounterStrikeSharpin the outputcss_plugins listand you should see a few plugins in the output
If you see content in both; everything is working.
Important
Using RCON whilst connected to the server does not work. See discussion here. The current work arounds are:
Useful things to know:
Getting up and running:
| Mod | Version | Why |
|---|---|---|
| Metamod:Source | 2.0.0-1374 |
Sits between the Game and the Engine, and allows plugins to intercept calls that flow between |
| CounterStrikeSharp | 1.0.347 |
Attempts to implement a .NET Core scripting layer on top of a Metamod Source Plugin, allowing developers to create plugins that interact with the game server in a modern language (C#) |
| MultiAddonManager | 1.4.8 |
Allows you to use multiple workshop addons at once and have clients download them How? |
| ServerListPlayersFix | 1.0.5 |
Fixes players not showing up in the server browser |
| MovementUnlocker | 1.9 |
Removes max speed limitation from players on the ground, feels like CS:S How? |
| CS2Fixes-RampbugFix | 16-10 |
Minimizes rampbugs (needs to be enabled via !settings How?) |
| CS2_ExecAfter | 1.0.0 |
Executes a command after server event (i.e. OnMapStart) or a delay. |
| CS2 Remove Map Weapons | 1.0.1 |
Remove weapons from the map in CS2 as mp_weapons_allow_map_placed 0 does not work. |
| GameModeManager | 1.0.62 |
|
| Inventory Simulator | 37 |
Use any Weapon, Knife, Gloves, Agent, Music Kit, Pin or Graffiti. How? |
| CS2-PlayerModelChanger | 1.8.6 |
A lightweighted counterstrikesharp plugin to change player model. How? |
| MatchZy | 0.8.15 |
MatchZy is a plugin for CS2 for running and managing practice/pugs/scrims/matches with easy configuration! |
| MapConfigurator | 1.0.2 |
Allows you to quick and easily create unique configuration files for each map on your server. |
| K4-DamageInfo | 2.4.0 |
Displays the amount of damage players have inflicted on the victim's HP and Armor, as well as the hit groups they have hit. |
| SimpleAdmin | 0.1.2 |
Adds basic administrator functions |
| CS2Rcon | 1.2.0 |
This is a rudimentary implementation of a RCON plugin for CS2 using CounterStrikeSharp as RCON does not work whilst connected to the server |
| SharpTimer | 0.3.1x |
SharpTimer is a simple Surf/KZ/Bhop/MG/Deathrun/etc CS2 Timer plugin |
| STFixes | 1.0.5 |
A CounterStrikeSharp plugin with common fixes and features for SharpTimer servers |
| GunGame | 1.2.1 |
GunGame mode on Counter Strike Sharp |
| K4-Arenas | 2.0.8 |
All in one arena plugin, that you can use to have a ladder type gameplay. Support all map, 2v2/3v3/etc How? |
| CS2 Retakes | 2.1.6 |
CS2 implementation of retakes. Based on the version for CS:GO by Splewis. |
| CS2 Instadefuse | 2.0.0 |
Allows a CT to instantly defuse the bomb when nothing can prevent defusal. Written in C# for CounterStrikeSharp. |
| CS2 Retakes Allocator | 2.4.2 |
Advanced weapon allocation for B3none/cs2-retakes |
| CS2 Whitelist | 1.0.0 |
Restricts access to the server for SteamID members/employees listed in the whitelist. How? |
| CS2 Executes | 1.1.1 |
CS2 implementation of executes. Based on the version for CS:GO by Splewis. |
| CS2 Advertisement | 1.0.8-recompile |
Allows you to show ads in chat/center/panel. How? |
| CS2 Deathmatch | 1.3.0 |
Custom Deathmatch CS2 plugin (Includes custom spawnpoints, multicfg, gun selection, spawn protection, etc) |
| OpenPrefirePrac | 0.1.47 |
Multiple prefire practices on competitive maps and support multiplayer practicing simultaneously. |
| CS2-CustomVotes | 1.1.3 |
A plugin for Counter-Strike 2 to create custom votes for settings. |
| deathrun-manager | 0.5.1 |
Deathrun Manager for CounterStrikeSharp Framework CS2. |
| AnnouncementBroadcaster | 0.5 |
Conditional messages, OnCommand, OnPlayerConnect, OnRoundStart, and TimerMsgs. |
| CS2-GameModifiers | 1.0.4 |
CS2, but every round is a SURPRISE. Inspiration from NadeKings video. Fork from Lewisscrivens. |
| CS2FunMatchPlugin | 1.1.1 |
Random fun mode every round |
| RollTheDice | 25.10.1 |
Roll the dice to get either a positive or negative effect for the current round. |
| CS2-FixRandomSpawn | 1.1.4.1 |
Fixes ConVar mp_randomspawn for any game mode. |
| CS2-MutualScoringPlayers | 1.0.1 |
Keeps score of kills between players. |
| CS2WarcraftMod | 3.3.5 |
An open-source Warcraft mod for CS2 featuring a fully-fledged RPG system. |
| cs2-advanced-weapon-system | 1.11 |
An advanced weapon system that gives full control over weapon attributes, dynamic adjustments to weapon behaviour, restrictions and advanced customisation. |
| cs2-OneInTheChamber | 1.0.0 |
One in the Chamber game mode. |
| cs2-quake-sounds | 25.11.1 |
Quake Sounds on multi kills. |
| CS2-WeaponSpeed | 1.2 |
Gives players a speed boost when they fire specified weapons. |
| SpectatorList-CS2 | 16 |
Shows real-time spectators in on-screen display. |
| SLAYER_Football | 1.1 |
Football in CS2. |
| SLAYER_Revive | 1.3.2 |
Revive Your Teammates. |
| cs2-TeleportKill | 1.0.1 |
Instantly teleport to the location of the enemy you kill. |
| CS2-BotAI | 1.0 |
Improves the built in bots AI and also makes them run with a gun intead of a knife or nade. |
If you appreciate the project then please take the time to star the repository 🙏
Subscribe to release notifications and stay up to date with the latest features and patches:
Note
Any reference to a path is always the root of the installation. Which on Linux will typically be /home/steam/cs2/ and on Windows where ever you extracted the zip.
For example on Linux:
/custom_files/addons/counterstrikesharp/configs/admins.json full path is /home/steam/cs2/custom_files/addons/counterstrikesharp/configs/admins.json
/game/csgo/addons/counterstrikesharp/configs/admins.json full path is /home/steam/cs2/game/csgo/addons/counterstrikesharp/configs/admins.json
Any changes you have made to the files in this mod will be overwritten when the update scripts are ran. I have created a folder /custom_files/ in the root of the project, where you mirror the contents of the csgo/ folder, and any files you want to tweak, you put in there in the same spot and they will always overwrite the mods default files.
So this can be used to set the server hostname to something you want, set the RCON or serverpassword or set the admins of the server.
You can see an example of what I use on my server in the /custom_files_example/ directory, which sets the hostname, server image and admins.
For example; if you want to add yourself as an admin, that file is located /game/csgo/addons/counterstrikesharp/configs/admins.json. So to make your tweak to it, you would copy that file to /custom_files/addons/counterstrikesharp/configs/admins.json and add yourself as an admin at the bottom. Then when the update scripts run, it will copy your custom file at /custom_files/addons/counterstrikesharp/configs/admins.json and overwrite the default mod file at /game/csgo/addons/counterstrikesharp/configs/admins.json.
If you want to change the server name, or make any changes to any mod settings use the /cfg/custom_MOD.cfg as it executes at the end and can overwrite any setting. So if you wanted to change the server name for GunGame, you would copy /game/csgo/cfg/custom_dm.cfg to /custom_files/cfg/custom_dm.cfg and and write hostname "shipREKT GunGame +Deathmatch +Turbo" and any other settings you want and this file will overwrite /game/csgo/cfg/custom_dm.cfg each time the gcp.sh/install.sh/win.bat script is ran, and these settings will run at the end when you load the GunGame mod.
If a plugin creates a config file in the plugins folder where the dll is (i.e.: /game/csgo/addons/counterstrikesharp/plugins/disabled/Advertisement/advertisement.json) it will be deleted when the server starts as the addons folder is deleted to make sure old plugins are removed if I removed them. You need to copy this file and your changes to your /custom_files/ folder so it merges it back in. You would put the example file in /custom_files/addons/counterstrikesharp/plugins/disabled/Advertisement/advertisement.json and every time the server starts it will merge it back in and you will have your changes.
To generate this directory, you can run the gcp.sh script (if on Google Cloud), install.sh script on Linux once or on win.bat script on Windows where you extracted the mod zip and this is where you would put your custom modifications.
If you are hosting an online server, you need to create a Steam Game Login Token, your server will not run online without this. Put this value in the STEAM_ACCOUNT environment variable.
You also need to create an authorization key which will allow your server to download maps from the workshop. Put this value in the API_KEY environment variable.
See all available environment variables.
You must connect to the server from the public IP, not the LAN IP even if you are on the same network. The script logs the public IP Starting server on XXX.XXX.XXX.XXX:27015
Set the environment variable LAN to 1.
You also need to create an authorization key which will allow your server to download maps from the workshop. Put this value in the API_KEY environment variable.
See all available environment variables.
On Windows set these in win.ini.
| Key | Default value | What is it |
|---|---|---|
API_KEY |
changeme |
To download maps from the workshop, your server needs access to the steam web api. To allow this you'll need an authorization key which you can generate here |
IP |
`` | Not required. Allows the server IP to be set. Useful if a CS2 server needs to be bound to a specific IP address. |
PORT |
27015 |
Server port |
TICKRATE |
128 |
Server tickrate MM is 64, Faceit is 128 |
MAXPLAYERS |
32 |
Max player limit |
CUSTOM_FOLDER |
custom_files |
Folder of your own modifications to the mod that mirror the csgo/ structure and overwrite the mode files. More on that here |
RCON_PASSWORD |
changeme |
RCON password to control server from console also remotely configure |
STEAM_ACCOUNT |
`` | To host a server online, you need to create a Steam Game Login Token. Your server will not run online without this |
SERVER_PASSWORD |
`` | If you want a password protected server |
LAN |
0 |
If the server is a LAN only server |
EXEC |
on_boot.cfg |
Config file to run when server boots. If switching gamemode, it's recommended to do a delay see the example on_boot.cfg file |
DUCK_DOMAIN |
`` | (Linux only) Duck DNS domain if you want to utalise the free service to get a domain for your server instead of IP |
DUCK_TOKEN |
`` | (Linux only) Duck DNS access token to update domain when server boots |
To download maps from the workshop, your server needs access to the steam web api. To allow this you'll need an authorization key which you can generate here and set API_KEY to the key.
The console command for hosting a workshop map is host_workshop_map fileid where fileid is the number that comes after ?id= in the workshop URL for example: https://steamcommunity.com/sharedfiles/filedetails/?id=2433686680
The console command for hosting a workshop collection is host_workshop_collection collectionid where collectionid is the number that comes after ?id= in the workshop URL for example: https://steamcommunity.com/sharedfiles/filedetails/?id=1092904694. This command will then download all maps in the collection and create a mapgroup out of them, then host it.
Copy the file /game/csgo/gamemodes_server.txt following the custom files steps (/custom_files/gamemodes_server.txt) and add the maps you want per gamemode. Most gamemodes fall under casual, but I have created unique groups for each mode so adding your own maps is easy by updating this one file.
It isn't required, but you should add the fileid into /game/csgo/subscribed_file_ids.txt following the custom files steps (/custom_files/subscribed_file_ids.txt) so the server keeps it up to date.
If you have python available, you can use our tool available to add a map to your custom game mode map groups: python scripts/add-map.py <group_name> <map_name> [workshop_id] --custom. Refer to scripts/add-map.py for more information.
gcloud compute firewall-rules create source \
--allow tcp:27015-27020,tcp:80,udp:27015-27020
Ensure you have all the settings for your environment variables.
If you have issues with the server not handling load, you may want to consider compute-optimized machine c2-standard-4.
gcloud beta compute instances create <instance-name> \
--maintenance-policy=TERMINATE \
--project=<project> \
--zone=australia-southeast1-c \
--machine-type=n2-standard-2 \
--network-tier=PREMIUM \
--metadata=RCON_PASSWORD=changeme,STEAM_ACCOUNT=changeme,API_KEY=changeme,DUCK_DOMAIN=changeme,DUCK_TOKEN=changeme,startup-script="echo \"Delaying for 30 seconds...\" && sleep 30 && cd / && /gcp.sh" \
--no-restart-on-failure \
--scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/compute.readonly,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append \
--tags=source \
--image-family=ubuntu-2204-lts \
--image-project=ubuntu-os-cloud \
--boot-disk-size=60GB \
--boot-disk-type=pd-standard \
--boot-disk-device-name=<instance-name>
gcloud compute ssh <instance-name> \
--zone=australia-southeast1-c
sudo su
cd / && curl --silent --output "gcp.sh" "https://raw.githubusercontent.com/kus/cs2-modded-server/master/gcp.sh" && chmod +x gcp.sh && bash gcp.sh
If the installation has paused for a long time, restart the server and do it again.
gcloud compute instances stop <instance-name> \
--zone australia-southeast1-c
gcloud compute instances start <instance-name> \
--zone australia-southeast1-c
gcloud compute instances delete <instance-name> \
--zone australia-southeast1-c
For example a map:
On local:
gcloud config set project <project>
cd /path/to/folder
gcloud compute scp de_kus.vpk root@<instance-name>:/home/steam/cs2/game/csgo/maps --zone australia-southeast1-c
On server SSH:
cd /home/steam/cs2/game/csgo/maps
chown steam:steam de_kus.vpk
chmod 644 de_kus.vpk
gcloud compute scp root@<instance-name>:/home/steam/cs2/gamecsgo/cfg/comp.cfg ~/Desktop/
SSH into the VM
Switch to root sudo su
Check the timezone your server is running in sudo hwclock --show
Open crontab file nano /etc/crontab
Append to the end of the crontab file 30 3 * * * root shutdown -h now
Save CTRL + X
Make sure you have 60GB free space.
Ensure you have all the settings for your environment variables.
-
If setting up internet server:
Set environment variable
STEAM_ACCOUNTto your Game Server Login TokenMake sure you port forward on your router TCP:
27015and UDP:27015&27020so players can connect from the internet.You must connect to the server from the public IP, not the LAN IP even if you are on the same network. The script logs the public IP
Starting server on XXX.XXX.XXX.XXX:27015 -
If setting up LAN server:
Set environment variable
LANto1
sudo su
export RCON_PASSWORD="changeme"
export API_KEY="changeme"
export STEAM_ACCOUNT=""
export SERVER_PASSWORD=""
export PORT="27015"
export TICKRATE="128"
export MAXPLAYERS="32"
cd / && curl --silent --output "install.sh" "https://raw.githubusercontent.com/kus/cs2-modded-server/master/install.sh" && chmod +x install.sh && bash install.sh
- If running for the first time
To check everything is working correctly run the following commands in the server console:
meta listand you should seeCounterStrikeSharpin the outputcss_plugins listand you should see a few plugins in the output
If you see content in both; everything is working.
When you join the server you can change game modes.
Make sure Docker is installed and about 40 GB disk space is free.
-
If setting up for internet server:
Set 'STEAM_ACCOUNT' variable in '.env'-file in the root if the repository. For workshop maps set 'API_KEY' in '.env'-file.
Or provide via -e to the run command
It is also recommended to have a cron to reboot the container once a day, this will allow for the server to auto-update when new CS versions are released
docker run
--name='cs2'
-e 'API_KEY'='REPLACE_ME'
-p '27015:27015/tcp'
-p '27015:27015/udp'
-p '27020:27020/udp'
-v '/SOME/DIR/STORES_MAIN_INSTALL/':'/home/steam/cs2/':'rw'
-v '/SOME/DIR/STORES_CUSTOM_OVERRIDES':'/home/custom_files/':'rw'
'ghcr.io/kus/cs2-modded-server:latest' Note: if you don't mount /home/steam/cs2/ it will download the game every launch
Note: If you find issues between version upgrades your first step should be to blat /SOME/DIR/STORES_MAIN_INSTALL/ so that it downloads completely fresh
Or to build yourself
You can either Download this repo and extract it to where you want your server (i.e. C:\Server\cs2-modded-server) or use git and clone the repo git clone https://github.com/kus/cs2-modded-server.git and run your server from inside of it. This way you can simply git pull updates.
-
Build docker image:
docker build -t cs2-modded-server . -
Run the server
docker compose up
You should have a Kubernetes distribution already running. To set up a K8s Cluster please refer to RKE2 Quickstart
First create a namespace for your deployment with kubectl create ns game-server
To securly pass .env vars to the container, Kubernetes Secrets are used. Make a file called cs2-secret.yaml. Your keys need to be base64 encoded. Simply echo "my_key" | base64 in your bash shell and then put them in the data section of your Secret manifest.
apiVersion: v1
kind: Secret
metadata:
name: cs2-secret
namespace: game-server
type: Opaque
data:
STEAM_ACCOUNT: {your_steam_account_key_goes_here}
API_KEY: {your_api_key_goes_here}
Assuming you already have a defaultStorageClass and a defaultLoadBalancerClass you can apply the manifest with
kubectl apply -f manifest.yaml
Note: custom_files is mounted as a hostPath this wont work for multi-node setups. For this there are several solutions such as initContainer or Operators to automatically update the custom_files
Your service will receive an external IP and can be found with kubectl get svc -n game-server.
Make sure you have 60GB free space and Steam installed (you don't need to be logged in, just have Steam installed and updated).
If you have git installed; it is recommended to use git and clone the repo git clone https://github.com/kus/cs2-modded-server.git and run your server from inside of it. This way you can simply git pull updates (or run update.bat). Alternatively you can Download this repo and extract it to where you want your server (i.e. C:\Server\cs2-modded-server) but you will manually have to handle updates.
All the following instructions will use the repo folder location as the root.
Create a folder steamcmd and download SteamCMD and extract it inside steamcmd so you should have \steamcmd\steamcmd.exe.
- Manual download of SteamCMD is no longer necessary as the startup script will handle it for you now.
To download maps from the workshop, your server needs access to the Steam Web API. To allow this, open \win.ini and set cs_api_key to your Steam Web API Key.
-
If setting up internet server:
Open
\win.iniSet
IPto your public ipSet
STEAM_ACCOUNTto your Game Server Login TokenSet
API_KEYto your Steam Web API key (required to play workshop maps)Make sure you port forward on your router TCP:
27015and UDP:27015&27020so players can connect from the internet.You must connect to the server from the public IP, not the LAN IP even if you are on the same network.
-
If setting up LAN server:
Open
\win.iniSet
LANto1Set
API_KEYto your Steam Web API key (required to play workshop maps)
Run win.bat
Accept both Private and Public connections on Windows Firewall.
- If running for the first time
To check everything is working correctly run the following commands in the server console:
meta listand you should seeCounterStrikeSharpin the outputcss_plugins listand you should see a few plugins in the output
If you see content in both; everything is working.
When you join the server you can change game modes.
Players can start a vote to change the map in the current mod by typing !rtv in chat.
Players can start a vote to change the game mode by typing !gamemode in chat.
You can also start a specific game mode vote by typing !comp, !wingman, !dm, !gg, !1v1, !awp, !aim, !prefire, !executes, !retake, !prac, !bhop, !kz, !surf, !minigames, !deathrun, !course, !scoutzknivez, !hns, !br, !soccer, !1.6.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Download SourceAdminTool (source) for your OS (you can read about it here) and click Servers > Add Servers and put in the <IP>:27015 and when you see the server show in the list, down the bottom left type in your RCON password and click Login and you should be able to execute commands from the bottom text box i.e. exec dm.cfg
You must connect to the server from the public IP if hosting an online server, not the LAN IP even if you are on the same network. The script logs the public IP Starting server on XXX.XXX.XXX.XXX:27015
Admins are managed by CounterStrikeSharp using the Admin Framework. You define admins and their flags and most plugins now utilise this framework.
You must use the custom files to set your admins, as they will be overwritten when you update your server.
To see an example of my admins you can look at this file /custom_files_example/addons/counterstrikesharp/configs/admins.json.
If you don't want to define any new groups, you can copy this file /custom_files_example/addons/counterstrikesharp/configs/admins.json into /custom_files/addons/counterstrikesharp/configs/admins.json and set your own admins and this will overwrite the default admins from this mod.
Ensure your .json files are valid JSON by using this website.
If you have added the admins correctly you should see Loaded admin data with X admins. in the server logs when it starts.
If you modify the server whilst the server is on you can run css_admins_reload and css_groups_reload to reload the admins and see the admins with css_admins_list and css_groups_list.
If you don't like having to type in chat !number every time you want to use a menu item; you can use this trick to bind the corresponding !number command to the number key. So when you press 1 it will select the 1 option:
Note: This is assuming you are using the standard binds. You can change accordingly for your own setup.
bind "1" "slot1; css_1"
bind "2" "slot2; css_2"
bind "3" "slot3; css_3"
bind "4" "slot4; css_4"
bind "5" "slot5; css_5"
bind "6" "slot6; css_6"
bind "7" "slot7; css_7"
bind "8" "slot8; css_8"
bind "9" "slot9; css_9"
bind "0" "slot10; css_0"
Admins can type !maps in chat and it will bring up a menu of all the maps for the current mod. When a map is selected it will change the map straight away.
At the end of the map (if time runs out or win conditions are met) it a vote will show to choose a map from the current mod.
Admins can type !settings in chat and it will bring up a menu of all the settings you can enable or disable. i.e.: Bunnyhopping, fun mode etc.
Admins can type !modes in chat and it will bring up a menu of all the game modes. Simply choose one and it will switch to that game mode and change to a default map for that game mode.
The maps in !maps will also update to the new game mode when it has changed.
Changing between gamemodes multiple times is not recommended, and it is better if you restart the CS2 server in-between.
To view what other commands are available view the plugins documentation at the top of the page.
Using RCON whilst connected to the server does not work. See discussion here. The current work arounds are:
- I have included CS2Rcon which allows admins to use !rcon in chat.
- You can disconnect from the server and use
rcon_address IP:PORTin console and you can use rcon commands. - Use an external RCON program which has implemented the RCON protocol such as this.
If it still doesn't work, make sure you try connect from CS2 outside of a game via console:
You must connect to the server from the public IP if hosting an online server, not the LAN IP even if you are on the same network. The script logs the public IP Starting server on XXX.XXX.XXX.XXX:27015
rcon_address ip:port
rcon_password "password"
rcon say "hi"And check the ports cs2 is using on your OS i.e. on Ubuntu sudo lsof -i -P -n | head -n 1; sudo lsof -i -P -n | grep cs2.
Workshop maps take up a lot of space! If you want to delete all your workshop maps so the server can run again (it will download the maps you want to play). Stop the server, delete the workshop and start the server again:
Linux:
cd /home/steam/cs2/game/bin/linuxsteamrt64/steamapps
ls -lah # You should see a workshop folder
du -sh workshop # To get the size of it
rm -rf workshop # Delete the workshop folder
Windows:
- Browse to where ever you are running your server from
- Open
game/bin/win64/steamapps/and you should see a workshop folder - Delete the workshop folder
By default bots are enabled in deathmatch, gungame, gungame ffa, retakes, scoutsknives and wingman.
The default is set to add 1 bot if only 1 human is in the server, and then if there is 2 or more humans there will be no bots.
You can overwrite the settings for the bots by creating a "custom file" for this file custom_bots.cfg.
If you copy custom_bots.cfg and put it in the custom_files/cfg/ directory (/home/steam/cs2/custom_files/cfg/ on default Linux setup) and you can modify it and change say bot_quota to 10 if you want 10 players at all times. When the server starts (on Linux and Windows) it will merge this file into the game cfg and it will execute every time bots.cfg executes.
You can also just login to RCON rcon_password yourpassword and use rcon bot_add_ct and rcon bot_add_t.
If you want to remove bots you use rcon bot_kick.
Because the way the server is setup with several mods it's not possible. You can't use +exec in the server launcher as that executes to quick before SourceMod is loaded. You can monitor the server once it's started (via RCON) and then load a mod i.e. exec dm.cfg.
If you are on a unix based system, you can run scripts/check-updates.sh which will check the current versions of each plugin installed in this repo vs what the latest is, this makes it easier than going through each one manually.
Go to the Releases page for Metamod:Source and CounterStrikeSharp and download the latest. You need to merge the addons folder from the zips into the /game/csgo/addons of this repo. This is easy to do with unix based systems with rsync:
First open terminal and cd into the folder where you unzipped the zips i.e.: cd ~/Downloads then update the command below with the full path to the repo and run it:
rsync -rhavz --exclude "._*" --exclude ".DS_Store" --partial --progress --stats ./addons/ /Users/kus/dev/personal/counter-strike/cs2-modded-server/game/csgo/addons/
If you are on Windows, from the CounterStrikeSharp with runtime zip, you need to copy the api,bin, dotnet folders from the /addons/counterstrikesharp folder to /game/csgo/addons/windows/counterstrikesharp in this repo.
This requires Multi Addon Manager to be enabled.
Quake Sounds is disabled by default, when it is enabled, players can disable it by typing !qs in chat.
If you want to use it on your server, you need to modify two files using the custom files method.
Copy game/csgo/cfg/multiaddonmanager/multiaddonmanager.cfg to /custom_files/cfg/multiaddonmanager/multiaddonmanager.cfg and add 3461824328 to mm_extra_addons.
Copy game/csgo/cfg/settings/quake_sounds.cfg to /custom_files/cfg/settings/quake_sounds.cfg uncomment this line // css_plugins load "plugins/disabled/QuakeSounds/QuakeSounds.dll".
On your server your players will have the ability to change the following:
- Weapon
- Paint Kit, Wear, Seed, Name tag, StatTrak (with increment), and Stickers.
- Knife
- Paint Kit, Wear, Seed, Name tag, and StatTrak (with increment).
- Gloves
- Paint Kit, Wear, Seed.
- Agent
- Patches.
- Music Kit
- StatTrak (with increment).
- Pin
- Graffiti
Go to https://inventory.cstrike.app and click Sign-in to sync and log in with Steam (this needs to be the same Steam account you are playing on).
Click Craft Item and create the items you want. You need to right click them and "Equip" them like you do in-game.
On the server type !ws and it should update your skins to what you have set.
Caution
Your server can be banned by Valve for using this plugin (see their server guidelines). Use at your own risk.
If you DO NOT want to use this plugin; change FollowCS2ServerGuidelines to true in addons/counterstrikesharp/configs/core.json. It is recommended to do this via custom files.
Utilising custom files, copy:
game/csgo/addons/multiaddonmanager/multiaddonmanager.vdf to /custom_files/addons/metamod/multiaddonmanager.vdf
This will enable MultiAddonManager on your server when it boots.
To check type meta list in console and you should see MultiAddonManager in the list of loaded plugins.
This requires Multi Addon Manager to be enabled.
You have the abililty to have custom player models. You can turn it on va !settings > Enable > Custom Player Models and it will change the map to de_dust2 and the models will stay on for the future maps/modes unless turned off via !settings > Disable > Custom Player Models.
It requires that you have a Workshop Addon with the models, for my server I just use this one which has over 200 models.
You need to have the Addon ID in your cfg/multiaddonmanager/multiaddonmanager.cfg i.e. mm_extra_addons "3461824328,3163629484".
Then you need to define the models from the Workshop Addon in addons\counterstrikesharp\configs\plugins\PlayerModelChanger\PlayerModelChanger.json, I have some in there that I use if you want more you will need to add them yourself.
The easiest way to see what is in a Workshop Addon is Subscribe to it and wait for it to download (it will download to C:\Program Files (x86)\Steam\steamapps\workshop\content\730\<workshop-id>\), then download and open Source 2 Viewer and browse to Counter-Strike 2 > the Workshop Addon and you can see the files and paths in it.
I run a Surf/KZ/Bhop server and want MovementUnlocker and CS2Fixes-RampbugFix permanently on
Based on your OS; copy:
game/csgo/addons/surf/<linux|windows>/addons/metamod/cs2fixes-rampbugfix.vdf to /custom_files/addons/metamod/cs2fixes-rampbugfix.vdf
game/csgo/addons/surf/<linux|windows>/addons/metamod/MovementUnlocker.vdf to /custom_files/addons/metamod/MovementUnlocker.vdf
This will enable MovementUnlocker and CS2Fixes-RampbugFix on your server when it boots.
To check type meta list in console and you should see Movement Unlocker and Rampbugfix in the list of loaded plugins.
If you only want to turn it on ad hoc then in chat use the command !settings > Enable > Surf and it will load them and change the map to de_dust to avoid the server crashing, then change the map back to what you want with !maps.
Setting up a MySQL Database is outside the scope of this repo.
It is recommended to use 5.2 or higher.
You can set one up yourself or use a hosted one (there are also some free options such as filess.io aiven.io but reliability isn't guaranteed).
Once you have the connection details; the config files are generally located in /game/csgo/addons/counterstrikesharp/configs/plugins/ which you would need to update via custom files.
For this example; I'll use K4-Arenas. The config is located at /game/csgo/addons/counterstrikesharp/configs/plugins/K4-Arenas/K4-Arenas.json which you would put in /custom_files/addons/counterstrikesharp/configs/plugins/K4-Arenas/K4-Arenas.json so it is not overwritten/deleted and open the file K4-Arenas.json and add your database connection details to "database-settings".
Tip
If K4-Arenas.json does not exist, copy K4-Arenas.json.example and remove .example from the name and use that.
Restart your server.
If you want to enable a whitelist on your server load the plugin by putting this css_plugins load "plugins/disabled/Advertisement/Advertisement.dll" in one of your .cfg files.
If you want it to load on every mod on your server, you can put it in your /custom_files/cfg/custom_all.cfg file.
The config file is located at /game/csgo/addons/counterstrikesharp/plugins/disabled/Advertisement/advertisement.json which you would put in /custom_files/addons/counterstrikesharp/plugins/disabled/Advertisement/advertisement.json so it is not overwritten/deleted.
If you want to enable a whitelist on your server load the plugin by putting this css_plugins load "plugins/disabled/WhiteList/WhiteList.dll" in one of your .cfg files.
If you want it to load on every mod on your server, you can put it in your /custom_files/cfg/custom_all.cfg file.
The whitelist file is located at /game/csgo/addons/counterstrikesharp/plugins/disabled/WhiteList/whitelist.txt which you would put in /custom_files/addons/counterstrikesharp/plugins/disabled/WhiteList/whitelist.txt so it is not overwritten.
Failed to open libtier0.so (/home/steam/cs2/bin/libgcc_s.so.1: version 'GCC_7.0.0' not found (required by /lib/i386-linux-gnu/libstdc++.so.6))
This is because Valve ships their own copies of those libraries. As modern systems will have newer versions, you can safely delete the listed file from the server install. Do not delete the file in the system path (usually lib or lib32)*.
cd /home/steam/cs2/bin/ and rm libgcc_s.so.1 and restart the server.
See LICENSE for more details.



















































































































































































