Downloading and running Counter-Strike: 2 server via SteamCMD on OS Debian 12 using VPS server ✅

This article was written using Debian 12, but it will probably work just as well for Ubuntu 22.04

The first thing we need to do is to update the system packages to the latest version.
Run the following commands one by one on your VPS server.
apt update -y
apt upgrade -y
Install the required packages for the server
apt-get install lib32gcc-s1 screen curl -y
Next we will create a user for steamcmd and under which we will run our server, this is important, because under root just steamcmd will not want to work.
useradd -d/home/steamcmd -m steamcmd -s /bin/bash
Let's specify the password, where passwordsteamcmd is the password for the user
echo steamcmd:passwordsteamcmd | chpasswd

Log in as user
su - steamcmd
we go straight to the user's working folder that we specified during creation (/home/steamcmd).
Execute the commands one by one
mkdir ~/Steam && cd ~/Steam
curl -sqL "" | tar zxvf -

log in with your steam login and password
login steamuser steampass
also enter the code for dual-factor authorisation if you have it set upsteam code (2fa) if you have one.

Now let's specify the folder for downloading
force_install_dir /home/steamcmd/
and then we start the download process
app_update 730 validate
wait for Counter-Strike:2 to finish loading.

After the download is complete, we can exit steamcmd with the exit command or by pressing CTRL+C
create some mandatory folders and copy the files to start the server
mkdir /home/steamcmd/.steam/{sdk32,sdk64} -p
cp -rf /home/steamcmd//Steam/linux32/ /home/steamcmd/.steam/sdk32/
cp -rf /home/steamcmd//Steam/linux64/ /home/steamcmd/.steam/sdk64/

and start the server with the command
/home/steamcmd/game/bin/linuxsteamrt64/cs2 -dedicated +ip $(curl -port 27015 +map de_dust2

what can we do to simplify the startup and the ability to close the terminal, but to keep the server running?
simply write the start command in the file
echo -e '#!/bin/bash\n/home/steamcmd/game/bin/linuxsteamrt64/cs2 -dedicated +ip $(curl -port 27015 +map de_dust2' >
change the permissions of the file to allow it to run.
chmod +x
Now you can start the CS2 server in screen, so you don't have to worry about it running after closing the terminal.
screen -AmdS server_cs2 /home/steamcmd/
now you actually have "2 desktops", if you write screen -list, you will see a list of screens.
If you execute screen -x server_cs2 or screen -r server_cs2 you will get to your screen where cs2 server is running, you can easily execute commands in the server console and minimise it by pressing CTRL+A+D at the same time.
If you want to close it, go to your screen and press CTRL+C

✅ We hope we have fully answered the question: How do you install and run a dedicated Counter-Strike:2 server on a VPS Linux



Select a plan: ➡️


Was this answer helpful? 1 Users Found This Useful (1 Votes)