←
Setting up a Counter-Strike 2 server using SteamCMD
32/64 bit Debian/Ubuntu Linux procedure
When using 64 bit Debian/Ubuntu begin with step 1. When using 32 bit Debian/Ubuntu start with step 4.
1. sudo add-apt-repository multiverse
2. sudo apt install software-properties-common
3. sudo dpkg --add-architecture i386
4. sudo apt update
5. sudo apt -y install lib32z1 lib32gcc-s1 lib32stdc++6 libstdc++6:i386 libsdl2-2.0-0:i386 libcurl4-gnutls-dev:i386 libc6-i386 net-tools wget xz-utils unzip zip gdb mlocate screen steamcmd
6. steamcmd
Some warnings might show up during the installation process:
- ln: failed to create symbolic link '/home/user/.steam/root': No such file or directory
- ln: failed to create symbolic link '/home/user/.steam/steam': No such file or directory
- ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
- Loading Steam API...dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
- dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
These warnings have no further meaning and can be ignored for now.
7. Steam> force_install_dir /home/username/cs2-ds <- change the username to yours!
8. Steam> login <steamid>
password: <your Steam password>
Steam Guard code: <your Steam Guard code>
OK
Waiting for client config...OK
Waiting for user info...OK
9. Steam> app_update 730 validate
- Downloading all files might take a while, wait till you'll see the following:
Success! App '730' fully installed.
10. Steam> quit
11. mkdir -p .steam/sdk32 && cd ~/.steam/sdk32/ && ln -s ~/.local/share/Steam/steamcmd/linux32/steamclient.so ~/.steam/sdk32/steamclient.so && cd ~/
12. mkdir -p .steam/sdk64 && cd ~/.steam/sdk64/ && ln -s ~/.local/share/Steam/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
13. cd ~/cs2-ds/game/csgo/bin/linuxsteamrt64/ && ln -s libserver.so libserver_valve.so
14. cd ~/cs2-ds/game/csgo/cfg/ && touch skill1.cfg && chmod 775 skill1.cfg
15. cd ~/cs2-ds/game/bin/linuxsteamrt64/
16. screen
17. ./cs2 -dedicated +map de_dust2
18. After a few seconds and some stuff in your console you should see the following:
Host activate: Loading (de_dust2)
SV: VAC secure mode is activated.
AuthStatus (steamid:90177510151657490): OK (OK)
Certificate expires in 48h00m at 1698835073 (current time 1698662272), will renew in 46h00m
GC Connection established for server version 2000177, instance idx 1
19. The server is running, you can check this bij typing 'status', you should see the following:
----- Status -----
@ Current : game
source : console
hostname : Counter-Strike 2
spawn : 1
version : 1.39.6.5/13965 9842 secure public
steamid : [A:1:3142686738:24567] (90177510151657490)
udp/ip : 192.168.1.95:27015 (public 127.0.0.1:27015)
os/type : Linux dedicated
players : 0 humans, 2 bots (0 max) (hibernating) (unreserved)
20. CTRL a + d (detached)
21. Done! You now have a fully functional Counter-Strike 2 server running.
22. Click here for "tweaking" your server with small adjustments and make it your own!
→
In case you made a boo-boo
In case you made mistakes and would like to start over or for whatsoever reason want to delete everything, I have a nice and quick solution for that.
1. cd
2. vi remove_cs2
3. sudo rm -rf cs2-ds/ .local/ .steam/ Steam/ .config/ .cache/ .lesshst .wget-hsts && sudo apt-get remove steamcmd --purge && sudo updatedb && sudo apt autoremove && sudo locate steam
4. chmod 755 remove_cs2
- You can now execute the file over and over again:
5. ./remove_cs2
All installed files and folders are now removed and you can start over from scratch 😓