Difference between revisions of "Server Configuration"

From Vertigo Gaming Wiki
Jump to: navigation, search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<strong>Server Configuration</strong>
 
<strong>Server Configuration</strong>
  
On this page we will put a server.cfg up on this page to show the settings you can have in it. There are explanations on each variable on why it may be done.  Remember to go to your ZPS Server Directory and replace the contents in it with this example file and tailor it's custom parts to your own liking.
+
On this page we will put a general server.cfg up on this page to show the settings you can have in it.  
 +
 
 +
A server running without a "server.cfg" will run on the defaults that were added by either Valve and/or the game's developer. To edit these and much more, you will need to create a file known as "server.cfg" in your server's cfg directory. The "server.cfg" file does not come with most server installations in Source-based games and must be created on your server in order to change server variables.
 +
 
 +
Below is an example server configuration. There are explanations/comments on each server variable for what it is used for. You may copy/use this example configuration on your own server and use it as you see fit. But, keep in mind that it is not a one size fits all configuration. You should always review your configurations and tailor them towards you and your server's needs.
  
 
  <nowiki>
 
  <nowiki>
Line 10: Line 14:
 
// Server hostname.
 
// Server hostname.
 
hostname "ZPS Server"
 
hostname "ZPS Server"
 
//Map Time
 
mp_timelimit 30
 
  
 
// NOTE: currently, this is disabled due to reserve slots
 
// NOTE: currently, this is disabled due to reserve slots
Line 22: Line 23:
  
 
// Control where the client gets content from.
 
// Control where the client gets content from.
// 0 = anywhere
+
// 0 = anywhere. Users can set custom skins/files on their end and it will work.
// 1 = anywhere listed in the white list
+
// 1 = anywhere listed in the server's white list. This can be adjusted to allow users to
// 2 = official content only
+
// 2 = official content only.
 
sv_pure 0
 
sv_pure 0
  
Line 84: Line 85:
 
//-------------------------------//
 
//-------------------------------//
  
//================ START NOTE ================//
 
// Do NOT change this value to anything but  //
 
// -1 since it will only show up for a select //
 
// group of people otherwise. I would rather  //
 
// it show up for the world and let the ping  //
 
// kicker decide on what to do with them      //
 
// - Kana                                  //
 
//================  END NOTE  ================//
 
 
// This tells us what region of the world to report this server in.
 
// This tells us what region of the world to report this server in.
 +
// NOTE: In most versions of Source, this is no longer necessary to use
 +
// and it no longer functions. This is most likely depreciated, but
 +
// has been kept in for legacy purposes.
 
// -1 = World
 
// -1 = World
 
// 0 = USA East Coast  
 
// 0 = USA East Coast  
Line 116: Line 112:
 
//----- START RCON SETTINGS  -----//
 
//----- START RCON SETTINGS  -----//
 
//--------------------------------//
 
//--------------------------------//
 +
// Sets the rcon password for the server
 +
// NOTE: If you can help it, do not use rcon unless you absolutely must. If you are using sourcemod, just
 +
// use sm_rcon as it will pretty much do everything you need.
 +
// rcon_password "<your password>"
  
 
+
// NOTE: If you need to use rcon, we recommend using a separate config file with the rcon_password in it and using
//This is another configuration file where we recommand you randomly name and put your rcon password.
+
// "exec" to run this configuration. This way its harder (but not impossible) to get to the password.
exec ******.cfg
+
// We named this rcon_pw.cfg for reference, you can name this configuration file anything you like as long as you  
 +
// reference it in your server configuration. Then, make sure to use an rcon locker plugin to keep people from changing the password.
 +
// exec rcon_pw.cfg
  
 
// The number of minutes to ban users who fail the rcon authentication.
 
// The number of minutes to ban users who fail the rcon authentication.
Line 126: Line 128:
 
// The max number of times the user can fail rcon authentication before being banned.
 
// The max number of times the user can fail rcon authentication before being banned.
 
sv_rcon_maxfailures 3
 
sv_rcon_maxfailures 3
 
// The max queries/sec
 
sv_max_queries_sec 3
 
 
// The max queries/sec global
 
sv_max_queries_sec_global 100
 
 
// Windows for queries/sec
 
sv_max_queries_sec_window 10
 
 
// Max connections
 
sv_max_connects_sec 2
 
 
// Max connections/sec
 
sv_max_connects_sec_global 32
 
  
 
//------------------------------//
 
//------------------------------//
Line 191: Line 178:
 
//----- START BANDWIDTH RATE SETTINGS -----//
 
//----- START BANDWIDTH RATE SETTINGS -----//
 
//-----------------------------------------//
 
//-----------------------------------------//
 
// DEPRECIATED: Valve has removed this and, as a result, is no longer necessary. It also cuts the costs of server dramatically.
 
 
// Limits the maximum FPS someone can have. Leave it at 0, for unlimited (we have a 500 fps server).
 
// Limits the maximum FPS someone can have. Leave it at 0, for unlimited (we have a 500 fps server).
 +
// NOTE: In later versions of Source, this value does absolutely nothing for the server.
 
// fps_max 500
 
// fps_max 500
  
 
// Min bandwidth rate allowed on server.
 
// Min bandwidth rate allowed on server.
 
// 0 == unlimited.
 
// 0 == unlimited.
 +
// NOTE: Setting this to 0, especially if sv_maxrate is set to 0 or lower in value than sv_minrate,
 +
// can sometimes cause issues for players as this cvar will adjust player rates on the server based on this value.
 +
// You do not want that! Use a moderate value here and adjust as needed.
 
sv_minrate 13000
 
sv_minrate 13000
  
 
// Max bandwidth rate allowed on the server.
 
// Max bandwidth rate allowed on the server.
 
// 0 == unlimited.
 
// 0 == unlimited.
 +
// NOTE: The maximum rate is 30000, even when set to 0.
 
sv_maxrate 0
 
sv_maxrate 0
  
Line 218: Line 208:
 
// This is the maximum rate that all packets are split.
 
// This is the maximum rate that all packets are split.
 
// Valve default is 15000.
 
// Valve default is 15000.
// This should be the same rate as the sv_maxrate as you should be splitting packets as fast as you send/recieve them.
+
// NOTE: This should be set the same as sv_maxrate, in most cases. The theory is, at least for Source servers,
// At least, that is the theory. If unlimited, set at 100000 and go from there.
+
// packets should be split as fast as you send/receive them. Information about this cvar is rather limited.  
 +
// If sv_maxrate is set to 0 (unlimited), set this to 100000 and adjust from there.
 
net_splitpacket_maxrate 100000
 
net_splitpacket_maxrate 100000
  
Line 233: Line 224:
 
sv_client_cmdrate_difference 1
 
sv_client_cmdrate_difference 1
 
sv_client_predict 1
 
sv_client_predict 1
//sv_client_interpolate 1
+
sv_client_interpolate 1
 
sv_client_min_interp_ratio -1
 
sv_client_min_interp_ratio -1
 
sv_client_max_interp_ratio -1
 
sv_client_max_interp_ratio -1
Line 250: Line 241:
 
//-----------------------------------//
 
//-----------------------------------//
  
// Allow clients to upload customizations files.
+
// Allow clients to upload customization files.
 
// 0 = off.
 
// 0 = off.
 
// 1 = on.
 
// 1 = on.
Line 262: Line 253:
 
// Set the download url for the hosted maps. This is much faster and more
 
// Set the download url for the hosted maps. This is much faster and more
 
// efficient than letting the client download from the server.
 
// efficient than letting the client download from the server.
// Quick Note: Please do not change this url, this is where we should
 
// be downloading from as it has unlimited bandwidth.
 
 
sv_downloadurl ""
 
sv_downloadurl ""
  
Line 286: Line 275:
 
mp_restartround 0
 
mp_restartround 0
  
// Tells the server, in seconds, how long to stay on any one map when
+
// Map timelimit
// the server itself is empty. - Command not supported in ZPS it seems.
+
mp_timelimit 30
//mp_mapcycle_empty_timeout_seconds 3600
 
  
 
//------------------------------------//
 
//------------------------------------//
Line 313: Line 301:
  
 
// After this many seconds without a message from a client, the client is dropped.
 
// After this many seconds without a message from a client, the client is dropped.
sv_timeout 120
+
// Default is 60 seconds.
 +
sv_timeout 60
  
 
//-----------------------------//
 
//-----------------------------//
Line 336: Line 325:
 
// 0 = disabled.
 
// 0 = disabled.
 
// 1 = enabled.
 
// 1 = enabled.
sv_alltalk 1
+
sv_alltalk 0
  
 
//------------------------------//
 
//------------------------------//
Line 350: Line 339:
 
//-----      START MISCELLANEOUS    -----//
 
//-----      START MISCELLANEOUS    -----//
 
//----------------------------------------//
 
//----------------------------------------//
 
+
// Queries and packets. Change/update values as needed.
// Disable the TF2 tv thing at the beginning of the game
 
tv_enable 0
 
 
 
// Interesting cvars that nfo puts in. Not sure what they do, but keep them in anyway.
 
//sv_max_queries_sec 3
 
//sv_max_queries_sec_global 150
 
 
sv_parallel_packentities 0
 
sv_parallel_packentities 0
 
sv_parallel_sendsnapshot 0
 
sv_parallel_sendsnapshot 0
Line 364: Line 347:
 
mapcyclefile mapcycle.txt
 
mapcyclefile mapcycle.txt
  
// Maximum ragdolls to display. Aka: Corpses!!
+
// Maximum ragdolls to display on the server. Aka: Corpses!!
 
sv_maxragdolls 3
 
sv_maxragdolls 3
  
// Block bunnyhopping on the server
+
// Block bunnyhopping on the server.
 
// 0 = unblocked
 
// 0 = unblocked
 
// 1 = blocked
 
// 1 = blocked

Latest revision as of 11:54, 28 August 2016

Server Configuration

On this page we will put a general server.cfg up on this page to show the settings you can have in it.

A server running without a "server.cfg" will run on the defaults that were added by either Valve and/or the game's developer. To edit these and much more, you will need to create a file known as "server.cfg" in your server's cfg directory. The "server.cfg" file does not come with most server installations in Source-based games and must be created on your server in order to change server variables.

Below is an example server configuration. There are explanations/comments on each server variable for what it is used for. You may copy/use this example configuration on your own server and use it as you see fit. But, keep in mind that it is not a one size fits all configuration. You should always review your configurations and tailor them towards you and your server's needs.

//----------------------------------//
//----- START GENERAL SETTINGS -----//
//----------------------------------//

// Server hostname.
hostname "ZPS Server"

// NOTE: currently, this is disabled due to reserve slots
// Overrides the max players reported to prospective clients
sv_visiblemaxplayers 24

// Your server password. A pair of double quotes means it is not set and anyone can join.
//sv_password ""

// Control where the client gets content from.
// 0 = anywhere. Users can set custom skins/files on their end and it will work.
// 1 = anywhere listed in the server's white list. This can be adjusted to allow users to 
// 2 = official content only. 
sv_pure 0

// Control whether or not the client will get kicked for failing sv_pure check.
sv_pure_kick_clients 0

// Set the pause state of the server
setpause 0

// Is the server pausable?
// 0 = no
// 1 = yes.
sv_pausable 0

// Type of server being run.
// 0 = internet 
// 1 = lan.
sv_lan 0

// This tells us if the server enforces consistency for critical files.
// Leave this at 0 so people can have nice custom junk on, otherwise they will get dropped :(
// 0 = false
// 1 = true.
sv_consistency 0

// Collect CPU usage stats (set this to zero for better preformance)
sv_stats 0

//--------------------------------//
//----- END GENERAL SETTINGS -----//
//--------------------------------//






//-----------------------------------//
//----- START BANNED USER ITEMS -----//
//-----------------------------------//

// Execute Banned Users config files
exec banned_user.cfg
exec banned_ip.cfg
writeid
writeip

//---------------------------------//
//----- END BANNED USER ITEMS -----//
//---------------------------------//






//-------------------------------//
//----- START SERVER REGION -----//
//-------------------------------//

// This tells us what region of the world to report this server in.
// NOTE: In most versions of Source, this is no longer necessary to use
// and it no longer functions. This is most likely depreciated, but
// has been kept in for legacy purposes.
// -1 = World
// 0 = USA East Coast 
// 1 = USA West Coast
// 2 = South America 
// 3 = Europe 
// 4 = Asia 
// 5 = Australia
// 6 = Middle East
// 7 = Africa
//sv_region 0

//-----------------------------//
//----- END SERVER REGION -----//
//-----------------------------//






//--------------------------------//
//----- START RCON SETTINGS  -----//
//--------------------------------//
// Sets the rcon password for the server
// NOTE: If you can help it, do not use rcon unless you absolutely must. If you are using sourcemod, just
// use sm_rcon as it will pretty much do everything you need.
// rcon_password "<your password>"

// NOTE: If you need to use rcon, we recommend using a separate config file with the rcon_password in it and using 
// "exec" to run this configuration. This way its harder (but not impossible) to get to the password. 
// We named this rcon_pw.cfg for reference, you can name this configuration file anything you like as long as you 
// reference it in your server configuration. Then, make sure to use an rcon locker plugin to keep people from changing the password.
// exec rcon_pw.cfg

// The number of minutes to ban users who fail the rcon authentication.
sv_rcon_banpenalty 1440

// The max number of times the user can fail rcon authentication before being banned.
sv_rcon_maxfailures 3

//------------------------------//
//----- END RCON SETTINGS  -----//
//------------------------------//






//------------------------------//
//----- START LOG SETTINGS -----//
//------------------------------//

// Enables loggin to file, console, and udp.
// The only options are "on" or "off".
log 1

// Log server information to only one file.
// 0 = off.
// 1 = on.
sv_log_onefile 1

// Log server information in the log file.
// 0 = off.
// 1 = on.
sv_logfile 1

// Log server bans in the server logs.
// 0 = off.
// 1 = on.
sv_logbans 1

// Echo log information to the console.
// 0 = off.
// 1 = on.
sv_logecho 1

//----------------------------//
//----- END LOG SETTINGS -----//
//----------------------------//






//-----------------------------------------//
//----- START BANDWIDTH RATE SETTINGS -----//
//-----------------------------------------//
// Limits the maximum FPS someone can have. Leave it at 0, for unlimited (we have a 500 fps server).
// NOTE: In later versions of Source, this value does absolutely nothing for the server.
// fps_max 500

// Min bandwidth rate allowed on server.
// 0 == unlimited.
// NOTE: Setting this to 0, especially if sv_maxrate is set to 0 or lower in value than sv_minrate, 
// can sometimes cause issues for players as this cvar will adjust player rates on the server based on this value. 
// You do not want that! Use a moderate value here and adjust as needed.
sv_minrate 13000

// Max bandwidth rate allowed on the server.
// 0 == unlimited.
// NOTE: The maximum rate is 30000, even when set to 0.
sv_maxrate 0

// Maximum updates per second that the server will allow.
sv_maxupdaterate 67

// Minimum updates per second the server will allow.
sv_minupdaterate 30

// Sets the maximum amount of command packets sent to the server per second.
sv_maxcmdrate 67

// Sets the minimum amount of command packets sent to the server per second.
sv_mincmdrate 30

// This is the maximum rate that all packets are split.
// Valve default is 15000.
// NOTE: This should be set the same as sv_maxrate, in most cases. The theory is, at least for Source servers, 
// packets should be split as fast as you send/receive them. Information about this cvar is rather limited. 
// If sv_maxrate is set to 0 (unlimited), set this to 100000 and adjust from there.
net_splitpacket_maxrate 100000

// Time (seconds) between decal sprays.
decalfrequency 30

// The amount of decals that can show up all at once. Increasing this allows more at the expense of performance
// Default: 200
mp_decals 200

// Basic client settings to help offset some lag for users
// Should help with some lag and its also default on NFO servers
sv_client_cmdrate_difference 1
sv_client_predict 1
sv_client_interpolate 1
sv_client_min_interp_ratio -1
sv_client_max_interp_ratio -1

//---------------------------------------//
//----- END BANDWIDTH RATE SETTINGS -----//
//---------------------------------------//






//-----------------------------------//
//----- START DOWNLOAD SETTINGS -----//
//-----------------------------------//

// Allow clients to upload customization files.
// 0 = off.
// 1 = on.
sv_allowupload 0

// Allow clients to download files.
// 0 = off.
// 1 = on.
sv_allowdownload 0

// Set the download url for the hosted maps. This is much faster and more
// efficient than letting the client download from the server.
sv_downloadurl ""

// Maximum file size allowed for downloading, in megabytes.
// The Limit is 64MB.
net_maxfilesize 64

//---------------------------------//
//----- END DOWNLOAD SETTINGS -----//
//---------------------------------//






//--------------------------------------//
//----- START ROUND AND GAME TIMES -----//
//--------------------------------------//

// If non-zero, the current round will restart in the specified number of seconds.
mp_restartround 0

// Map timelimit
mp_timelimit 30

//------------------------------------//
//----- END ROUND AND GAME TIMES -----//
//------------------------------------//






//-------------------------------//
//----- START CLIENT CVARS  -----//
//-------------------------------//

// Toggles friendly fire.
mp_friendlyfire 0

// Toggles footstep sounds.
mp_footsteps 1

// Toggles game cheats.
sv_cheats 0

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

//-----------------------------//
//----- END CLIENT CVARS  -----//
//-----------------------------//






//--------------------------------//
//----- START COMMUNICATIONS -----//
//--------------------------------//

// Enable voice communications.
// 0 = off.
// 1 = on.
sv_voiceenable 1

// Enables the ability to allow players on both teams hear each other.
// 0 = disabled.
// 1 = enabled.
sv_alltalk 0

//------------------------------//
//----- END COMMUNICATIONS -----//
//------------------------------//






//----------------------------------------//
//-----      START MISCELLANEOUS     -----//
//----------------------------------------//
// Queries and packets. Change/update values as needed.
sv_parallel_packentities 0
sv_parallel_sendsnapshot 0
net_queued_packet_thread 1

// The mapcycle file our server needs to be looking at.
mapcyclefile mapcycle.txt

// Maximum ragdolls to display on the server. Aka: Corpses!!
sv_maxragdolls 3

// Block bunnyhopping on the server.
// 0 = unblocked
// 1 = blocked
sv_bunnyhopblock 1

//----------------------------------------//
//-----    END MISCELLANEOUS/MODS    -----//
//----------------------------------------//