Egg Repository

Pterodactyl Community Egg Repository

Counter Strike 1.6 - Vanilla

Counter Strike 1.6 - Vanilla Counter-Strike: 1.6 is a multiplayer first-person shooter video game developed by Valve Corporation.

Read Me

Counter-Strike: 1.6

Description

Counter-Strike 1.6

Play the world's number 1 online action game. Engage in an incredibly realistic brand of terrorist warfare in this wildly popular team-based game. Ally with teammates to complete strategic missions. Take out enemy sites. Rescue hostages. Your role affects your team's success. Your team's success affects your role.

System Requirements

ComponentMinimumRecommended
Processor--
RAM1 GB2 GB
Storage2 GB5 GB

Server Ports

Ports required to run the server in a table format.

Portdefault
Game27015
Source TV27020
Client27005
Steam26900

Notes

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.

Yolks
NameTag
ghcr.io/ptero-eggs/games:sourceghcr.io/ptero-eggs/games:source
Variables and Startup

Startup Command

./hlds_run -console {{SERVER_PORT}} -game cstrike -{{SRV_SECURE}} +port {{SERVER_PORT}} +sv_lan 0 +maxplayers {{SRV_SLOTS}} +map {{SRV_STARTMAP}} +sys_ticrate 1200 -pingboost {{SRV_PINGBOOST}} -norestart

Variables

Server Hostname

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

Environment Variable: HOSTNAME
Default Value: Counter-Strike 1.6 Server
User Viewable:
User Editable:
Max Players (Slots)

Environment Variable: SRV_SLOTS
Default Value: 32
User Viewable:
User Editable:
Startmap

Environment Variable: SRV_STARTMAP
Default Value: de_dust2
User Viewable:
User Editable:
Pingboost

Environment Variable: SRV_PINGBOOST
Default Value: 2
User Viewable:
User Editable:
Game ID

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

Environment Variable: SRCDS_APPID
Default Value: 90
User Viewable:
User Editable:
Beta branch

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

Environment Variable: SRCDS_BETAID
Default Value:
User Viewable:
User Editable:
Steam Username

Username associated wanted to be used. Not needed.

Environment Variable: STEAM_USER
Default Value:
User Viewable:
User Editable:
Steam Password

Steam Password for account. Not needed.

Environment Variable: STEAM_PASS
Default Value:
User Viewable:
User Editable:
Steam Auth

Steam authenticator code for the account. Not Needed.

Environment Variable: STEAM_AUTH
Default Value:
User Viewable:
User Editable:
Secure or Insecure

Environment Variable: SRV_SECURE
Default Value: secure
User Viewable:
User Editable:
Install Script
#!/bin/bash
# steamcmd Base Installation Script
#
# Server Files: /mnt/server
## download and install steamcmd
# Ensure Steam credentials are set
if [[ -z "${STEAM_USER}" ]] || [[ -z "${STEAM_PASS}" ]]; then
    echo -e "Steam user is not set."
    echo -e "Using anonymous login."
    STEAM_USER=anonymous
    STEAM_PASS=""
    STEAM_AUTH=""
else
    echo -e "User set to ${STEAM_USER}"
fi

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
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} $( [[ "${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 ## other flags may be needed depending on install. looking at you cs 1.6
# Needed for cs 1.6
./steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir /mnt/server +app_update "90 -beta Beta" validate +quit ## looking at cs 1.6

# Ensure listip.cfg exists
if [[ ! -f "/mnt/server/cstrike/listip.cfg" ]]; then
    echo "// This file stores banned IPs" > /mnt/server/cstrike/listip.cfg
    echo "Created listip.cfg..."
else
    echo "listip.cfg already exists."
fi

# Ensure banned.cfg exists
if [[ ! -f "/mnt/server/cstrike/banned.cfg" ]]; then
    echo "// This file stores banned Steam IDs and IPs" > /mnt/server/cstrike/banned.cfg
    echo "Created banned.cfg..."
else
    echo "banned.cfg already exists."
fi

# Ensure server.cfg hostname is up-to-date
SERVER_CFG_PATH="/mnt/server/cstrike/server.cfg"
if [[ -f "$SERVER_CFG_PATH" ]]; then
    sed -i "s/^hostname .*/hostname \"${HOSTNAME}\"/" "$SERVER_CFG_PATH"
fi

## 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

echo "-----------------------------------------"
echo "Installation Complete!"
echo "-----------------------------------------"
Installation Imageghcr.io/ptero-eggs/installers:debianInstallation Entrypointbash