Skip to content

Counter Strike 1.6 - ReHLDS

CS 1.6 ReHLDS binaries egg. ReHLDS is a reverse-engineered, optimized version of HLDS. Developed by third-party modders to improve stability, performance, and security. Fully compatible with MetaMod, AMX Mod X, and other plugins. Included modules are rehlds, reunion, amxmodx, metamod-r, reapi and ReGameDLL_CS

egg-counter-strike-1-6-rehlds.json

updated

Ports

Add an allocation on the node for each port.

  • Game 27015
  • Source TV 27020
  • Client 27005
  • Steam 26900

Install

Installer image
ghcr.io/ptero-eggs/installers:debian
Steam app
90
Steam login
not required
Install script
138 lines

Image

  • source image ghcr.io/ptero-eggs/games:source

Panel features

  • steam_disk_space

    The Panel tells the user when SteamCMD does not have enough disk space.

Startup

The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.

10 variables

Startup command

./hlds_run -console -game cstrike -port 27015 -sport 26900 +map de_dust2 +ip 0.0.0.0 -strictportbind -norestart +maxplayers 32 +pingboost 2 +sys_ticrate 1200

Dotted values come from the server settings. These values are examples.

  • The version of ReHLDS to install, or 'latest' for the latest release.

    VERSIONUsers cannot see

    required|string

  • Available Modules: rehlds, reunion, amxmodx, metamod-r, reapi and ReGameDLL_CS

    INSTALL_MODULESUsers can edit

    required|string|max:128

  • This sets the hostname of the server. Example: "My Custom CS 1.6 Server"

    HOSTNAMEUsers can edit

    required|string|max:128

  • The default map for the server.

    SRCDS_MAPUsers can edit

    required|string|alpha_dash

  • Auto update on restart

    AUTO_UPDATEUsers cannot see

    required|boolean

  • The ID corresponding to the game to download and run using HLDS. The HLDS server ID is 90. This should not be changed.

    SRCDS_APPIDUsers cannot see

    required|numeric|in:90

  • The name corresponding to the game to download and run using HLDS

    HLDS_GAMEUsers cannot see

    required|alpha_dash|between:1,100

  • Leave empty for the public branch, for the legacy version select steam_legacy.

    SRCDS_BETAIDUsers cannot see

    nullable|string|in:,steam_legacy

  • Specifies the VAC port the server should use. Default is 26900.

    VAC_PORTUsers cannot see

    required|numeric|digits_between:1,5

  • Validate game files on update. Keep it disabled with ReHLDS due to SteamCMD overwriting its changes

    VALIDATEUsers cannot see

    required|boolean

Wings

Stop command
quit
Running when the console shows
Connection to Steam servers successful

Readme

Counter-Strike 1.6 ReHLDS

Description

Counter-Strike 1.6 ReHLDS (Reverse Engineered Half-Life Dedicated Server) is an optimized and updated version of the original HLDS, designed for stability, performance, and security. It provides a modern platform for hosting Counter-Strike 1.6 servers with improved support for custom plugins and modules.

This egg offers everything you need to set up a Counter-Strike 1.6 server using ReHLDS, MetaMod-R, AMX Mod X, and other popular tools.

System Requirements

Component Minimum Recommended
Processor - -
RAM 1 GB 2 GB
Storage 2 GB 5 GB

Server Ports

Ports required to run the server in a table format.

Port default
Game 27015
Source TV 27020
Client 27005
Steam 26900

27015 is the default port, but any port can be used. The only required port is the Game port, server can run perfectly fine without other allocations.

Modules

  • ReHLDS: Improved performance, crash protection, and extended features.
  • MetaMod-R: Plugin loader for custom server modifications.
  • AMX Mod X: Advanced scripting platform for server plugins.
  • ReAPI: Enhances plugin capabilities with new native functions.
  • ReGameDLL: Updated game library for improved functionality.
  • Reunion: A Metamod plugin that allows protocol 47 and 48 non-steam clients to connect to ReHLDS servers

Notes

  • The server installation includes default configuration files such as server.cfg, listip.cfg, and banned.cfg.

For further configuration or plugin information, refer to the official AMX Mod X documentation or the ReHLDS GitHub repository.

Changes

  1. Rehlds: Small tweaks and fixes

    · Red Banana · e207558

  2. Counter strike 1.6 updates (#74)

    · Red Banana · e450925

  3. Update cs1.6 (#70)

    · Red Banana · a62afbb

  4. Add counter-strike 1.6-rehlds (#69)

    · Red Banana · bf2887d

All changes on GitHub

Problem with this egg?

Open an issue on GitHub. Include your Panel and Wings versions.

Install script 138 lines bash in ghcr.io/ptero-eggs/installers:debian Show
#!/bin/bash

if [[ -z "${STEAM_USER}" ]] || [[ -z "${STEAM_PASS}" ]]; then
    echo -e "Steam user is not set.\nUsing anonymous user."
    STEAM_USER=anonymous
    STEAM_PASS=""
    STEAM_AUTH=""
else
    echo -e "User set to ${STEAM_USER}"
fi

# Download and install SteamCMD
cd /tmp
mkdir -p /mnt/server/steamcmd
curl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzvf steamcmd.tar.gz -C /mnt/server/steamcmd
mkdir -p /mnt/server/steamapps
cd /mnt/server/steamcmd

chown -R root:root /mnt
export HOME=/mnt/server

# Install game via SteamCMD
./steamcmd.sh \
+force_install_dir /mnt/server \
+login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} \
+app_set_config 90 mod ${HLDS_GAME} \
$( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) \
+app_update ${SRCDS_APPID} \
$( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) \
$( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) \
${INSTALL_FLAGS} validate \
+quit

mkdir -p /mnt/server/.steam/sdk32
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
mkdir -p /mnt/server/.steam/sdk64
cp -v linux64/steamclient.so ../.steam/sdk64/steamclient.so

cd /mnt/server

# Download repo etc
REPO_OWNER="Red-Banana-Official"
REPO_NAME="cstrike1.6_rehlds"
RELEASE_DATA=$(curl -s https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest)

TAG_NAME=$(echo "$RELEASE_DATA" | jq -r '.tag_name')
[[ "$TAG_NAME" == "null" ]] && TAG_NAME="1.0.0"

DOWNLOAD_URL=$(echo "$RELEASE_DATA" | jq -r '.zipball_url')
OUTPUT_FILE="$REPO_NAME-$TAG_NAME.zip"

rm -rf ${REPO_OWNER}-*
echo "Downloading release: $OUTPUT_FILE"
curl -sSL -o "$OUTPUT_FILE" "$DOWNLOAD_URL" || { echo "Failed to download $OUTPUT_FILE"; exit 1; }
echo "Downloaded: $OUTPUT_FILE"
echo "-----------------------------------------"

unzip -q -o "$OUTPUT_FILE"
rm -f "$OUTPUT_FILE"

EXTRACTED_DIR=$(find . -maxdepth 1 -type d -name "${REPO_OWNER}-*" | head -n 1)
cd "$EXTRACTED_DIR"

# Module install
install_module() {
    local NAME=$1
    local DIR=$2
    ZIP=$(find modules/$DIR/ -type f -name '*.zip' | sort -V | tail -n 1)
    
    if [[ -z "$ZIP" ]]; then
        echo "Error: ZIP file for module '$NAME' not found."
        return 1
    fi

    echo "Installing module: $NAME"
    
    mkdir -p "${NAME}-install"
    cp "$ZIP" "${NAME}-install"
    cd "${NAME}-install"
    unzip -q -o *.zip

    case "$NAME" in
        "rehlds"|"ReGameDLL_CS") 
            cp -r bin/linux32/* /mnt/server
            ;;
        "amxmodx"|"reapi") 
            cp -r addons /mnt/server/cstrike
            ;;
        "metamod-r")
            cp -r addons /mnt/server/cstrike
            mkdir -p /mnt/server/cstrike/addons/metamod
            touch /mnt/server/cstrike/addons/metamod/plugins.ini
            grep -qxF "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" /mnt/server/cstrike/addons/metamod/plugins.ini || echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> /mnt/server/cstrike/addons/metamod/plugins.ini
            sed -i 's|^gamedll_linux.*|gamedll_linux "addons/metamod/metamod_i386.so"|' /mnt/server/cstrike/liblist.gam || echo 'gamedll_linux "addons/metamod/metamod_i386.so"' >> /mnt/server/cstrike/liblist.gam
            ;;
        "reunion")
            mkdir -p /mnt/server/cstrike/addons/metamod/reunion/
            cp -r bin/Linux/* /mnt/server/cstrike/addons/metamod/reunion/
            touch /mnt/server/cstrike/addons/metamod/plugins.ini
            grep -qxF "linux addons/metamod/reunion/reunion_mm_i386.so" /mnt/server/cstrike/addons/metamod/plugins.ini || echo "linux addons/metamod/reunion/reunion_mm_i386.so" >> /mnt/server/cstrike/addons/metamod/plugins.ini
            cp reunion.cfg /mnt/server/cstrike/reunion.cfg
            SALT=$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 50)
            sed -i "s/^SteamIdHashSalt\s*=.*/SteamIdHashSalt = $SALT/" /mnt/server/cstrike/reunion.cfg
            ;;
    esac

    cd ..
    rm -rf "${NAME}-install"
    echo "Module '$NAME' installed successfully."
}

declare -A MODULES=(
    ["rehlds"]="rehlds"
    ["amxmodx"]="amxmodx"
    ["ReGameDLL_CS"]="ReGameDLL_CS"
    ["reapi"]="reapi"
    ["metamod-r"]="metamod-r"
    ["reunion"]="reunion"
)

IFS=',' read -r -a MODULE_LIST <<< "${INSTALL_MODULES}"
for mod in "${MODULE_LIST[@]}"; do
    [[ -n "${MODULES[$mod]}" ]] && install_module "$mod" "${MODULES[$mod]}"
done

# Ensure files exist
mkdir -p /mnt/server/cstrike/addons/amxmodx/data
[[ ! -f /mnt/server/cstrike/listip.cfg ]] && echo "// Banned IPs" > /mnt/server/cstrike/listip.cfg
[[ ! -f /mnt/server/cstrike/banned.cfg ]] && echo "// Banned IDs" > /mnt/server/cstrike/banned.cfg
[[ ! -f /mnt/server/cstrike/addons/amxmodx/data/csstats.dat ]] && touch /mnt/server/cstrike/addons/amxmodx/data/csstats.dat

chmod -R 777 /mnt/server
rm -rf /mnt/server/Red-Banana-Official-*

echo "-----------------------------------------"
echo "Installation Complete!"
echo "-----------------------------------------"