Dedicated csgo server linux

Fnjn / csgo-server-guide.md

I tested the setup on Debian Stretch (naive installation) and Jessie (LinuxGSM installation). The setup should work on Debian 8 (Jessie), Debian 9 (Stretch) and Ubuntu (16.04). However, If you’re running on Windows or other non-debian based Linux OS (e.g. CentOS, openSUSE), this guide doesn’t apply to you.

I’m hosting FFA warm-up and HvH(soon) servers in San Francisco, welcome to join by:

IPv4: 159.89.154.137 Ipv6: 2604:a880:2:d0::20ad:2001 Domain: fjzeng.org 
ping -c 4 138.68.252.208 # on Linux ping -n 4 138.68.252.208 # on Windows 

To keep your server safe, it’s always recommended to enable both private key and password login authentication. (Guide: Setup SSH Authentication , Enable both authentication)

Install CS:GO Dedicated Server

Naive Installation (Not Recommended)

Create an user account name steam (or whatever name you like). You will be prompted to create a password.

Give your created account sudo privilege.

Go to your home directory.

Create a directory for SteamCMD and switch to it.

Install dependency library.

sudo apt-get install lib32gcc1 && sudo apt-get install lib32stdc++6 

Download and extract SteamCMD.

curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf - 

Run SteamCMD and updates will automatically be download. If success, Steam> prompts.

Login your steam account. Your will be required to enter your steam password (, and Two-factor code if Steam Guard is enabled).

Designate install path for csgo server.

force_install_dir /path/to/csgo-ds/ 

Install csgo dedicated server. This step takes quite a while, approx. 17 GB space will be used.

When installation completes, quit SteamCmd.

Start a casual game on dust 2 (see note). More script info Source Dedicated Server.

/path/to/csgo-ds/srcds_run -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2 +sv_setsteamaccount [token] 

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

or Search your server on community server pages PLAY > BROWSE COMMUNITY SERVERS . HF.

Note: To host public servers, you need Steam Game Server Login Token (GSLT) . Register on Steam Game Server Account Management.

Installation with LinuxGSM (Highly Recommended)

Create an user account name csgoserver (or whatever name you like). You will be prompted to create a password.

Give your created account sudo privilege.

Go to your home directory.

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

Install dependencies (Debian 64 bits). (Note: dependencies are slightly vary 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.

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

Читайте также:  Alt linux настройка модема

or Search your server on community server pages PLAY > BROWSE COMMUNITY SERVERS . HF.

More on server management

Download Source Mod Download Metamode: Source Download Metamode vdf. (Note: select game Counter-Strike: Global Offensive )

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

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

Replace with newly downloaded metamod.vdf

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

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

Your can find your steamID By Steam ID Finder. «z» represents root privilege. More privilege info in admin_levels.cfg of the same folder.

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

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

Start the server and connect to the server in-game. Toggle admin by enter !admin on game chat or enter say «!admin» on console.

CS:GO Dedicated Server Guide – How To Setup and Install . This article provides excellent explanation on major configuration files (e.g. gamemodes_server.txt, server.cfg).
Linux GSM: Developing LGSM . This article explains how LinuxGSM works.
Linux GSM: Workshop(https://github.com/GameServerManagers/LinuxGSM/wiki/Workshop)].
Deathmatch Goes Advanced . An excellent plugin for Deathmatch server.

Reference: Valve developer wiki: SteamCMD.
Valve developer wiki: Counter-Strike: Global Offensive Dedicated Servers.
Linux GSM: Getting Started with csgoserver.
Linux GSM: Multiple Game Servers.
How to set up Admin (sourcemod) on a CS:GO Dedicated Server [YouTube link].

This work is licensed under a Creative Commons Attribution 4.0 International License.

Источник

Dedicated csgo server linux

This guide is assuming this VM / server is a fresh install, if you can already perform sudo commands, skip to the next step.

swap to root and install sudo and curl packages

edit the sudoers file to grant your user sudo permissions:

save and exit with:
ctrl + x, then y to confirm and enter

test your sudo access with:

to confirm the install was succesfull:

preparations for update and run script:

get your 2 factor code:

Log out of steam and back in again with the correct steam account and make a note of the 2 factor code you recieve via email/application. If you do not use 2factor, here is my disclaimer regarding errors along the way as a result of that.

this goes in after the +set_steam_guard_code

let us make an update script:

#!/bin/sh ./steamcmd.sh +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +@sSteamCmdForcePlatformType linux +set_steam_guard_code XYZDA +login anonymous +force_install_dir «/home/csgo/csgo/» +app_update 740 +quit +exit # cd csgo # ./start

NOTE: we are commenting out the start section as the start script is not ready yet.

make the update script executable:

preparations for start script:

go to this url for steam access key, required to allow your server to go online:
steam account access key

add in appid: 730, and name your server.
copy the login token, this goes after the flag +sv_setsteamaccount

Читайте также:  Installing ios on linux

then proceed to the api key for the authkey flag:

add a representative name, domain if your server is related to that, then copy the api key.
this belongs after the -authkey flag

your public ip/servers public ip,
goes after +net_public_adr

how to exceed player limits:

-maxplayers_override XX
where XX represents your desired number

+game_mode 0 = casual
+game_mode 1 = competitive

+game_type 0 = regular
+game_type 1 = arms race

let us create a start server script:

NOTE:
we are placing this inside the csgo folder, as we’re still working outside the folder, there is no need to enter it yet.

./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_bomb +map de_dust2 -maxplayers_override 12 +sv_setsteamaccount WIIIIDOOOOWSSUUUUUUUUCKSSSS +net_public_adr 84.213.47.30 +ip 192.168.0.44 -port 27015 -net_port_try 1 -authkey LIIIINUUUUUXRUUULES

As you can open port-ranges in most routers i suggest this range to keep the «clutter» to a minimum:

Unfortunately i do not know your router model and information, so if you require assistance on this part you need to investigate topics:

port forwarding in relation to your router model.

[Unit] Description=MY AWESOME CSGO Server RefuseManualStart=no RefuseManualStop=no [Service] WorkingDirectory=/home/csgo ExecStart=/bin/bash csgo_updater.sh User=csgo Group=csgo [Install] WantedBy=multi-user.target

now before we enable the service, remember we commented out the start script commands in the csgo_updater.sh file

enable and check the status of the created service:

Journey the output of the service and see how it goes:

this outputs the log and scrolls to the end

Now your server is up and running with some default settings

enter the root of your csgo server folder:

just to clarify content, here you’ll find your start script which we made earlier and the run-times for source server. (confirm with ls command)

enter one step further into the folder called csgo.

here you will find the cfg folder and the maps folder. (confirm with ls command)

HERE you create the file which takes your workshop map ids:

122443683 270124159 257166103 147545033 1173989333 707984520 765936384 644518351 496123922 1079988970

(yes, these are working steam workshop ids)

— important note —
you do not have to restart your server if you add to this while the server is running
BUT you will have to restart if the file never existed in the first place

now let us add a rcon passord so you can remote interface with your server:

NOTE: if you create the user steam instead, and call the install location for game, that path with look more human readable, but this guide was made from the actual install output, and i named my account csgo.

if file does not exist it will be created when you nano it with:

hostname «MY AWESOME CSGO SERVER» rcon_password «ijusthatestrongpasswords» sv_allowupload «1» sv_allowdownload «1» sv_password «onlyishallpass» bot_quota «0»

Читайте также:  Linux mint mate настройка

notes:
bot_quota will not be able to exceed maxplayers_override XX set in the start script
allow uploads and downloads required for «custom maps» not served via workshop.

some clients might also need to enable these if they get errors in console when attempting to download maps.

BUT, with workshop provided ids, you will download from the workshop — not the server.

now you can connect to your server, it should now be possible to find it in the public steam list, but that is quite long.

you might want to simply add it to favorites or via console.

if your server had a password set:

workshop maps are identified with a workshop/ prefix to it.

NOTE: According to the documentation on valve pages, it claims the download starts on server boot. this is NOT a fact.

if your API key is missing or wrong, you will be informed here.

TIP: you can add that command to your server.cfg file

there is no output when it runs or finishes. so simply use:

NOTE: keep in mind, while downloading is active your server might lag, so do it when you have low traffic.

Источник

Dedicated csgo server linux

git clone https://aur.archlinux.org/steamcmd.git cd steamcmd/ ./steamcmd login anonymous app_update 740

Go to https://steamcommunity.com/dev/managegameservers/
App ID — 730
Memo — just a label
Click «Create» and grab your login token

cd .steam/steamapps/common/Counter-Strike\ Global\ Offensive\ Beta\ -\ Dedicated\ Server/ nano csgo/cfg/server.cfg

Add there «sv_setsteamaccount YOUR-LOGIN-TOKEN«

You can take server.cfg somewhere end edit it or write it by yourself, do what you want.

./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_active -tickrate 128 +map de_mirage

Download archives from there and extract it into «csgo» folder

The mod path should look like this «.steam/steamapps/common/Counter-Strike\ Global\ Offensive\ Beta\ -\ Dedicated\ Server/csgo/addons/«

Now start your server again and type «meta list».

If you see list of addons — your server is ready to go.

If console prints that there is no such command, read text below.

Unable to load plugin «addons/metamod/bin/linux64/server»
Failed to load plugin «addons/metamod/bin/server»

If you see this error in console during server start, then you should download lib32-gcc-libs.

Now start your server.
If you still have the same problem, then you should downgrade these libs.

I’ve downgraded these libs to 10.2.0-6 version, any earlier version didn’t solve this problem to me.

If pacman failing because of PGP signature, then you should edit /etc/pacman.conf to have the following lines under [options]

Now type «meta list» in console
If it prints list of plugins, then Metamod and SourceMod are successfully installed!

Источник

Оцените статью
Adblock
detector