💡 If you use the Docker image, check the README in the docker folder.
Before running the script, you must change some vars in the config file /etc/csgo-server-launcher/csgo-server-launcher.conf
.
If you change the location of the config file, do not forget to change the path in the csgo-server-launcher script file for the CONFIG_FILE
var (default /etc/csgo-server-launcher/csgo-server-launcher.conf
).
The screen name, you can put what you want but it must be unique and must contain only alphanumeric character.
Example: SCREEN_NAME="csgo"
Name of the linux user who started the server.
Example: USER="steam"
Your WAN IP address.
Example: IP="198.51.100.0"
The port that your server should listen on.
Example: PORT="27015"
Anonymous connection will be deprecated in the near future. Therefore it is highly recommended to generate a Game Server Login Token. More info : http://steamcommunity.com/dev/managegameservers
Example: GSLT=""
Path to steamcmd.
Example: DIR_STEAMCMD="/var/steamcmd"
Your steam account username.
Example: STEAM_LOGIN="anonymous"
Your steam account password.
Example: STEAM_PASSWORD="anonymous"
Name of the script that steamcmd should execute for autoupdate. This file is created on the fly, you don't normally need to change this variable.
Example: STEAM_RUNSCRIPT="$DIR_STEAMCMD/runscript_$SCREEN_NAME"
Root directory for the server.
Example: DIR_ROOT="$DIR_STEAMCMD/games/csgo"
Path to the game.
Example: DIR_GAME="$DIR_ROOT/csgo"
Directory of game's logs.
Example: DIR_LOGS="$DIR_GAME/logs"
You don't normally need to change this variable.
Example: DAEMON_GAME="srcds_run"
The update log file name.
Example: UPDATE_LOG="$DIR_LOGS/update.log"
Mail address where the update's logs are sent. Leave empty to disable sending mail.
Example: UPDATE_EMAIL="foo@bar.com"
Number of retries in case of failure of the update.
Example: UPDATE_RETRY=3
Set to 1
to remove download cache after an update.
Example: CLEAR_DOWNLOAD_CACHE=1
To download maps from the workshop, your server needs access to the steam web api. Leave empty if the webapi_authkey.txt
file exists. Otherwise, to allow this you'll need an authorization key which you can generate : http://steamcommunity.com/dev/apikey
Example: API_AUTHORIZATION_KEY=""
A collection id from the Maps Workshop. The API_AUTHORIZATION_KEY is required. More info : https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators
Example: WORKSHOP_COLLECTION_ID="125499818"
A map id in the selected collection (WORKSHOP_COLLECTION_ID). The API_AUTHORIZATION_KEY is required.
Example: WORKSHOP_START_MAP="125488374"
Maximum players that can connect.
Example: MAXPLAYERS="18"
The tickrate that your server will operate at.
Example: TICKRATE="64"
Custom command line parameters.
Example: EXTRAPARAMS="-nohltv +sv_pure 0 +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2"
Launch settings server.
Example: PARAM_START="-game csgo -console -usercon -secure -autoupdate -steam_dir ${DIR_STEAMCMD} -steamcmd_script ${STEAM_RUNSCRIPT} -maxplayers_override ${MAXPLAYERS} -tickrate ${TICKRATE} +hostport ${PORT} +ip ${IP} +net_public_adr ${IP} ${EXTRAPARAMS}"
Update settings server.
Example: PARAM_UPDATE="+force_install_dir ${DIR_ROOT} +login ${STEAM_LOGIN} ${STEAM_PASSWORD} +app_update 740 validate +quit"