Counter-Strike 2
gamesFor 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.
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.
Docker Images (1)
| Name | Image |
|---|---|
ghcr.io/ptero-eggs/steamcmd:sniper | ghcr.io/ptero-eggs/steamcmd:sniper |
Startup Command
LD_LIBRARY_PATH="$HOME/game/bin/linuxsteamrt64:$LD_LIBRARY_PATH" ./game/bin/linuxsteamrt64/cs2 -dedicated $( [ "$VAC_ENABLED" == "1" ] || printf %s ' -insecure' ) -ip 0.0.0.0 -port {{SERVER_PORT}} -tv_port {{TV_PORT}} -maxplayers {{MAX_PLAYERS}} $( [ "$RCON_ENABLED" == "0" ] || printf %s ' -usercon' ) +game_mode {{GAME_MODE}} +game_type {{GAME_TYPE}} +map {{SRCDS_MAP}} +hostname "{{SERVER_NAME}}" +sv_password "{{SERVER_PASSWORD}}" +rcon_password "{{RCON_PASSWORD}}" +sv_setsteamaccount {{STEAM_GSLT}} Variables (13)
Map
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
- Environment:
SRCDS_MAP- Default:
de_dust2- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|string
Source AppID
Required for game to update on server restart. Do not modify this.
- Environment:
SRCDS_APPID- Default:
730- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|string|in:730
Max Players
Specifies the maximum amount of players that are able to join the server.
- Environment:
MAX_PLAYERS- Default:
12- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|numeric|between:1,64
Auto-update server
This is to enable / disable auto-updating your server on restart. By default this is set to enabled.
- Environment:
AUTO_UPDATE- Default:
1- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|boolean
SourceTV Port
SourceTV port used for connections to spectates games on your server.
- Environment:
TV_PORT- Default:
27020- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|integer|between:1025,65535
Steam Gameserver Login Token
The Steam Account Token required for the server to be displayed public. The token can be acquired here: https://steamcommunity.com/dev/managegameservers
- Environment:
STEAM_GSLT- Default:
None- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|string|alpha_num|size:32
Enable VAC
Enable / Disable VAC (Valve Anti Cheat) on your server. By default this will be enabled.
- Environment:
VAC_ENABLED- Default:
1- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|boolean
Enable RCON
Enable / Disable RCON for using RCON commands with external tools. By default this will be disabled.
- Environment:
RCON_ENABLED- Default:
0- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|boolean
Server Name
Sets the server name listed in the steam server browser.
- Environment:
SERVER_NAME- Default:
A Pterodactyl hosted CS2 Server- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|string|max:64
Server Password
If specified, players must provide this password to join the server.
- Environment:
SERVER_PASSWORD- Default:
None- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
nullable|alpha_dash|between:1,30
RCON Password
To gain access to administrator commands on the server.
- Environment:
RCON_PASSWORD- Default:
None- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|alpha_dash|between:1,30
Gamemode
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
- Environment:
GAME_MODE- Default:
1- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|string
Gametype
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
- Environment:
GAME_TYPE- Default:
0- User Viewable:
- ❌
- User Editable:
- ❌
- Rules:
required|string
Installation Script
ghcr.io/ptero-eggs/installers:debianbash#!/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 "-----------------------------------------"