Skip to content

Custom ReHLDS Engine Game

This option allows modifying the startup arguments and other details to run a custom HLDS based game on the panel, substituting the official Valve engine binaries with the ReHLDS binaries.

egg-custom-rehlds-engine-game.json

updated

Ports

Add an allocation on the node for each port.

  • Game/rcon 27015
  • HLTV 27020
  • VAC 26900

Install

Installer image
ghcr.io/ptero-eggs/installers:debian
Steam app
90
Steam login
optional
Install script
71 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.

11 variables

Startup command

./hlds_run -console -game valve -port 27015 -sport 26900 +map crossfire +ip 0.0.0.0 -strictportbind -norestart

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

  • 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. all the HLDS server names are here - https://developer.valvesoftware.com/wiki/Dedicated_Server_Name_Enumeration

    HLDS_GAMEUsers can see

    required|alpha_dash|between:1,100

  • The default map for the server.

    SRCDS_MAPUsers can edit

    required|string|alpha_dash

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

    VAC_PORTUsers can see

    required|numeric|digits_between:1,5

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

    VERSIONUsers cannot see

    required|string

  • Validate game files on update. Recommended to turn off with ReHLDS due to SteamCMD overwriting its changes

    VALIDATEUsers cannot see

    required|boolean

  • Username associated wanted to be used. Not needed.

    STEAM_USERUsers can edit

    nullable|string

  • Steam Password for account.

    STEAM_PASSUsers can edit

    nullable|string

  • Steam authenticator code for the account

    STEAM_AUTHUsers can edit

    nullable|string

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

    SRCDS_BETAIDUsers can edit

    nullable|string|in:,steam_legacy

  • Auto update on restart

    AUTO_UPDATEUsers can edit

    required|boolean

Wings

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

Readme

HLDS Servers

This is for older games like CS 1.6 (default game) and other servers that still run on the older HLDS server under id 90

ReHLDS

ReHLDS is a reverse engineered build of the original HLDS (build 6152/6153), and provides a number of fixes and improvements over the vanilla engine files, while remaining compatible with vanilla clients.

Github: https://github.com/dreamstalker/rehlds

Server Ports

HLDS servers require up to 6 ports

Port default
Game/rcon 27015
HLTV 27020
VAC 26900

Changes

  1. Add steamcmd based eggs

    · Daniel Barton · 60ef9fb

All changes on GitHub

Problem with this egg?

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

Install script 71 lines bash in ghcr.io/ptero-eggs/installers:debian Show
#!/bin/bash
# SRCDS Base Installation Script
#
# Server Files: /mnt/server

# just in case someone removed the defaults.
if [[ "${STEAM_USER}" == "" ]] || [[ "${STEAM_PASS}" == "" ]]; then
    echo -e "steam user is not set.\n"
    echo -e "Using anonymous user.\n"
    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 # Fix steamcmd disk write error when this folder is missing
cd /mnt/server/steamcmd

# SteamCMD fails otherwise for some reason, even running as root.
# This is changed at the end of the install process anyways.
chown -R root:root /mnt
export HOME=/mnt/server


## install game using 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


## set up 32 bit libraries
mkdir -p /mnt/server/.steam/sdk32
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so

## set up 64 bit libraries
mkdir -p /mnt/server/.steam/sdk64
cp -v linux64/steamclient.so ../.steam/sdk64/steamclient.so


# Github Release Grabber script
## get release info and download links
LATEST_JSON=$(curl --silent "https://api.github.com/repos/dreamstalker/rehlds/releases/latest")
RELEASES=$(curl --silent "https://api.github.com/repos/dreamstalker/rehlds/releases")
MATCH="rehlds-bin"

if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
    DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})
else
    VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .tag_name')
    if [ "${VERSION}" == "${VERSION_CHECK}" ]; then
        DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -Ei ${MATCH})
    else
        echo -e "defaulting to latest release"
        DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)
    fi
fi

cd /tmp
curl -sSL -o rehlds-bin.zip ${DOWNLOAD_URL}
unzip -q -o rehlds-bin.zip

cp -r /tmp/bin/linux32/* /mnt/server

## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"