Deploy a dedicated Counter-Strike 2 server for competitive matches and casual play with friends, with RCON admin control and custom maps.
Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/cs2/cs2-ubuntu.sh
chmod +x cs2-ubuntu.sh
sudo bash cs2-ubuntu.sh
The script installs Docker if needed, downloads the CS2 dedicated server via SteamCMD, and starts the server container. The initial download is approximately 30 GB so allow time for it to complete.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/cs2/cs2-ubuntu.sh
chmod +x cs2-ubuntu.sh
sudo bash cs2-ubuntu.sh
Edit the server configuration file to set your server name, password, round settings, and RCON password for remote administration.
# Edit server.cfg
nano /opt/cs2/game/csgo/cfg/server.cfg
# Key settings to configure:
hostname "My CS2 Server"
sv_password ""
mp_maxrounds 30
rcon_password "your_rcon_password_here"
Open CS2 and connect to your server via the community server browser or the developer console.
# Option 1: In-game console (press ~)
connect <your-server-ip>:27015
# Option 2: Community Servers browser
# CS2 → Play → Community Servers → search server name
Use RCON to manage your server remotely — change maps, kick or ban players, and review server logs.
# Authenticate RCON from CS2 console
rcon_address <your-server-ip>:27015
rcon_password your_rcon_password_here
# Common RCON commands
rcon status # list connected players
rcon changelevel de_dust2 # change map
rcon kick <player_name> # kick a player
rcon banid 0 <steam_id> kick # ban a player
rcon mp_restartgame 1 # restart the match
| Port | Purpose |
|---|---|
| 27015 UDP | Game traffic & server query |
| 27020 UDP | SourceTV broadcast |
Counter-Strike 2 (CS2) is Valve's tactical FPS and the successor to CS:GO. A dedicated server allows you to host private 5v5 competitive matches, practice servers, casual games, or community servers with custom configs and plugins.
Self-hosting a CS2 server gives you a private practice environment, custom server settings, low-latency matches for your team, and no trust factor restrictions. You can configure custom plugins via CounterStrikeSharp for warmup bots, practice mode, and other utilities.
CS2 uses UDP port 27015 for game connections. Open UDP port 27015. TCP port 27015 is used for RCON — keep this firewalled. The Steam server browser query also uses the same port range.
Alternatives include Valve-operated matchmaking (official, no setup), FACEIT (third-party competitive platform), and Leetify servers (practice focused). Self-hosting provides a private low-latency server with full plugin customization.
Avoid self-hosting if you want proper anti-cheat and competitive matchmaking — Valve MM and FACEIT provide better environments for ranked play. Self-hosted servers are best for practice, community games, and custom modes.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
CounterStrikeSharp (CSS) is a plugin framework for CS2 servers written in C#. It replaces the old Sourcemod/Metamod system from CS:GO. Plugins built on CounterStrikeSharp add features like practice mode, matchmaking plugins (MatchZy), warmup bots, stat tracking, and custom game modes.
Yes. CS2 supports Steam Workshop maps. Download maps using the workshop ID and configure your server to load them. Players connecting to your server need to have the workshop map downloaded too, either automatically via the server or manually subscribing on the Workshop.
Yes — this is a primary use case. Set sv_password in server.cfg to a private password. Configure a competitive map (de_dust2, de_mirage, etc.) and knife round plugin. Install MatchZy plugin for professional match setup with ready checks, knife rounds, team names, and match recording.
Use the bot_add command in the server console, or configure it in server.cfg with bot_quota and bot_difficulty (0-3). For a deathmatch with bots, set bot_quota to your desired count. You can also set teams to be entirely bots for solo practice sessions.
For a 10-player server, 2 CPU cores at 2+ GHz and 4 GB RAM is sufficient. CS2 dedicated server is lighter than the client. For a 20-player community server, use 4 cores and 8 GB RAM. Tick rate configuration (64 tick or 128 tick) slightly affects CPU and bandwidth requirements.