Skip to content

cs2

installation

  cs2server:
    image: joedwards32/cs2:latest
    container_name: cs2server
    restart: unless-stopped
    networks:
      - cs2net
    environment:
      # Server configuration
      - SRCDS_TOKEN=<token> ## Game Server Token from https://steamcommunity.com/dev/managegameservers
      - STEAMAPPVALIDATE=0 ## (If you break the game through your customisations and want steamcmd to validate and redownload then set the STEAMAPPVALIDATE environment variable to 1)
      - CS2_SERVERNAME=cs2server ## (Set the visible name for your private server)
      - CS2_CHEATS=0 ## (0 - disable cheats, 1 - enable cheats)
      # CS2_IP="" ## (Allows the server IP to be set. Useful if a CS2 server needs to be bound to a specific IP address.)
      - CS2_PORT=27015 ## (CS2 server listen port tcp_udp)
      - CS2_SERVER_HIBERNATE=0 ## (Put server in a low CPU state when there are no players. 0 - hibernation disabled, 1 - hibernation enabled)
      - CS2_RCON_PORT ## (Optional, use a simple TCP proxy to have RCON listen on an alternative port. Useful for services like AWS Fargate which do not support mixed protocol ports.)
      - CS2_LAN=0 ## (0 - LAN mode disabled, 1 - LAN Mode enabled)
      - CS2_RCONPW=<rcon> ## (RCON password)
      - CS2_PW=<serverpassword> ## (CS2 server password)
      - CS2_MAXPLAYERS=12 ## (Max players)
      - CS2_ADDITIONAL_ARGS ## (Optional additional arguments to pass into cs2)
      - CS2_CFG_URL ## The container can be instructed to download a extract a Tar Gzip of configuration files and other customisations from a given HTTP/HTTPS URL for example https://github.com/joedwards32/CS2/raw/main/examples/cs2.cfg.tgz
      ## Game modes
      - CS2_GAMEALIA ## (Game type, e.g. casual, competitive, deathmatch. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers)
      - CS2_GAMETYPE=0 ## (Used if CS2_GAMEALIAS not defined. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers)
      - CS2_GAMEMODE=1 ## (Used if CS2_GAMEALIAS not defined. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers)
      - CS2_MAPGROUP=mg_active ## (Map pool)
      - CS2_STARTMAP=de_dust2 ## (Start map)
      # Mappool
      # CS2_HOST_WORKSHOP_MAP=xxxxxx (not tested yet. i guess its removed by dev)
      # CS2_HOST_WORKSHOP_COLLECTION=xxxxx (not tested yet. i guess its removed by dev)
      # Bots
      - CS2_BOT_DIFFICULTY=3 ## (0 - easy, 1 - normal, 2 - hard, 3 - expert)
      - CS2_BOT_QUOTA=0 ## (Number of bots)
      - CS2_BOT_QUOTA_MODE=competitive ## (fill, competitive)
      # TV
      - TV_AUTORECORD=0 ## Automatically records all games as CSTV demos: 0=off, 1=on.
      - TV_ENABLE=0 ## Activates CSTV on server: 0=off, 1=on.
      - TV_PORT=27020 ## Host SourceTV port
      - TV_PW=<pw> ## CSTV password for clients
      - TV_RELAY_PW=sick ## CSTV password for relay proxies
      - TV_DELAY=0 ## CSTV broadcast delay in seconds
      - TV_MAXRATE=0 ## World snapshots to broadcast per second. Affects camera tickrate.
      # Logs
      - CS2_LOG=on ## 'on'/'off'
      - CS2_LOG_MONEY=0 ## Turns money logging on/off: (0=off, 1=on)
      - CS2_LOG_DETAIL=0 ## Combat damage logging: (0=disabled, 1=enemy, 2=friendly, 3=all)
      - CS2_LOG_ITEMS=0 ## Turns item logging on/off: (0=off, 1=on)
    volumes:
      - ./cs2:/home/steam/cs2-dedicated/  # Persistent data volume mount point inside container
    ports:
      - "27015:27015/tcp" ## TCP HLDS
      - "27015:27015/udp" ## UDP HLDS
#     #- "27020:27020/udp" ## UDP CSTV
    stdin_open: true # Add local console for docker attach, docker attach --sig-proxy=false cs2server
    tty: true # Add local console for docker attach, docker attach --sig-proxy=false cs2server host_workshop_map 3253703883 nuke host_workshop_map 3124567099 inferno host_workshop_map 3070960099 aztec
## stin > docker run -i to keep STDIN attached, allowing you to interact with the running process
## tty > docker run -t to attach a tty to the container
## "docker compose exec SERVER bash" with stdin and tty
## "docker compose exec -it SERVER /bin/sh" doesnt work
#    deploy:
#      resources:
#        limits:
#          cpus: '3.5'
#          # memory: 50M
## The default configurations for each game mode are stored in /home/steam/cs2-dedicated/game/csgo/cfg/. For example, the Competitive mode defaults are set by gamemode_competitive.cfg
## /home/steam/cs2-dedicated/pre.sh is executed before the CS2 server starts
## /home/steam/cs2-dedicated/post.sh is executed after the CS2 server stops
## Makes sure the directory is writeable by the unprivileged container user with uid 1000, known as steam

open server console

docker attach --sig-proxy=false <container>

exit server console ++CTRL+P++ + ++CTRL+Q++

maps

ds_workshop_listmaps
ds_workshop_changelevel

host_workshop_map 3124567099 (de_inferno_night) host_workshop_map 3253703883 (de_nuke_night) host_workshop_map 3248665045 (de_dust2_night) host_workshop_map 3070596702 (de_cache) host_workshop_map 3070284539 (de_train) host_workshop_map 3070212801 (cbblestone 2015) host_workshop_map 3070293560 (de_cbble_csgo) DEPRCATED host_workshop_map 3070960099 (de_aztec) host_workshop_map 2458920550 (de_tuscan) host_workshop_map 3152430710 (de_mills) host_workshop_map 3132854332 (de_foroglio) host_workshop_map 3121217565 (de_thera) host_workshop_map 3218219558 aimmapcarton host_workshop_map 3149170605 de_breach 3.0 host_workshop_map 3131775712 aim red line host_workshop_map 3181655247 lost coast test map 8k host_workshop_map 3121051997 ravine

configuration

plugins

command for server console

meta version
meta list
css_plugings list
maps *

metamod

installation

Download the latest dev build 2.X from the releases page

Move the addons folder to your game/csgo folder

.
└─ game/
   └─ csgo/
      └─ addons /
         ├─ metamod /
         ├─ metamod_x64.vdf
         └─ metamod.vdf

Edit gameinfo.gi in game/csgo and add Game csgo/addons/metamod to the SearchPaths section

.
└─ game/
   └─ csgo/
      └─ gameinfo.gi 
"GameInfo"
{
    game        "Counter-Strike 2"
    title       "Counter-Strike 2"
    title_pw    "..."

    LayeredOnMod    csgo_imported // Inherits the gameinfo.gi data from csgo_imported (which itself inherits from csgo_core)

    FileSystem
    {
        SearchPaths
        {
            Game_LowViolence    csgo_lv // Perfect World content override

+           Game    csgo/addons/metamod
            Game    csgo
            Game    csgo_imported
            Game    csgo_core
            Game    core

counterstrikesharp

installation

download the latest runtime release

Extract CounterStrikeSharp and copy the /addons/ directory to /game/csgo/.

.
└─ game/
   └─ csgo/
      └─ addons /
         └─ counterstrikesharp /
  • Restart your game server.
  • Running the command meta list in the console should show 1 plugin loaded

configuration

matchzy

installation

Warning

prerequisite: metamod and counterstrikesharp should be already installed on the server

Note

download standalone version not the combined one with counterstrikeshare bc there is a known bug with the verification line in one of the plugin which doesnt work when not installed separately

download the latest MatchZy release and extract the files to the csgo/ directory of the dedicated server.

.
└─ game/
   └─ csgo/
      ├─ addons /
        └─ counterstrikesharp /
           └─ plugins /
              └─ MatchZy /
      └─ cfg /
         └─ MatchZy /

verify the installation by typing css_plugins list and you should see MatchZy by WD- listed ther

configuration

fake_rcon

installation

configuration

command

fake_rcon_password <rcon>
fake_rcon say <hello>