Skip to content

Counter-Strike 2

For over two decades, Counter-Strike has offered an elite competitive experience, one shaped by millions of players from across the globe. And now the next chapter in the CS story is about to begin. This is Counter-Strike 2.

egg-counter-strike-2.json

updated

Ports

Add an allocation on the node for each port.

  • Game 27015
  • Source TV (Optional) 27020

Install

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

Image

  • SteamCMD, Steam Runtime ghcr.io/ptero-eggs/steamcmd:sniper

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.

13 variables

Startup command

LD_LIBRARY_PATH="$HOME/game/bin/linuxsteamrt64:$LD_LIBRARY_PATH" ./game/bin/linuxsteamrt64/cs2 -dedicated $( [ "1" == "1" ] || printf %s ' -insecure' ) -ip 0.0.0.0 -port 27015 -tv_port 27020 -maxplayers 12 $( [ "0" == "0" ] || printf %s ' -usercon' ) +game_mode 1 +game_type 0 +map de_dust2 +hostname "A Pterodactyl hosted CS2 Server" +sv_password "{{SERVER_PASSWORD}}" +rcon_password "{{RCON_PASSWORD}}" +sv_setsteamaccount {{STEAM_GSLT}}

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

  • The default map for the server. Examples: Bomb: de_dust2, de_mirage, de_nuke, de_overpass, de_inferno, de_ancient, de_vertigo, de_anubis Hostage: cs_italy, cs_office Arms Race: ar_baggage, ar_shoots

    SRCDS_MAPUsers can edit

    required|string

  • Required for game to update on server restart. Do not modify this.

    SRCDS_APPIDUsers cannot see

    required|string|in:730

  • Specifies the maximum amount of players that are able to join the server.

    MAX_PLAYERSUsers can edit

    required|numeric|between:1,64

  • This is to enable / disable auto-updating your server on restart. By default this is set to enabled.

    AUTO_UPDATEUsers can edit

    required|boolean

  • SourceTV port used for connections to spectates games on your server.

    TV_PORTUsers can see

    required|integer|between:1025,65535

  • The Steam Account Token required for the server to be displayed public. The token can be acquired here: https://steamcommunity.com/dev/managegameservers

    STEAM_GSLTUsers can edit

    required|string|alpha_num|size:32A value is required.

  • Enable / Disable VAC (Valve Anti Cheat) on your server. By default this will be enabled.

    VAC_ENABLEDUsers can edit

    required|boolean

  • Enable / Disable RCON for using RCON commands with external tools. By default this will be disabled.

    RCON_ENABLEDUsers can edit

    required|boolean

  • Sets the server name listed in the steam server browser.

    SERVER_NAMEUsers can edit

    required|string|max:64

  • If specified, players must provide this password to join the server.

    SERVER_PASSWORDUsers can edit

    nullable|alpha_dash|between:1,30

  • To gain access to administrator commands on the server.

    RCON_PASSWORDUsers can edit

    required|alpha_dash|between:1,30A value is required.

  • Defines the Gamemode and Gametype to be set at the start of the next round. Examples: Competitive: game_mode 1 game_type 0 Wingman: game_mode 2 game_type 0 Casual: game_mode 0 game_type 0 Deathmatch: game_mode 2 game_type 1 Arms Race: game_mode 0 game_type 1 Custom: game_mode 0 game_type 3

    GAME_MODEUsers can edit

    required|string

  • Defines the Gamemode and Gametype to be set at the start of the next round. Examples: Competitive: game_mode 1 game_type 0 Wingman: game_mode 2 game_type 0 Casual: game_mode 0 game_type 0 Deathmatch: game_mode 2 game_type 1 Arms Race: game_mode 0 game_type 1 Custom: game_mode 0 game_type 3

    GAME_TYPEUsers can edit

    required|string

Wings

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

Readme

Counter-Strike 2

Steam Description : For over two decades, Counter-Strike has offered an elite competitive experience, one shaped by millions of players from across the globe. And now the next chapter in the CS story is about to begin. This is Counter-Strike 2.

Install notes

For CS2 Valve has decided to merge the game and server files. There will not be standalone dedicated server files.

Installation/System Requirements

Minimum Recommended
Processor minim x86-64-v2 (with popcnt) ---
RAM 2 GB ---
Storage 33 GB ---

Server Ports

Ports required to run the server in a table format.

Port default
Game 27015
Source TV (Optional) 27020

RCON

RCON is only accessible from external apps, NOT from the game client itself. It's broken in CS2. If possible always use the Pterodactyl console to use your commands like map de_nuke or mp_restartgame 3.

Notes

Further install instructions can be found at the official Documentation.

Changes

  1. CS2: Update startup command

    · Red Banana · d2c0dfe

  2. 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 45 lines bash in ghcr.io/ptero-eggs/installers:debian Show
#!/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} +app_update ${SRCDS_APPID} ${EXTRA_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

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