~/snippets/cs-go-dedicated-server
Published on

CS:GO Dedicated Server

421 words3 min read

Using LinuxGSM

Complete LinuxGSM official guide

Create a user account named csgoserver. You will be prompted to create a password.

adduser csgoserver

Give your created account sudo privilege.

adduser csgoserver sudo

Switch to the account just created.

su - csgoserver

Navigate to the home directory.

cd /home/csgoserver

Register Steam Game Server Login Token (GSLT) on Steam Game Server Account Management.

Install dependencies (Debian 64-bit). (Note: dependencies vary slightly for different OS, please check here).

sudo dpkg --add-architecture i386; sudo apt update; sudo apt install mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc tmux lib32gcc1 libstdc++6 libstdc++6:i386

Download and run the script.

wget https://linuxgsm.com/dl/linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh csgoserver

Run the installer and follow the instructions.

./csgoserver install

Start the server.

./csgoserver start

Open CS:GO and connect to your server. In the CS:GO game console:

connect IP[:PORT]

Or search for your server on community server pages PLAY > BROWSE COMMUNITY SERVERS. Have fun!

More on server management

Setup admin

Download Source Mod.

Download Metamod: Source.

Download Metamod VDF. (Note: select game Counter-Strike: Global Offensive).

Untar (or unzip) sourcemod and sourcemm to the same folder.

tar -xzvf sourcemod-xxx.tar.gz -C /target/directory
tar -xzvf mmsource-xxx.tar.gz -C /target/directory

Replace the newly downloaded metamod.vdf.

cp /download/directory/metamod.vdf /target/directory/addons

Add yourself to the admin list. Append your SteamID and privilege to /target/directory/addons/sourcemod/configs/admins_simple.ini in the following format:

"STEAM_0:1:16" "z"

You can find your SteamID by using Steam ID Finder. "z" represents root privileges. More privilege info is available in admin_levels.cfg of the same folder.

Upload everything under /target/directory to the server's csgo directory. (If installed with LinuxGSM, the path is ~/serverfiles/csgo).

scp -r /target/directory csgoserver@[Server IP]:~/serverfiles/csgo

Start the server and connect in-game. Toggle admin by entering !admin in the game chat or say "!admin" in the console.

Further Reading

  • CS:GO Dedicated Server Guide – How To Setup and Install: link.
  • Linux GSM: Developing LGSM: link.
  • Linux GSM Workshop: link.
  • Deathmatch Goes Advanced: link. An excellent plugin for Deathmatch server.

References