{"id":29,"date":"2014-05-08T20:00:38","date_gmt":"2014-05-08T20:00:38","guid":{"rendered":"http:\/\/char68.net\/blog\/?p=29"},"modified":"2020-08-28T15:16:12","modified_gmt":"2020-08-28T15:16:12","slug":"code-running-a-cs-go-server","status":"publish","type":"post","link":"https:\/\/char68.net\/blog\/code-running-a-cs-go-server\/","title":{"rendered":"Code: Running a CS: GO Server"},"content":{"rendered":"<p>Running a Counter-Strike: Global Offensive server has been streamlined to the point that the most technically difficult part of the process is enabling port-forwarding on your router. Technically, you could even run your server without the use of port forwarding, but then only the computers on your subnet will be able to reach it (and it won&#8217;t be navigable via the in-game server browser). So, if you&#8217;d like to run your own server online just follow these steps:<\/p>\n<p>1) Check out the sections &#8220;Downloading the CS:GO Dedicated server&#8221; and &#8220;Starting the Server&#8221; at\u00a0<a href=\"https:\/\/developer.valvesoftware.com\/wiki\/Counter-Strike:_Global_Offensive_Dedicated_Servers\">Valve&#8217;s CS: GO Server article<\/a>. These two sections show how after one download and\u00a04 lines of typing on the command prompt you can have a local server up and running.<\/p>\n<div id=\"attachment_34\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/DownloadGoServer.png\"><img aria-describedby=\"caption-attachment-34\" loading=\"lazy\" class=\"size-medium wp-image-34\" src=\"http:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/DownloadGoServer-300x157.png\" alt=\"Downloading the CS: GO Server files\" width=\"300\" height=\"157\" srcset=\"https:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/DownloadGoServer-300x157.png 300w, https:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/DownloadGoServer-1024x538.png 1024w, https:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/DownloadGoServer-816x429.png 816w, https:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/DownloadGoServer.png 1875w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-34\" class=\"wp-caption-text\">Downloading the CS: GO Server files<\/p><\/div>\n<p>2) In order for your local server to show up in the server browser for other players you&#8217;ll have to be sure your server&#8217;s port (defaults to 27015) is reachable via your public IP address. If your server is connected directly to your modem you can skip this step completely, though most users are behind a router. In order to make port 27015 from your computer available to the public you&#8217;ll have to enable port-forwarding on your router. An image of a port-forwarding page on a Linksys router is below, for more information on how to port-forward for your specific router Google is your ally.<\/p>\n<div id=\"attachment_31\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/linksys-port-forwarding.jpg\"><img aria-describedby=\"caption-attachment-31\" loading=\"lazy\" class=\"size-medium wp-image-31\" src=\"http:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/linksys-port-forwarding-300x265.jpg\" alt=\"Linksys port-forwarding. In the case of CS: GO server port 27015 set the start and end values both to 27015, leave &quot;Protocol&quot; as both, and set the IP Address as your computer's IP. Image courtesy of z2software.com.\" width=\"300\" height=\"265\" srcset=\"https:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/linksys-port-forwarding-300x265.jpg 300w, https:\/\/char68.net\/blog\/wp-content\/uploads\/2014\/05\/linksys-port-forwarding.jpg 700w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-31\" class=\"wp-caption-text\">Linksys port-forwarding. In the case of CS: GO set the start and end values both to 27015, leave &#8220;Protocol&#8221; as both, and set the IP Address as your computer&#8217;s IP. Image courtesy of z2software.com.<\/p><\/div>\n<p>3) That&#8217;s it! Seriously, if port forwarding worked successfully and you were able to start up your server using step 1 then your server is online and can be found using the server browser in game. Once you feel comfortable running your server you should check out the &#8220;Advanced Configuration&#8221; section of the link in step 1 for info about switching up levels, bots, and more. For more information about bandwidth requirements (likely to be the biggest constraining factor on your server), check out <a href=\"http:\/\/whisper.ausgamers.com\/wiki\/index.php\/Tickrate\">Whisper&#8217;s tickrate article<\/a>, more specifically the section on bandwidth calculation.<\/p>\n<p>&nbsp;<\/p>\n<p><b>Below are a few changes I make to the standard server configuration:<\/b><\/p>\n<p>-maxplayers_override 18 \/\/include this on the srcds command line to start the server. This is the only way to switch the max number of players (switch to any number you want obviously, 18 is my server&#8217;s max)<\/p>\n<p>&nbsp;<\/p>\n<p>In autoexec.cfg:<\/p>\n<p>log on \/\/This is set to turn on logging! Don&#8217;t put this in your server.cfg<\/p>\n<p>&nbsp;<\/p>\n<p>In server.cfg<\/p>\n<p>hostname &#8220;MyServer!&#8221; \u00a0\/\/This is the name that will appear in the browser list<\/p>\n<p>rcon_password &#8220;serverPassword&#8221; \u00a0\/\/This is the remote connection password, set it to a unique value only you know otherwise players can modify your server values!!<\/p>\n<p>sv_password &#8220;&#8221; \/\/Only set this if you intend to have a private server!<\/p>\n<p>mp_freezetime 5 \/\/The amount of time players are frozen to buy items<\/p>\n<p>mp_join_grace_time 15 \/\/The amount of time players can join teams after a round has started<\/p>\n<p>mp_match_end_restart 0 \/\/ Defines whether a map should be restarted after a game has ended<\/p>\n<p>sv_cheats 0 \/\/This should always be set, so you know it&#8217;s not on<\/p>\n<p>sv_lan 0 \/\/This should always be set, so you know it&#8217;s not on<\/p>\n<p>\/\/**The bot commands below are mostly default with the exception of<\/p>\n<p>bot_difficulty 3<\/p>\n<p>bot_chatter &#8220;off&#8221;<\/p>\n<p>bot_join_after_player 0<\/p>\n<p>bot_quota 10<\/p>\n<p>bot_quota_mode &#8220;fill&#8221;<\/p>\n<p>\/\/**The following commands manage kicks and bans<\/p>\n<p>exec banned_user.cfg<\/p>\n<p>exec banned_ip.cfg<\/p>\n<p>writeid<\/p>\n<p>writeip<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running a Counter-Strike: Global Offensive server has been streamlined to the point that the most technically difficult part of the process is enabling port-forwarding on your router. Technically, you could even run your server without the use of port forwarding, but then only the computers on your subnet will be able to reach it (and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[10,8,11],"_links":{"self":[{"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/posts\/29"}],"collection":[{"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":15,"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":47,"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions\/47"}],"wp:attachment":[{"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/char68.net\/blog\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}