What is VPS server?
VPS is known as a virtual private server which is used to host website and to do computational task remotely .it is just like a computer sitting remotely.It is generally used by big websites having lots of visitors or doing the computational task.It is costlier than shared web server but it has more resources.It can be used for creating a CSGO game server.
CSGO (counter strike globally offensive ) is well known first person shooter game .it is much popular among youngsters and college students.
Prerequisites for Setting up CS: GO server
- You must own a private copy of CSGO registered with steam.
- Configuring the firewall for CS: GO server [ CSGO uses the port between them ].
$ sudo iptables -R INPUT 5 -p udp -m udp --sport 26900:27030 --dport 1025:65355 -j ACCEPT$ sudo iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPT
Install SteamCMD
SteamCMD is command line utility to update and control dedicated CS: GO web servers.
Step.1 Install required libraries for SteamCmd.
$ sudo apt-get install lib32gcc1 lib32stdc++6 libcurl4-gnutls-dev:i386 screenStep 2. Download and Install Steam CMD.
$ mkdir steamcmd; //creating steamcmd directory for our server
$ cd steamcmd //Choosing the directory
$ wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz // Getting the Installer
$ tar xvzf steamcmd_linux.tar.gz //EXtracting the Tar file
$ rm steamcmd_linux.tar.gz // Removing the original tar fileInstalling Counter Strike: Global Offense on our server
Step 1. Starting the SteamCmd shell script.
$ ./steamcmd.shStep 2. Login with Steam prompt and setting the Installation directory to csgoserver.
login anonymous
force_install_dir ./csgoserver
app_update 740 validateit will take a long time to download files.
After it completes run
$ exit //exits the windowConfiguring the Server
Step.1 Move into your server Directory
$ cd csgoserver/csgo/cfgStep.2 Create a server.cfg config file there.
$ touch server.cfgStep 3. Write the following lines and replace the hostname and password with your Steam credentials.
hostname "<hostname>"
rcon_password "<password>"Launching the CS: GO Dedicated Server
Step.1 Go to your CS: GO directory
$ cd ~/Steam/csgoserverLaunch a Dust 2 server on the competitive game mode.Replace public IP with your <public IP>.You may need to open UDP port 27015 in your firewall to connect
$ ./srcds_run -game csgo -console -usercon +net_public_adr <public ip> -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_bomb +map de_dust2 -autoupdate-game flag represents you game eg cstrike , csgo etc
-console : Starts the game with the developer console enabled.
-usercon : Enables RCON for Counter-Strike: Global Offensive servers.
+net_public_adr : Your public IP.
–game_mode and -game_type are used to choose desired gaming modes eg Classic Casual, Arms Race etc.
Mode game_mode game_type
Classic Casual 0 0
Classic Competitive 0 1
Arms Race 1 0
Demolition 1 1
+map : Loads the map you typed
-autoupdate : Server will search for updates on startup (Linux/Unix only).
Attaching a session screen with Server
- you can attach a session terminal to the server with
$screen -S csgo- and you can remove it by
Control-a, then press dJoining the Game
- Launch Counter-Strike: Global Offensive.
- Once launched, go to Play and click Browse Community Servers.
- Click on the Favorites tab and then click Add a Server at the bottom.
- Type in the IP address of your VPS server and click Add this address to favorites to easily access it.
- Click Connect at the bottom right and start playing.
