Launching and Configuring Counter-Strike 1.6 Server on Linux

I will describe the installation and configuration of the Counter-Strike 1.6 game server.
On the test I will use Linux Ubuntu Server 18.04.

Create a directory, go to it and download the archive with installation files from the official website:

mkdir ~/SteamCMD
cd ~/SteamCMD
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz

Unpack the downloaded archive, delete it and make the installation script executable:

tar xfz steamcmd_linux.tar.gz
rm steamcmd_linux.tar.gz
chmod +x steamcmd.sh

Install the necessary libraries so that you can run 32-bit applications:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install lib32gcc1

Run the installation script:

./steamcmd.sh

Log in anonymously on the official server:

login anonymous

You may have to log in using your Steam account username and password:

login USERNAME

After entering the command, you must enter the password, wait, and you may also need to enter the Steam Guard code that will come by email.

Specify the directory for the downloaded files:

force_install_dir ../hlds

We execute the command to start downloading files (two times, since the first time the process is interrupted):

app_update 90 validate

At the end we will see the message:

Success! App ’90’ fully installed.

Exit the command line installation script:

quit

Create the necessary directories and files:

mkdir ~/.steam
ln -s ~/SteamCMD/linux32 ~/.steam/sdk32
touch ~/hlds/cstrike/listip.cfg
touch ~/hlds/cstrike/banned.cfg

Go to the directory with the downloaded files and try to run the Counter-Strike 1.6 server for the test:

cd ~/hlds
./hlds_run -game cstrike +ip 0.0.0.0 +maxplayers 12 +map de_dust2

If everything is ok, interrupt the server by typing quit or pressing CTRL+C.
Install Screen so that you can start the server in the background and exit Linux:

sudo apt-get install sudo screen

Run a new Screen session and start the server (where 192.168.1.50 is your dedicated IP that is visible from the Internet):

screen -a
cd ~/hlds
./hlds_run -game cstrike -console +ip 192.168.1.50 +maxplayers 32 +map de_dust2 -secure -sv_lan 0 -autoupdate -port 27015

Press Ctrl+a and immediately z to disconnect from the session and leave it running as a background process.
In the future, to return, let’s see the list of running sessions and connect to the desired one:

screen -ls
screen -r NAME

I described in more detail how to use Screen in this article – How to install and use Screen
See my other articles in the category – Counter-Strike

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a comment

Leave a Reply