1. Create a directory for SteamCMD and switch to it.
mkdir ~/Steam && cd ~/Steam
2. Download and extract SteamCMD for Linux.
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
To download the server you need to go in the Steam folder:
cd ~/Steam && ./steamcmd.sh
And you can login anonymously using the command:
login anonymous
Set your app install directory
force_install_dir <path>
E.G. a directory named cs_server inside the current directory:
force_install_dir ./cs_server/
Install or update the app using the app_update command
app_set_config 90 mod cstrike
BUG
HLDS (appid 90) currently requires multiple runs of the app_update command before all the required files are successfully installed.
Simply run app_update 90 validate multiple times until no more updates take place (Success! App '90' already up to date.)
Requirements
Default
sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386 steamcmdAdd the multiverse repository and the i386 architecture:
sudo add-apt-repository multiverse sudo dpkg --add-architecture i386sudo apt updatesudo apt install lib32gcc-s1 lib32stdc++6 libc6-i386 libcurl4-gnutls-dev:i386 libsdl2-2.0-0:i386Security
adduser cstrike_serversudo su cstrike_serverServer files
curl -sqL "https://github.com/oldstyle-community/cstrike_steamcmd/archive/refs/tags/8684.tar.gz" | tar zxvf -chmod -R 777 ~/cstrike_steamcmd-8684Now if is working you can start the server with the command screen and if you close your ssh console the server will be on always.
To leave the console wihout closing the server press:
CTRL+A+DIf you want to open the console back use the command:
screen -r CSTRIKE_SERVERE.G.
./hlds_run -console -game cstrike +ip 192.168.1.2 +port 27015 +map de_dust2 +maxplayers 32
Auto-restarting the server on crash
Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 10
Forcing breakpad minidump interfaces to load
dlopen failed trying to load:
/root/.steam/sdk32/steamclient.so
with error:
/root/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 19:52:19 Aug 3 2020 (8684)
STEAM Auth Server
Server IP address 95.111.246.0:27000
scandir failed:/root/Steam/cs_server/./cstrike/SAVE
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
CAppInfoCacheReadFromDiskThread took 7 milliseconds to initialize
RecordSteamInterfaceCreation (PID 26996): SteamGameServer011 / GameServer
RecordSteamInterfaceCreation (PID 26996): SteamUtils005 / Utils
RecordSteamInterfaceCreation (PID 26996): STEAMAPPS_INTERFACE_VERSION005 / Apps
RecordSteamInterfaceCreation (PID 26996): STEAMHTTP_INTERFACE_VERSION002 / HTTP
RecordSteamInterfaceCreation (PID 26996): SteamNetworking005 / Networking
RecordSteamInterfaceCreation (PID 26996): SteamGameServerStats001 / GameServerStats
dlopen failed trying to load:
/root/.steam/sdk32/steamclient.so
with error:
/root/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
couldn't exec listip.cfg
couldn't exec banned.cfg
Connection to Steam servers successful.
VAC secure mode is activated.
Login Failure: No Connection
On linux servers, you may experience a "Login Failure: No Connection" error.
This is related to missing iptables rules.
You will want something along these lines:
iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPTDone.
ReHLDS or HLDS
If you want to use ReHLDS scroll down to the section, if not use HLDS steps.
HLDS
If you want to customize your server with addons and plugins follow the steps bellow:
Done.
ReHLDS
Here you can see what ReHLDS means and how to install it: https://olds.ro/topic/14729-how-to-install-rehlds-tutorial/
Done.
Sources used in this tutorial:
HLDS, AMX Mod X, Metamod, dproto
ReHLDS, AMX Mod X, metamod-p, reunion
OLD STEAMCMD NOT WORKING ANYMORE
mkdir ~/Steam && cd ~/Steam2. Download and extract SteamCMD for Linux.
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -To download the server you need to go in the Steam folder:
And you can login anonymously using the command:
login anonymousSet your app install directory
E.G. a directory named cs_server inside the current directory:
force_install_dir ./cs_server/Install or update the app using the app_update command
app_set_config 90 mod cstrikeBUG
HLDS (appid 90) currently requires multiple runs of the app_update command before all the required files are successfully installed.
Simply run app_update 90 validate multiple times until no more updates take place (Success! App '90' already up to date.)
app_update 90; app_update 90 validate; app_update 90 -beta beta; app_update 90 -beta beta validate; app_update 90 -beta prerelease validate;Run the commands 2/3 times.
To exit form the steamcmd terminal use:
quitTo stat the server just for an test:
E.G. a directory named cs_server:
cd ~/Steam/cs_server/