Those who have experience in setting up dedicated CS:GO (Counter-Strike : Global Offensive) know that the process of using the command line interface to manage the server is cumbersome due to the length of the commands.
This tutorial will cover the process of installing a simple CS:GO Server Launcher script. This script offers a set of short commands to launch, update, restart or modify the server configuration.
Prerequisites
- Ubuntu-based VPS.
- An existing CS:GO Dedicated server.
- A Steam Account with clear VAC record.
The installation process
The first step is to install the required binaries and dependencies. Note: some of the below libraries comes pre-bundled in Ubuntu
apt-get update -y
apt-get install awk tar wget screen nano -y
Next, we will download the script and apply the required permissions to it:
cd /etc/init.d/
wget https://raw.githubusercontent.com/crazy-max/csgo-server-launcher/master/csgo-server-launcher.sh -O csgo-server-launcher --no-check-certificate
chmod +x csgo-server-launcher
update-rc.d csgo-server-launcher defaults
mkdir /etc/csgo-server-launcher/
wget https://raw.githubusercontent.com/crazy-max/csgo-server-launcher/master/csgo-server-launcher.conf -O /etc/csgo-server-launcher/csgo-server-launcher.conf --no-check-certificate
Configuration
Execute the below command to open the CS:GO launcher configuration file: nano /etc/csgo-server-launcher/csgo-server-launcher.conf
Below are the contents of the configuration file:
# This file is an integral part of csgo-server-launcher.
# More : https://github.com/crazy-max/csgo-server-launcher#installation
SCREEN_NAME="csgo"
USER="steam"
IP="127.0.0.1"
PORT="27015"
# Anonymous connection will be deprecated in the near future. Therefore it is highly recommended to generate a Game Server Login Token.
GSLT="LOOK AT THE END OF TUTORIAL" # http://steamcommunity.com/dev/managegameservers
DIR_STEAMCMD="STEAMCMD DIRECTORY"
STEAM_LOGIN="anonymous"
STEAM_PASSWORD="anonymous"
STEAM_RUNSCRIPT="$DIR_STEAMCMD/runscript_$SCREEN_NAME"
DIR_ROOT="$DIR_STEAMCMD/GAME DIRECTORY"
DIR_GAME="$DIR_ROOT/csgo"
DIR_LOGS="$DIR_GAME/logs"
DAEMON_GAME="srcds_run"
UPDATE_LOG="$DIR_LOGS/update_`date +%Y%m%d`.log"
UPDATE_EMAIL=""
UPDATE_RETRY=3
# Workshop : https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators
API_AUTHORIZATION_KEY="" # http://steamcommunity.com/dev/registerkey
WORKSHOP_COLLECTION_ID="125499818" # http://steamcommunity.com/sharedfiles/filedetails/?id=125499818
WORKSHOP_START_MAP="125488374" # http://steamcommunity.com/sharedfiles/filedetails/?id=125488374
# Game config
MAXPLAYERS="18"
TICKRATE="64"
EXTRAPARAMS="-nohltv +sv_pure 0 +game_type 0 +game_mode 0 +mapgroup mg_bomb +map de_dust2"
# Major settings
PARAM_START="-game csgo -console -usercon -secure -autoupdate -steam_dir $ -steamcmd_script $ - maxplayers_override $ -tickrate $ +hostport $ +ip $ +net_public_adr $ $"
PARAM_UPDATE="+login $ $ +force_install_dir $ +app_update 740 validate +quit"
In this step, you will modify the settings depending on how your CS:GO server is setup. Each EXTRAPARAMS
line is used for a different game type:
Classic Casual : EXTRAPARAMS="-nohltv +sv_pure 0 +game_type 0 +game_mode 0 +mapgroup mg_bomb +map de_dust2"
Classic Competitive : EXTRAPARAMS="-nohltv +sv_pure 0 +game_type 0 +game_mode 1 +mapgroup mg_bomb +map de_dust2"
Arms Race : EXTRAPARAMS="-nohltv +sv_pure 0 +game_type 1 +game_mode 0 +mapgroup mg_bomb +map de_dust2"
Demolition : EXTRAPARAMS="-nohltv +sv_pure 0 +game_type 1 +game_mode 1 +mapgroup mg_bomb +map de_dust2"
Deathmatch : EXTRAPARAMS="-nohltv +sv_pure 0 +game_type 1 +game_mode 2 +mapgroup mg_bomb +map de_dust2"
GSLT or Game Server Login Token
One of the security features implemented by Valve is called GSLT, or Game server Login Token
. This Token would set a ban flag on the server owner/manager (but not the hosting company), should they use any restricted plugins.
That said, if you are going to use your security token, do not install any restricted plugin, otherwise you will be banned by Steam.
To generate your token, go to this website. As App ID of base game
, type 730
, as Memo
, and give the token any name you prefer.
Next, you will need to copy the newly generated token and use it in the configuration file :
nano /etc/csgo-server-launcher/csgo-server-launcher.conf
Here, add the GLST to the GSLT="LOOK AT THE END OF TUTORIAL"
. For safety, add +sv_setsteamaccount GLST at the end of EXTRAPARAMS
.
The process is now completed. You can use the below command schema to (re)start, stop your CS:GO Server.
service csgo-server-launcher start/restart/stop