Skip to content

Basic Install Guide

Host your Server

  • Setup your host server
    • Forward ports
      • CS2 Server(SRCDS) 27015(TCP/UDP) -27020(UDP)
        • Can change 27015 with SRCDS command-line argument -port
      • CS2-Battle-Bot 8000 (TCP) by default
    • Create a user with system-rights (steam linux script user default)
    • Configure your SSH Public/Private keys to use with FileZilla/Putty/Termius/mRemoteNG/etc.
  • Environment Variables

    Tip - GoogleCloudPlatform ENV Variables

    Project-based Metadata Environment Variables
    or
    VM-Based Metadata Environment Variables - Select your VM instance, click Edit, and scroll-down to metadata section and add your environment variables/values per that instance.

  • Secrets
    • Copy secrets.cfg to /custom_files/cfg/secrets.cfg
    • Configure sv_setsteamaccount to the ID here
  • Install and Configure MySQL
  • Run either the Windows, Linux, Docker, GCP, or Run.sh script.
    • Download GCloud for GCP installs as this will make the setup much faster.
    • Run.sh is for updating and launching the server only. All files must be in place. (Custom_files will not be over-written)

Trust, but verify!

  • Type meta list via RCON
    Your output should look like:

    Listing 1 plugin:
    
    [01] CounterStrikeSharp (v213 @ dfc9859) by Roflmuffin
    
  • Type css_plugins list via RCON
    Your output should look like:

      List of all plugins currently loaded by CounterStrikeSharp: 7 plugins loaded.
        [#1:LOADED]: "SimpleAdmin" (0.1.2)
        [#2:LOADED]: "CS2-Tags" (1.0.4c) by daffyy
        Add player tags easily in cs2 game
        [#3:LOADED]: "CS2_ExecAfter" (1.0.0) by Kus (https://github.com/kus)
        Executes a command after server event or a delay. exec_after for help
        [#4:LOADED]: "Discord Utilities" (1.0.9) by Nocky (SourceFactory.eu)
        [#5:LOADED]: "GameModeManager" (1.0.1) by Striker-Nick
        A simple plugin/module that dynamically updates any maplist.txt file based on the current mapgroup.
        [#6:LOADED]: "CS2Rcon" (1.2.0) by LordFetznschaedl
        Allows for server commands to be executed from the client using !rcon
        [#7:LOADED]: "Map Configs Prefix" (1.0.5) by Gold KingZ
        Map Configs Depend Map Name
    

Environment Variables

Variable Linux GCP Windows Docker
API_KEY
For using steam workshop
IP
PORT
DUCK_DOMAIN
DUCK_TOKEN
CUSTOM_FOLDER
GIT_REPO
WS_COLLECTION
MAXPLAYERS

"Harden" your variables

For most environment variables, they are formatted as export DUCK_DOMAIN="${DUCK_DOMAIN:-$(get_metadata DUCK_DOMAIN)}"

You can change them to format export DUCK_DOMAIN="${DUCK_DOMAIN:-blah.duckdns.org}" to hard code blah.duckdns.org as your duck_domain.

Be aware that setting a collectionID forces the server to batch download all the maps. This can utilize a lot of space, and take a long time on first load.

Secrets.cfg

RCON_PASSWORD "changeme"  # RCON password for controlling server via console.
STEAM_ACCOUNT ""          # https://steamcommunity.com/dev/managegameservers code is currently optional but might be enforced later by Valve. It will also allow the server to appear on the server browser
SERVER_PASSWORD ""        # For password-protected servers

Workshop Maps

Hosting Workshop maps requires the API Key. To switch to a workshop map, run host_workshop_map <workshopID>.
Ex. host_workshop_map 3171874934 via RCON would switch you to aim_inspire by MavProductions.

Server Browser Recognition

Add your GSLT for your server to appear on the server browser master list. ServerListPlayerFix is also recommended currently, as this will make the server player list available.