Hosting A CS:GO Surf Server

This tutorial will be guiding you through installing your first CS:GO dedicated server running on a Linux machine. It may feel like a long read but I’ve tried to make it as concise as possible.

Things you will need.. (links will be down the bottom)

  • Ubuntu Server 14.04.3 LTS
  • Linux Game Server Manager
  • Sourcemod, Metamod
  • ckSurf 1.18b
  • MySQL or SQLite database
  • Google

Updating Ubuntu

After you have installed your Ubuntu operating system be sure to update it to the latest version by going into Terminal and doing

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Opening Your Ports

Depending on what router you have, your router’s IP address will differ. Mine is 192.168.0.1 . Googleing your router’s model number is the easiest way to find this.

When prompted for authentication details, enter “admin” for username and “password” for password. This is usually the default, if not consult Google.

Head over to the Port Forwarding/Port Triggering tab, if you have trouble go to Port Forward for instructions for your particular router.

We want to open ports 3478 UDP/TCP, 4379-4380 UDP/TCP and 27000-27050 UDP/TCP

Port forward

Installing Linux GSM

Using Linux GSM is the easiest way to install your CS:GO dedicated server as most of the server settings have already been set up for you. It also allows you to update your server easily with one command.

Firstly install all of the dependencies

for 64-bit Ubuntu:

sudo apt-get install tmux mailutils postfix curl lib32gcc1 libstdc++6 libstdc++6:i386

for 32-bit Ubuntu:

sudo apt-get install tmux mailutils postfix curl libstdc++6

We will then need to create a new user on our operating system as installing on root is not advisable:

adduser csgoserver
passwd csgoserver
su - csgoserver

Downloading the script ..

wget http://gameservermanagers.com/dl/csgoserver

Make it executable

chmod +x csgoserver

Installing the server

./csgoserver install

Each steam server now requires a steam server token in order for it to be publicly visible, head over here to acquire one. The App ID for CS:GO is 730.

Once you have done that it’s time to configure your server’s start-up settings. open ‘csgoserver’ with your favourite text editor.

vim ./csgoserver

find gslt=”” and insert your steam token. eg. gslt=”FA77xxxxxxxxxx”. We can leave everything else as default for now.

That is basically it if you want to host a pure CS:GO server but for surf we will need to install a few more plugins.

Installing Sourcemod and Metamod

Sourcemod is an addon on for games running on the Half-Life 2 engine which allows custom plugins to be added, we need this for our surf timer.

Head over to your csgo folder and download sourcemod and metamod.

cd ~/serverfiles/csgo/
wget https://www.sourcemod.net/smdrop/1.7/sourcemod-1.7.3-git5286-linux.tar.gz
wget http://mirror.pointysoftware.net/alliedmodders/mmsource-1.10.6-linux.tar.gz

Extracting the files

tar -zxvf sourcemod-1.7.3-git5286-linux.tar.gz
tar -zxvf mmsource-1.10.6-linux.tar.gz

Sourcemod is now installed, but if you hop onto your server, you will not yet have any admin powers. We will need to make ourself an admin.

go to the sourcemod configs folder and edit “admins_simple.ini”…

cd ~/serverfiles/csgo/addons/sourcemod/configs/
vim admins_simple.ini

From there add your Steam ID as “STEAM_xxxxxxxx” “99:z”. The z flag will give you root admin. To find your Steam ID go here.

Installing Stripper:Source

Since a lot of surf maps have timed jails and weapons that are no longer available in CS:GO, we will need to remove them otherwise the server can break. Thankfully installation is just as simple and the timer we will be using has a collection of stripper files provided for us. Head over to stripper:source and download the latest snapshot for Linux. Download the one with the highest number after “git”.

cd ~/serverfiles/csgo
wget http://www.bailopan.net/stripper/snapshots/1.2/stripper-1.2.2-git116-linux.tar.gz
tar -zxvf stripper-1.2.2-git116-linux.tar.gz

Sanity Check

Now is a good time to check that we have installed the above correctly, let’s start the server and hop into the server’s console.

cd ~/
./csgoserver start
./csgoserver console

You should be able to see server’s details by typing “status”. To check if your installation went smoothly type “meta list”. You should see that Sourcemod, Metamod and Stripper has loaded successfully. To see all the plugins that you currently have installed type “sm plugins list”.

Linux GSM website has a list of all the commands for your server including update etc. Consult this for more information. Also head over to the Sourcemod wiki to learn more about Sourcemod commands.

Installing ckSurf 1.18-Beta

Go to the ckSurf Github page to download the latest version

cd ~/serverfiles/csgo/
wget https://github.com/jonitaikaponi/ckSurf/archive/1.18-Beta.zip
unzip 1.18-Beta.zip
rsync -a ckSurf-1.18-Beta/csgo/ ~/serverfiles/csgo

Next we need to import the stripper files.

rsync -a ckSurf-1.18-Beta/Optional\ files/Stripper\ configurations ~/serverfiles/csgo/addons/stripper

Configuring the Database

Head over to your Sourcemod configs folder again and we will add in our database for ckSurf.

cd ~/serverfiles/csgo/addons/sourcemod/configs/
vim databases.cfg

then insert your database details before the last curly braces in the following format.

"cksurf"
{
    "driver"   "mysql"
    "host"     "<your host>"
    "port"     "<your port>" //default is 3306 for mysql
    "database" "<your database name>"
    "user"     "<username>"
    "pass"     "<password>"
}

Installing Some Surf Maps

We’re almost there. Just need some surf maps for our surf server (durr). For now we will just download everyone’s favourite map, surf_kitsune. Head over to your csgo maps folder and let’s download it.

cd ~/serverfiles/csgo/maps/
wget http://fastdl.gflclan.com/csgo/maps/surf_kitsune.bsp.bz2
bunzip2 surf_kitsune.bsp.bz2

Now that its in our maps folder we should update our maplist.txt and mapcycle.txt. These files can be found in your csgo folder. (~/serverfiles/csgo). Append the map names that you want your server to run e.g “surf_kitsune”.

We also need to give our server a download url so people can download our maps. This is configured in csgo-server.cfg in our csgo/cfg folder. Add the following lines

sv_downloadurl "http://fastdl.gflclan.com/csgo/"
sv_allowupload "1"
sv_allowdownload "1"

Time to Surf

Hop onto your surf server, you should be able to find it by searching for “cksurf”, or you can connect via IP.

To change the maps to surf_kitsune type “!map surf_kitsune”. Hopefully it should download the map for you succesfully. You may notice that the maps currently doesn’t have any zones. That’s because we haven’t imported them yet. Type “!insertmapzones” to insert some premade zones nad “insertmaptiers” to insert their tiers. These should only ever be ran once.  Some maps may not be zoned so you will have to zone them yourself through “!zones”. Always remember to backup your database or risk losing all your hard work.

 

Links

Port Forward – http://portforward.com/
Linux GSM – http://gameservermanagers.com/lgsm/csgoserver/
Steam Token – http://steamcommunity.com/dev/managegameservers
Sourcemod – https://www.sourcemod.net/downloads.php
Metamod – https://www.metamodsource.net/
Stripper – http://www.bailopan.net/stripper/snapshots/1.2/
ckSurf – https://forums.alliedmods.net/showthread.php?t=264498
ckSurf Github – https://github.com/jonitaikaponi/ckSurf/tree/1.18-Beta
Maps – http://fastdl.gflclan.com/csgo/maps/

5 Comments Add yours

  1. Fishy says:

    there is a way to do this without linux?
    casue im on windows 10….
    please help

    Like

  2. ruzumaki says:

    I always wanted to host an awesome surf server.
    Thank you for the guide, you are really a life saver.

    Like

    1. minh9956 says:

      Thanks! If you do have any feedback regarding the guide please don’t be afraid to share them. Let me know if there were any parts that may have been confusing. I want to make it as easy as possible to follow for everyone. -Minh

      Like

      1. ruzumaki says:

        Sorry for late reply.
        Perhaps you might want include some guide on how to setup the mysql database and the db table. =)
        Like:
        apt-get install mysql-server
        apt-get install lib32z1
        service mysqld start
        chkconfig mysqld on
        mysql_secure_installation

        (Acess mysql-cli and create cksurf db)
        mysql -u root -p
        CREATE DATABASE cksurf;
        exit

        cd ~/serverfiles/csgo/addons/sourcemod/configs/
        vi databases.cfg

        “cksurf”
        {
        “driver” “mysql”
        “host” “127.0.0.1”
        “port” “3306” //default is 3306 for mysql
        “database” “cksurf”
        “user” “your_db_user”
        “pass” “your_db_pass”
        }

        Hope to see more nice csgo server setup guide from you in future. I am particularly interested in combat surf server after having so much fun on skill surf server.

        Liked by 1 person

  3. Lars says:

    Great job on this guide, I look forward to see more content 🙂

    Like

Leave a comment