Go Back   Hardware Canucks > PC BUILDERS & TWEAKERS CORNER > Guides & How-to's

    
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old July 2, 2009, 12:52 PM
Rookie
 
Join Date: May 2009
Location: Vancouver, BC
Posts: 33
Default GUIDE: Setup SRCDS / CS:S Dedicated Server (Windows)

The Guy's how to setup a srcds


1. Before anything you need to figure out the specifications for your server.


How many players?
What game?
What type of server?
What 'remote control' do I need?
Should it be hack secured?

... and many more. So lets look at it this way.

Absolute minimum for servers (Bold'd is suggested):


---------------------

Server Size: 8
---------------------
CPU: 800mhz
RAM: 256MB
---------------------
CPU: 1200mhz
RAM: 384MB


---------------------
Server Size: 16
---------------------
CPU: 1200mhz
RAM: 384MB
---------------------
CPU: 1600mhz
RAM: 512MB


---------------------
Server Size: 24
---------------------
CPU: 1600mhz
RAM: 512MB
---------------------
CPU: 2200mhz
RAM: 768MB


---------------------
Server Size: 32
---------------------
CPU: 2200mhz
RAM: 768MB
---------------------
CPU: 2600mhz
RAM: 1000MB


Games
(Using CS:S for this example):
Counter-Strike: Source

Day of Defeat: Source

Half-Life 2

Half-Life 2: Deathmatch

Half-Life 2: Episode One

Half-Life 2: Episode Two

Half-Life 2: Lost Coast

Half-Life Deathmatch: Source

Half-Life: Source

Left 4 Dead

Left 4 Dead 2

Portal

Team Fortress 2


Types of servers (using hostage on crackhouse):

Surfing
Zombie
Scout & Knifez
Warmode
Deathmatch
Hostage
Bomb

Types of 'remote control' (using mani):

Mani-Admin-Plugin (MAD)
Source Mod
Rcon
Custom Built - Another tutorial

Should it be hack secured:It all depends if you want hackers (yes there bad but this also allows you to have less lag on your server + more people).


2. Downloading the server files (May take 5 minutes may take 5 hours).


379.13 KB Base FilesDownload.


Picture of updater



You will need to download the server files using HLdsUpdateTool.exe which you will find in this .rar file which I upload. You will then need to make a directory that will fit your needs something like: 'C:\HLServer\'. Then run the update.bat (for cs:s users, view the update readme for more information). When Its done downloading run it again to update + check for missing files and continue.


Picture of files

Source of update.bat
Code:
HldsUpdateTool.exe -command update -game "Counter-Strike Source" -dir c:\HLserver
__________________
Got a bargain? Count me in!
The Guy @ Hardwarelogic.com

Last edited by The Guy; July 2, 2009 at 01:45 PM.
Reply With Quote
  #2 (permalink)  
Old July 2, 2009, 12:53 PM
Rookie
 
Join Date: May 2009
Location: Vancouver, BC
Posts: 33
Default

3. Downloading and finding your 'remote control' or admin system.

Mani-Admin-Plugin
Source Mod

If you are going to be using this server a lot or have it full with people you will need some sort of admin tool. Yes you can use rcon but it is very basic, I would suggest Sourcemod or Mani-Admin; they both are feature packed and are very easy to use.

Note! I would like to tell new server hosters to pick source mod because Mani-Admin is outdated and can be insecure, Sourcemod also allows a lot of scripting.

Installing Mani-Admin-Plugin:
Source

Using Mani Admin Plug-in as VSP is the most common way.

Installing Mani Admin Plugin
If you want to hook Mani Admin Plugin as VSP, execute the CreateVDF.exe located in your \addons folder and select your Game Mod, after that hit "Save VDF" and save the newly created file locally. If you're using Linux and can't use the .exe, create a new file called mani_admin_plugin.vdf, open it with notepad and paste the following into it (for Cs:S only, needs to be adapted for another mod):

"Plugin"
{
"file" "../cstrike/addons/mani_admin_plugin"
}

Now you should have a file called mani_admin_plugin.vdf placed in your addons folder. Now it's depending on your type of server where to install/upload the files to:


If you want to use Mani for a Listenserver
(a server created ingame via the "Create Game" menu point) copy this 4 folders to
- Installpath\SteamApps\accountname\path of your mod\yourmod


If you want to use Mani for a dedicated Server hosted at home
copy this 4 folders to
- Installpath\SteamApps\accountname\source dedicated server\yourmod


If you want to use Mani for a dedicated rented server
upload this 4 folders via an FTP File Client Tool into the root folder of you mod (Filezilla is a good FTP Client)


Notice that if you're planing to use custom skins on your server, you've to download the skins folders as well, as they aren't provided within the download of Mani Admin Plugin anymore.

Afterwards, open your mani_server.cfg (via PSPad or some similiar Notepad) and adjust it for your wishes. Afterwards, you need to install your admins and add exec mani_server.cfg into your server.cfg .

Please restart your server and Mani Admin Plugin should be working on your server. You can verify this via typing ma_version into the server console and it should reply with Mani Admin Plugin and its version number.

Installing Sourcemod:
Source

Prerequisites

A GUI Web Browser to retrive Metamod and SourceMod compressed archives. A tool to copy archive to your dedicated server host.
SourceMod requires Metamod:Source 1.4.3 or higher. Click here to visit the Metamod:Source homepage. Instructions to install SourceMM muanually can be found here.
SourceMod will run on any mod built using the Source SDK. It also supports "The Ship," which uses the Source engine.
Uploading/Installing

Local Server

To install SourceMod locally, simply extract the .zip (Windows) or .tar.gz (Linux) package to your mod folder (i.e. cstrike for Counter-Strike, dod for Day of Defeat, et cetera). Download Here
Remote Server

To install SourceMod remotely, first extract the .zip (Windows) or .tar.gz (Linux) package to your local computer (for example, your Desktop). You will see an addons folder.
Using a tool such as FTP, locate your mod folder (i.e. cstrike for Counter-Strike:Source, dod for Day of Defeat:Source, et cetera). Underneath this folder, you should have an addons folder (if not, Metamod:Source is probably not installed). From your local addons folder, upload the entire contents to your remote addons folder. When done, your remote addons folder should have a sourcemod folder.
If you have trouble with these steps, you need to get acquainted with FTP and server management. However, you can also ask your server provider for help. Some providers also have web interfaces for managing your server.
Alternatively, if you copied the tar.gz to your srcds directory, execute the following from the cstrike sub directory: tar -xzf ../sourcemod-1.1.0.tar.gz
Checking the Install

Your folder layout should look like:
  • [mod] - Your mod's folder
    • addons
      • metamod - Metamod:Source
      • sourcemod - SourceMod
Once SourceMod is uploaded/copied and configured with Metamod:Source, restart your server completely. If it is local, shut it down and restart it. If it is remote, you may need to ask your server provider for help. However, it is often safe to issue a "quit" command via rcon, and most providers will automatically restart your server.
First, in your server console (not client console), type:
meta list If the install worked, you will see something like:
] meta list
Listing 1 plugin:
[01] SourceMod (1.1.0.2489) by AlliedModders LLC You should then be able to use the SourceMod root console command, which can be invoked with simply:
sm For example:
] sm version
SourceMod Version Information:
SourceMod Version: 1.1.0.2489
SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.1.0-svn)
SourcePawn API: v1 = 4, v2 = 2
Compiled on: Sep 5 2008 02:02:12
SourceMod: Half-Life 2 Scripting

Lastly, assuming you have already setup your administration user, you can test the in game menu by joining the server, and in the client console type the following:
sm_admin You should see a menu popup with all you options.
Troubleshooting

If the install failed, you will generally see one of four symptoms.
Metamod reports NOFILE or FAILED

If "meta list" replies with something like this:
] meta list
-Id- Name Version Author Status
[01] - - - NOFILE Most likely, either the files are not located in the correct place, or the file could not be loaded. For more information, use the following command (except use the correct list number):
meta list 1 Metamod lists no plugins

If "meta list" replies with something like this:
] meta list
-Id- Name Version Author Status You forgot to add SourceMod to the addons/metamod/metaplugins.ini file. Or if that doesn't fix your problem, make sure you are using the correct build of Sourcemod (zip = windows, tar = linux).
Metamod says nothing

If "meta list" has no reply at all, Metamod:Source is not properly installed. This wiki page may provide you with clues on how to solve this problem.
__________________
Got a bargain? Count me in!
The Guy @ Hardwarelogic.com
Reply With Quote
  #3 (permalink)  
Old July 2, 2009, 12:53 PM
Rookie
 
Join Date: May 2009
Location: Vancouver, BC
Posts: 33
Default

4. Seting up your server.cfg.


Picture of my cfg (I used his as a base)

The next big thing is making your server yours. I will be going into this in another tutorial but for now just fill in the spots that tell you to. (You may comment out the download url because I will be going into that with another tutorial.

Note! Make sure to place this in C:\HLServer\cstrike\cfg\

Code:
//Base Config files: The Guy

/////////// *Server password and info*\\\\\\\\\\\

// Server ip (to avoid RCon problems)
ip 127.0.0.1

// Internet= 0     LAN= 1
sv_lan 0

// 0=US East coast, 1=US West coast, 2= South America, 3=Europe,
// 4=Asia, 5=Australia, 6=Middle East, 7=Africa and 255=world.
sv_region 0

// Servername
hostname "PUT NAME HERE" 

// Rcon password
rcon_password "PUT PASS HERE"

// Number of minutes to ban users who fail Rcon authentication
sv_rcon_banpenalty 0

// Max number of times a user can fail rcon authentication before being banned
sv_rcon_maxfailures 0

// Number of times a user can fail rcon authentication before being banned
sv_rcon_minfailures 0

// Number of seconds to track failed rcon authentications.
sv_rcon_minfailuretime 20

// Game password
// sv_password betamax

//Max net file size
net_maxfilesize 128

// Download URL for custom files
sv_downloadurl "PUT URL"



//////////////// *Game Settings* \\\\\\\\\\\\\\\\\

// Buytime at the begin of a round (in minutes)
mp_buytime 1

// Sets the amount of starting money, max=16000
mp_startmoney 8000

// C4 Countdown timer (in seconds)
mp_c4timer 30

// Enable flashlight= 1      Disable flashlight= 0
mp_flashlight 1

// Enable Footsteps= 1      Disable Footsteps= 0
mp_footsteps 1

// Enable Fallingdamage= 1      Disable Fallingdamage= 0
mp_falldamage 1

// Maximum hostage kills to boot a player (Disable= 0)
mp_hostagepenalty 0

// Timelimit (in minutes)
mp_timelimit 45

// Maximum frags a player can get until mapchange
mp_fraglimit 0

// Amount of wins per team to end game (Disable= 0)
mp_winlimit 0

// Amount of wins in total to end game (Disable= 0)
mp_maxrounds 0

// Time per round (in minutes) ((Min= 1  Max= 9))
mp_roundtime 3

// Sets the time before players can move in the beginning of a round (in seconds)
mp_freezetime 4

// Toggles the forcing of clients to join teams to make it balanced. 1=on and 0=off
mp_autoteambalance 1

// Sets the maximum number of player differences (Disable= 0)
mp_limitteams 2

// Friendly Fire (Enable= 1     Disable= 0)
mp_friendlyfire 1

// Kill a player next round if he Teamkilled someone (Enable= 1     Disable= 0)
mp_tkpunish 0

// Kick idle/team-killing players (Enable= 1     Disable=0)
mp_autokick 0

// Kick players who team-kill within this many seconds of a round restart.
mp_spawnprotectiontime 5

// After this many seconds without a message from a client, the client is dropped
sv_timeout 60

// Restrict spectatorcamera view for dead players (Enable= 1     Disable= 0)
mp_forcecamera 0

// Controls what information player can see in status bar (All= 0,  Team Names= 1,  No Names= 2)
mp_playerid 0

// Allow Spectators or not (Enable= 1     Disbale= 0)
mp_allowspectators 0

// World gravity settings (Default= 800)
sv_gravity 800

// Maximum velocity an object can have ingame (Default= 3500)
sv_maxvelocity 3500
// Maximum speed a player can move (Default= 350)
sv_maxspeed 350



////////////// *Connection Options* \\\\\\\\\\\\\\

// Max bandwidth rate allowed on server (0= unlimited     max= 20000)
sv_maxrate 8000

// Min bandwidth rate allowed on server (0= unlimited     4000= good for blocking 56k)
sv_minrate 0

// Minimum updates per second (Maximum= 100    increasing this will take more cpu power)
sv minupdaterate 10

// Maximum updates per second (Maximum= 100    increasing this will take more cpu power)
sv_maxupdaterate 60

// Frame rate limiter
fps_max 500

// Allow clients to download files (Enable= 1     Disable= 0)
sv_allowdownload 1

// Allow clients to upload files like spraylogo's (Enable= 1     Disable= 0)
sv_allowupload 1

// Enable player lag compensation (Enable= 1     Disable= 0)
sv_unlag 1

// Amount of time in seconds a player can spray their decal
decalfrequency 20



//////////// *Logging and Misc* \\\\\\\\\\\\

// Creates a logfile (Enable= on      Disable= off)
log on

// Log server bans in the server logs (Enable=1     Disable= 0)
sv_logbans 1

// Log echo information in the console (Enable= 1     Disbale= 0)
sv_logecho 1

// Log server information in the logfile (Enable= 1     Disable= 0)
sv_logfile 1

// Log server information to only one file (Enable=1     Disable= 0)
sv_log_onefile 1

// Folder where logs will be saved
sv_logsdir E:\CSSDS\cstrike\logs\

// Voice Codec to use (specify DLL without the DLL extension)((Default= vaudio_miles))
sv_voicecodec voice_speex
sv_voicequality 2

// Enable microphone (Enable= 1      Disable= 0)
sv_voiceenable 1

// Allow players to hear all other players (Enable= 1     Disable= 0)
sv_alltalk 1

// Enable HLTV on the Server (Enable= 1     Disable= 0)
sv_hltv 0

// Cheats (Enable= 1     Disable= 0)
sv_cheats 0

// Client ability to pause the server (Enable= 1      Disable=0)
sv_pausable 0

// Force clients to pass consistencycheck for critical files (Enable= 1     Disable= 0)
sv_consistency 0

// Amount of time players can chat after the game is over (in seconds)
mp_chattime 15

// If not 0 then game will restart in the specified number of time (in seconds)
mp_restartgame 0

//Contace
sv_contact "EMAIL HERE"

// execute ban files
exec banned_user.cfg
exec banned_ip.cfg
5. Starting your server and adding tickrate.



Picture of server running

You may see servers saying 100tick and 500fps, that means that the server has good pyshics and should be lag free. So how do I do this? By ping boosting and adding a command to the shortcut we will be making.

A) First make a basic launcher, create a shortcut to srcds.exe and add this after the shortcuts properties: -console -game cstrike +map (Map without bsp) -maxplayers (Amount of players you want) -autoupdate

Note! Add '-insecure' for insecure (Non-Vacced) servers.


Picture of shortcut

B) Adding tickrate and ping boosting; it makes the ingame pyshics and overall gameplay way better.

Note! Tick rate can only be changed at the start of the server.
Note! To enable high tickrate and keep fps you need to pingboost. (Run: srcdsfpsboost.exe)
Note! Do not put tickrate higher then 100; bad things will happen.

To add, simply put this before autoupdate and after maxplayers.
-tickrate (X amount, ie: 33,66,100).


6. FAQ.

Quote:
How can i add extra maps such as Fy_iceworld?
Copy it to C:\HLServer\cstrike\maps
Then add the name without .bsp to maplist.txt
Then add the name without .bsp to mapcycle.tx
Then start up. If you want it as the start map change +map to map name without .bsp

Quote:
Originally Posted by jcmaz View Post
how can i put bots in my server?

THX
I don't know off the bat. bot_add or use mani/source mods bot add function. To remove just kick them.

Quote:
My server 'chokes' or lags a lot; My tick is 100 or my latency is really high.
Quote:
Originally Posted by probationer View Post
Oh that's the other thing, dot expect just because you have enough upload that you can run a server (yes you know who you are Mr ADSL2+) , ping is king you need a very low latency connection aka fiber to run anything bigger than 10 (the magic number again) without encountering numerous complaints about lag and choke.
Quote:
Originally Posted by probationer View Post
Side note, the increase in cpu power required for 100 tick vs 66 is quite substantial and pretty much not worth doing when you have anything more than 10-12 players (especially over internet the ping time makes the increase almost meaningless). IMO 100tick should be reserved for clan match servers and 66 for pubs.

  • Always minimize your client when it is running for some reason the memory will sit a lot higher when it is displayed to try this out run a server for a couple hours, then minimize it watch the memory shrink, yes it will come back up but no where near as high
  • Remember to assign srcds to a specific affinity, it is yet to properly utilise more than one core, yes the orange box srcds is meant to however the performance vs 1 core assignment is shite.
__________________
Got a bargain? Count me in!
The Guy @ Hardwarelogic.com

Last edited by The Guy; July 6, 2009 at 01:12 PM.
Reply With Quote
  #4 (permalink)  
Old July 2, 2009, 12:53 PM
Rookie
 
Join Date: May 2009
Location: Vancouver, BC
Posts: 33
Default

Update log.

Current Rev. 1.2

Changelog:

------------------
1.2

------------------
Added two FAQ.

------------------
1.1

------------------
Added one FAQ.
Added Images.
Checked spelling.

------------------

1.0

------------------
Made guide

Last update: Thursday, July 02, 2009
__________________
Got a bargain? Count me in!
The Guy @ Hardwarelogic.com

Last edited by The Guy; July 6, 2009 at 01:13 PM.
Reply With Quote
  #5 (permalink)  
Old July 2, 2009, 12:55 PM
jcmaz's Avatar
Hall Of Fame
F@H
 
Join Date: Feb 2009
Location: Vancouver, BC
Posts: 2,453

My System Specs

Default

How can i add extra maps such as Fy_iceworld?
__________________
“Wise men speak because they have something to say; Fools because they have to say something.”

-Plato
Reply With Quote
  #6 (permalink)  
Old July 2, 2009, 01:20 PM
Rookie
 
Join Date: May 2009
Location: Vancouver, BC
Posts: 33
Default

Quote:
Originally Posted by jcmaz View Post
How can i add extra maps such as Fy_iceworld?
Copy it to C:\HLServer\cstrike\maps
Then add the name without .bsp to maplist.txt
Then add the name without .bsp to mapcycle.tx
Then start up. If you want it as the start map change +map to map name without .bsp
__________________
Got a bargain? Count me in!
The Guy @ Hardwarelogic.com

Last edited by The Guy; July 2, 2009 at 01:32 PM.
Reply With Quote
  #7 (permalink)  
Old July 3, 2009, 02:56 PM
jcmaz's Avatar
Hall Of Fame
F@H
 
Join Date: Feb 2009
Location: Vancouver, BC
Posts: 2,453

My System Specs

Default

how can i put bots in my server?

THX
__________________
“Wise men speak because they have something to say; Fools because they have to say something.”

-Plato
Reply With Quote
  #8 (permalink)  
Old July 6, 2009, 11:28 AM
probationer's Avatar
Top Prospect
F@H
 
Join Date: Aug 2008
Location: Melbourne, Australia
Posts: 123
Default

Side note, the increase in cpu power required for 100 tick vs 66 is quite substantial and pretty much not worth doing when you have anything more than 10-12 players (especially over internet the ping time makes the increase almost meaningless). IMO 100tick should be reserved for clan match servers and 66 for pubs.

  • Always minimize your client when it is running for some reason the memory will sit a lot higher when it is displayed to try this out run a server for a couple hours, then minimize it watch the memory shrink, yes it will come back up but no where near as high
  • Remember to assign srcds to a specific affinity, it is yet to properly utilise more than one core, yes the orange box srcds is meant to however the performance vs 1 core assignment is shite.

Good guide to get people going The Guy .
Reply With Quote
  #9 (permalink)  
Old July 6, 2009, 11:33 AM
CMetaphor's Avatar
Quadfather
 
Join Date: May 2007
Location: Montreal, Canada
Posts: 4,999

My System Specs

Default

If I had a better upload rate I'd Soooooooo be using Behemoth for hosting my own server Right Now. Anyone know of how I could get this from videotron easily? I'm capped a 1Mbps Up-speed and 9Mbps down....
__________________
"Backed by common sense and physics!" -Squeetard
Opteron Server for Sale! http://www.hardwarecanucks.com/forum...ade-ideas.html
Reply With Quote
  #10 (permalink)  
Old July 6, 2009, 12:03 PM
probationer's Avatar
Top Prospect
F@H
 
Join Date: Aug 2008
Location: Melbourne, Australia
Posts: 123
Default

Oh that's the other thing, dot expect just because you have enough upload that you can run a server (yes you know who you are Mr ADSL2+) , ping is king you need a very low latency connection aka fiber to run anything bigger than 10 (the magic number again) without encountering numerous complaints about lag and choke.
Reply With Quote
Reply


Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rosetta @ Home - Setup Guide Chilly HardwareCanucks F@H Team 61 September 26, 2013 10:53 PM
Has anyone ever used a Europe-based dedicated server for hosting a N.American Website HoTiCE_ Off Topic 4 April 5, 2009 11:29 AM
dedicated server FC2 nasrott Gaming 0 October 29, 2008 03:20 AM