Tweaking your Counter-Strike 2 server

Small tweaks like server name, server settings and the mapcycle.

First thing you need to do, login here with your Steam account and generate a 'Game Server Login Token' (gslt). Use App ID 730.

If the Counter-Strike 2 process is running then first kill it. When the Counter-Strike 2 process isn't running then proceed to step 4.

1.  SSH to the server
2.  screen -r
3.  quit
4.  CTRL + c

5.  cd ~/cs2-ds/game/csgo/cfg/
6.  touch banned_user.cfg
7.  touch banned_ip.cfg

8.  mv server.cfg server.bak
9.  wget https://zeus.geforce.nl/~mb/files/games/cs2/server.cfg

	- Don't forget to edit the newly downloaded server.cfg to your own needs and settings

10. mv gamemode_competitive.cfg gamemode_competitive.bak
11. wget https://styx.geforce.nl/~mb/files/games/cs2/gamemode_competitive.cfg

	- Don't forget to edit the newly downloaded gamemode_competitive.cfg  to your own needs and settings

12. mv gamemode_casual.cfg gamemode_casual.bak
13. wget https://styx.geforce.nl/~mb/files/games/cs2/gamemode_casual.cfg

        - Don't forget to edit the newly downloaded gamemode_casual.cfg  to your own needs and settings

14. chmod 775 server.cfg banned_user.cfg banned_ip.cfg gamemode_competitive.cfg gamemode_casual.cfg
15. ln -s gamemode_competitive.cfg gamemode_competitive_server.cfg
16. ln -s gamemode_casual.cfg gamemode_casual_server.cfg
17. cd ..
18. wget https://zeus.geforce.nl/~mb/files/games/cs2/mapcycle.txt

        - Don't forget to edit the newly downloaded mapcycle.txt to your own needs

19. chmod 775 mapcycle.txt
20. cp mapcycle.txt mapcycle_default.txt
21. cd cfg/
22. ln -s ../mapcycle.txt mapcycle.txt
23. ln -s ../mapcycle_default.txt mapcycle_default.txt
24. cd ../../bin/linuxsteamrt64/
25. ./cs2 -dedicated +ip 192.168.1.95 -port 27016 -usercon +game_mode 0 +game_type 0 +map de_nuke -maxplayers 24 +sv_setsteamaccount <gslt>

        - You can leave out '+ip 192.168.1.95 -port 27016' when using default or change them to your needs

26. After a few seconds and some stuff in your console you should see the following:

	SV:  VAC secure mode is activated.
	Certificate expires in 47h45m at 1698842922 (current time 1698670994), will renew in 45h45m
	Host activate: Loading (de_dust2)

27. The server is running, you can check this bij typing 'status', you should see the following:

	----- Status -----
	@ Current  :  game
	source   : console
	hostname : Geforce.nl Counter-Strike 2 - 1000FPS
	spawn    : 1
	version  : 1.39.6.5/13965 9842 secure  public
	steamid  : [G:1:10412051] (85568392930451475)
	udp/ip   : 192.168.1.95:27016 (public 127.0.0.1:27016)
	os/type  : Linux dedicated
	players  : 0 humans, 0 bots (0 max) (not hibernating) (unreserved)

28. CTRL a + d (detached)
29. Done! You now have a fully functional and customized Counter-Strike 2 server running without mods/scripts.
30. Click here for installing some cool mods and make your Counter-Strike 2 server stand out!



Install 1000 HZ kernel and achieve a 1000 FPS server

Back in the days you had to manually compile a kernel and set it to 1000 Hz, nowadays it's a lot easier to get this done.

I don't think this works on VPS, cause those CPU's are virtual & shared. So this probably only works on dedicated servers.

Before with normal kernel:

1.  grep 'CONFIG_HZ=' /boot/config-$(uname -r)

        CONFIG_HZ=250

2.  sudo apt update
3.  sudo apt -y install linux-lowlatency
4.  sudo reboot

Afterwards with low latency kernel:

5.  grep 'CONFIG_HZ=' /boot/config-$(uname -r)

        CONFIG_HZ=1000

To remove the low latency kernel and go back to the normal kernel use the following:

6.  sudo apt-get -y autoremove --purge linux-lowlatency