#/bin/bash
SERVER_DIR=$HOME/cs2-server
echo "⌛️ Updating CS2 server..."
steamcmd +login anonymous +force_install_dir $SERVER_DIR +app_update 730 +quit
echo "🛠️ Starting server..."
cd $SERVER_DIR/game/bin/linuxsteamrt64
./cs2 -ip 0.0.0.0 -port 27015 -dedicated +map de_dust2 -debug -usercon -console -secure -dev +game_type 0 +game_mode 1 +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +exec server.cfg
echo ---------------------------
echo - Loading server settings -
echo ---------------------------
hostname "ServerName" // Server name
sv_lan "0" // Show online
sv_region "255" // Set region (255 is worldwide)
// Performance
sv_maxrate "0" // Max bandwidth rate allowed on server, 0 == unlimited
sv_minrate "0" // Min bandwidth rate allowed on server, 0 == unlimited
sv_parallel_sendsnapshot "1" // Enables multi-threading.
sv_clockcorrection_msecs "15" // The server tries to keep each players m_nTickBase withing this many msecs of the server absolute tickcount
sv_hibernate_when_empty "0" // Puts the server into extremely low CPU usage mode when no clients connected
// FUN:
sv_accelerate "5.15" // Used to increase max speed
// sv_airaccelerate "12" // Used to increase strafe speed
// sv_cheats false // Allow clients to use cheat commands
// host_timescale "1" // Change the speed of time on your server.
// sv_autobunnyhopping "1" // Enable bhopping
// ADMIN:
sv_password "p4ssw0rd" // Protect your server with a password
rcon_password "rc0n_p4ssw0rd" // Allow users to run RCON console commands. Do not enable unless you know what you're doing.
// sv_downloadurl "http://fastdl.server.com/csgo" // Server FastDL (Should not end with a /) - If you have a FastDL server
echo ---------------------------
echo - Done loading server.cfg -
echo ---------------------------
Use rcon cli to changelevel etc.