Counter Strike 1.6 - Vanilla

games
Report Issue

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

Contributors:
README

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

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

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.

Docker Images (1)
Name Image
ghcr.io/ptero-eggs/games:source ghcr.io/ptero-eggs/games:source
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 (10)

Server Hostname

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

Environment:
HOSTNAME
Default:
Counter-Strike 1.6 Server
User Viewable:
User Editable:
Rules:
required|string|max:128

Max Players (Slots)

Environment:
SRV_SLOTS
Default:
32
User Viewable:
User Editable:
Rules:
required|string|max:20

Startmap

Environment:
SRV_STARTMAP
Default:
de_dust2
User Viewable:
User Editable:
Rules:
required|string|max:20

Pingboost

Environment:
SRV_PINGBOOST
Default:
2
User Viewable:
User Editable:
Rules:
required|string|max:20

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:
SRCDS_APPID
Default:
90
User Viewable:
User Editable:
Rules:
required|numeric|in:90

Beta branch

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

Environment:
SRCDS_BETAID
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string|

Steam Username

Username associated wanted to be used. Not needed.

Environment:
STEAM_USER
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string

Steam Password

Steam Password for account. Not needed.

Environment:
STEAM_PASS
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string

Steam Auth

Steam authenticator code for the account. Not Needed.

Environment:
STEAM_AUTH
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string

Secure or Insecure

Environment:
SRV_SECURE
Default:
secure
User Viewable:
User Editable:
Rules:
required|string|max:20
Installation Script
Container: ghcr.io/ptero-eggs/installers:debian
Entrypoint: bash
#!/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 "-----------------------------------------"