Create a CS:GO Dedicated Server (Free Forever)

You’ll learn to setup a Counter Strike CS:GO dedicated server, and it’s free forever. This is possible by setting up the linux game server manager on a free tier Oracle cloud server. By combining these free resources, you’ve got your own server.

The commands used to install and setup the server are below. You can copy and paste them from here as you follow through the video guide above.

This guide is based on the Linux GSM docs here.

Start by switching to sudo:

sudo su -

Install the dependencies:

sudo dpkg --add-architecture i386; sudo apt update; sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386 steamcmd

Press Y for yess, then enter if prompted

You’ll then see a license agreement, press enter to scroll through the agreement, enter 2 and press enter to agree to the license.

Then we install our text editor (nano) and Cron to run auto updates on our cs server.

apt install nano cron

Then set iptables to allow port 27015 (Three separate commands here)

iptables -I INPUT 6 -m state --state NEW -p tcp --dport 27015 -j ACCEPT

iptables -I INPUT 6 -m state --state NEW -p udp --dport 27015 -j ACCEPT

netfilter-persistent save

Add a new user ‘csgoserver;

adduser csgoserver

Paste in a good password, then filling out the user details is optional

Then add the user to the sudoers group, then change to the new user

sudo usermod -aG sudo csgoserver

su - csgoserver

Get the script to install the cs server

wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh csgoserver

Then get a steam token from https://steamcommunity.com/dev/managegameservers
Use 730 for the App ID, and name your description anything you like. You’ll need to login to your steam account to do this part.

Run the CS:GO server install (use default settings, hit enter when prompted, paste in token when prompted)

./csgoserver install

You can check the server details now:

./csgoserver details

Now set the server name and Rcon passwords by editing the config.

nano /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg

You can set your game type here, e.g. for casual settings, add these lines to the csgoserver.cfg

game_type 0
game_mode 0

Alternatively, there are other gametypes you can set here:
https://docs.linuxgsm.com/game-servers/counter-strike-global-offensive

To setup the auto updates, make sure you’re working as the user csgoserver

su - csgoserver

Edit the crontab

crontab -e

paste the following into your crontab:

*/5 * * * * /home/csgoserver/csgoserver monitor > /dev/null 2>&1
*/30 * * * * /home/csgoserver/csgoserver update > /dev/null 2>&1
0 0 * * 0 /home/csgoserver/csgoserver update-lgsm > /dev/null 2>&1

start the server

./csgoserver start

You can now launch the game, make sure you have ‘enable developer console’ ticked on your game settings.

Example console commands to use in game:

rcon_password YourRconPassword

rcon mp_restartgame 3

Similar Posts