Jump to content

Daemon

Recommended Posts

  • Administrator
Bellow you can find all the commands that you need to create an Counter-Strike: 1.6 Server on Ubuntu 22.04.1

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 steamcmd

Add the multiverse repository and the i386 architecture:

sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
Update the repository to make sure new packages can be installed:
sudo apt update
Install the 32 bit libraries that steamcmd requires:
sudo apt install lib32gcc-s1 lib32stdc++6 libc6-i386 libcurl4-gnutls-dev:i386 libsdl2-2.0-0:i386


Security

Secure your game server add new user and set new password
adduser cstrike_server
Change to the new user
sudo su cstrike_server
  • You can find his directory on /home/cstrike_server
Security tips for your server here: soon

 

Server files

Download the latest version of the server use the command:
curl -sqL "https://github.com/oldstyle-community/cstrike_steamcmd/archive/refs/tags/8684.tar.gz" | tar zxvf -
Set permissions:
chmod -R 777 ~/cstrike_steamcmd-8684
Test if the server starts using this command, remember edit the <IP> with your vps/vds ip address:
./hlds_run -console -game cstrike +ip <IP> +port 27015 +map de_dust +maxplayers 32 +pingboost 2 +sys_ticrate 1000
  • In case of 'FATAL ERROR (shutting down): Unable to initialize Steam.' press CTRL+C and try again one more time the command above.

 

Now 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.

cd ~/cstrike_steamcmd-8684 && screen -S CSTRIKE_SERVER -X quit && screen -S CSTRIKE_SERVER -d -m ./hlds_run -console -game cstrike +ip <IP> +port 27015 +map de_dust +maxplayers 32 +pingboost 2 +sys_ticrate 1000

To leave the console wihout closing the server press:

CTRL+A+D

If you want to open the console back use the command:

screen -r CSTRIKE_SERVER

 

E.G.

  Reveal hidden contents

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 ACCEPT

Done.

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:

  1. AMX Mod X
  2. Metamod
  3. dproto

Done.

ReHLDS

Here you can see what ReHLDS means and how to install it: https://olds.ro/topic/14729-how-to-install-rehlds-tutorial/

  1. AMX Mod X
  2. Metamod-p
  3. Reunion

Done.

 

Sources used in this tutorial:

HLDS, AMX Mod X, Metamod, dproto

ReHLDS, AMX Mod X, metamod-p, reunion

OLD STEAMCMD NOT WORKING ANYMORE

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.)

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:

quit

To stat the server just for an test:

E.G. a directory named cs_server:

cd ~/Steam/cs_server/

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...