Skip to content

๐Ÿ’ฃ Automated CS2 multi-server manager with competitive plugins and tournament integration.

Notifications You must be signed in to change notification settings

sivert-io/cs2-server-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

237 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CS2 Server Manager

CS2 Server Manager

๐Ÿ’ฃ Automated multi-server management for Counter-Strike 2

Deploy multiple dedicated CS2 servers in minutes with competitive plugins, auto-updates, and tournament integration.

License: MIT Docker

๐Ÿ”— MatchZy Auto Tournament โ€ข MatchZy Enhanced


๐Ÿš€ Quick Start (global install, recommended)

On a Linux server, you can install csm globally and launch the latest release with a single command:

arch=$(uname -m); \
case "$arch" in \
  x86_64)  asset="csm-linux-amd64" ;; \
  aarch64|arm64) asset="csm-linux-arm64" ;; \
  *) echo "Unsupported architecture: $arch" && exit 1 ;; \
esac; \
tmp=$(mktemp); \
curl -L "https://github.com/sivert-io/cs2-server-manager/releases/latest/download/$asset" -o "$tmp" && \
sudo install -m 0755 "$tmp" /usr/local/bin/csm && \
rm "$tmp" && \
sudo csm          # launches the interactive TUI installer

By default, CSM stores its data under /opt/cs2-server-manager (creating it on demand) so overrides, game files, and logs are kept in one place.

If steamcmd canโ€™t be installed (Debian/Ubuntu)

If you see E: Unable to locate package steamcmd, your apt sources likely donโ€™t include the component that provides SteamCMD.

  • Note: When run via sudo csm install-deps (or the TUI equivalent), CSM will attempt to automatically enable the required component(s) in /etc/apt/sources.list, write a timestamped backup (e.g. /etc/apt/sources.list.csm.bak-YYYYMMDD-HHMMSS), then rerun apt-get update and retry the install.

  • Debian (Bookworm): ensure your apt sources include contrib + non-free (and often non-free-firmware), then:

sudo apt-get update
sudo apt-get install steamcmd
  • Ubuntu: enable multiverse, then:
sudo add-apt-repository multiverse
sudo apt-get update
sudo apt-get install steamcmd

If auto-fix canโ€™t update your sources (or you donโ€™t want it to), CSM will show a targeted hint. Full logs are written to /opt/cs2-server-manager/logs/csm.log by default.


Newer distros: CounterStrikeSharp compatibility (Steam Runtime)

On newer Linux distributions (for example Debian 13 / Ubuntu 25.04+), CounterStrikeSharp may fail to load under the system runtime. CSM can automatically launch the server using Steam Runtime (SteamRT3) as a workaround, based on upstream findings in CounterStrikeSharp issue #1024.

  • Auto behavior: on affected OS versions, CSM installs Steam Runtime (app 1628350) into /home/<cs2user>/steamrt (if missing) and starts servers via the runtime wrapper.
  • Override: set CSM_STEAMRT=1 to force-enable, or CSM_STEAMRT=0 to force-disable.

CS2 launch script (cs2.sh) (default) and alternate launcher (csm.sh)

  • Default: CSM launches using Valveโ€™s game/cs2.sh (kept intact).
  • Alternate (opt-in): CSM also installs game/csm.sh, which sets LD_LIBRARY_PATH to prefer CS2-bundled libs (helpful for common libserver.so / libv8 mismatch issues). Use it when troubleshooting by starting with:
sudo csm start --alternate

You can also target a single server:

sudo csm start --alternate 1

If you want to run the cs2 binary directly (not recommended; provided for troubleshooting), you can use:

sudo csm start --binary

โœจ Features

๐Ÿ’ฃ Multi-Server Deployment โ€” 3โ€“5 servers with one command
โš™๏ธ Auto-Plugin Install โ€” Metamod, CounterStrikeSharp, MatchZy
๐Ÿ” Auto-Updates โ€” Game & plugin updates happen automatically
๐Ÿ“ฆ Config Persistence โ€” Your configs in overrides/ survive all updates
๐Ÿ† Tournament Ready โ€” Integrates with MatchZy Auto Tournament
๐Ÿ” MySQL Setup โ€” Docker-based database auto-provisioned
๐Ÿ–ฅ Interactive Menu โ€” Easy server management


๐ŸŽฎ Usage

Once installed globally you can:

sudo csm    # launch the TUI for installs, updates, status, etc. (requires sudo)
csm help    # show CLI help without sudo

Common CLI commands:

# Server management
sudo csm status                 # Tmux status overview
sudo csm start [server]         # Start all servers (or specific server)
sudo csm stop [server]          # Stop all servers (or specific server)
sudo csm restart [server]       # Restart all servers (or specific server)

# Updates
sudo csm update-game            # Update CS2 game files
sudo csm update-plugins         # Update plugins (download + deploy)
sudo csm monitor                # Run one iteration of the auto-update monitor

# Setup & maintenance
sudo csm install-deps           # Install core system dependencies
sudo csm bootstrap              # Install/redeploy servers
sudo csm install-monitor-cron   # Install cron-based auto-update monitor
sudo csm reinstall <server>     # Rebuild a server (fixes corrupted files)
sudo csm update-config <server> # Regenerate server configs without reinstalling
sudo csm unban <server> <ip>    # Remove IP from banned RCON requests (use 0 for all servers)
sudo csm unban-all <server>     # Clear all IPs banned for RCON attempts (use 0 for all servers)
csm list-bans <server>          # List banned IPs for a server

# Cleanup
sudo csm cleanup-all            # Danger: remove all CS2 data and user

For logs and debugging:

sudo csm attach 1        # Attach to server 1 console (tmux)
sudo csm debug 1         # Run server 1 in foreground (debug mode)
sudo csm logs 1 100      # View last 100 lines of server 1 logs
sudo csm logs-file 1     # Print the log file path for server 1

๐Ÿ“š Documentation & Links (docs.sivert.io)


Made with โค๏ธ for the CS2 community