Egg Repository

Pterodactyl Community Egg Repository

Half-Life 2: Deathmatch

Fast multiplayer action set in the Half-Life 2 universe! HL2's physics adds a new dimension to deathmatch play. Play straight deathmatch or try Combine vs. Resistance teamplay. Toss a toilet at your friend today!

Read Me

Half-Life 2: Deathmatch

Fast multiplayer action set in the Half-Life 2 universe! HL2's physics adds a new dimension to deathmatch play. Play straight deathmatch or try Combine vs. Resistance teamplay. Toss a toilet at your friend today!

Server Ports

Half-Life 2: Deathmatch requires 1 port

Portdefault
Game27015
Yolks
NameTag
ghcr.io/ptero-eggs/steamcmd:debianghcr.io/ptero-eggs/steamcmd:debian
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
Steam App IDSteam App ID used for installation and updates. Rarely needs to be changed.SRCDS_APPID232370NoNo
Auto UpdateDisabling or enabling automated updates on bootAUTO_UPDATE1YesYes
Server NameName of the serverSERVER_NAMEPterodactyl-serverYesYes
Map NameThe name of the mapMAP_NAMEdm_lockdownYesYes
Max PlayersMaximum number of players allowedMAX_PLAYERS20YesYes
Server PasswordThe password used to join the serverSERVER_PASSWORDChangeMeYesYes
Rcon PasswordThe password used for the server rconRCON_PASSWORDChangeMeYesYes
Tick RateServer tick rateTICK_RATE66YesYes
Install Script
#!/bin/bash
# steamcmd Base Installation Script
#
# Server Files: /mnt/server
# Image to install with is 'ghcr.io/ptero-eggs/installers:debian'

## 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} $( [[ "${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

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

## create server config
cat <<EOF > /mnt/server/hl2mp/cfg/server.cfg
// Basic server settings
hostname "${SERVER_NAME}"
sv_password "${SERVER_PASSWORD}"
rcon_password "${RCON_PASSWORD}"
sv_cheats 0
sv_lan 0
sv_contact "[email protected]"
sv_region 0
mp_disable_autokick 0

// Gameplay settings
sv_hl2mp_weapon_respawn_time 20
sv_hl2mp_item_respawn_time 30
mp_weaponstay 0
mp_autocrosshair 1
sv_alltalk 1
mp_allowspectators 1
sv_voiceenable 1
mp_forcerespawn 1
mp_timelimit 20
mp_winlimit 0
mp_maxrounds 0
mp_teams_unbalance_limit 0
mp_friendlyfire 0
mp_flashlight 1
mp_autoteambalance 0
mp_restartgame 1

// Player settings
sv_timeout 60
sv_noclipaccelerate 5
sv_noclipspeed 5

// Miscellaneous settings
sv_downloadurl ""
mp_forcecamera 1
mapcyclefile "mapcycle.txt"

// Server security settings
sv_allowupload 1
sv_allowdownload 1
sv_rcon_banpenalty 10
sv_rcon_maxfailures 5

// Map-related settings
mp_chattime 5
EOF

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