Fistful of Frags

Fistful of Frags

43 ratings
Building a "dedicated" game-server, using Ubuntu (12.04 LTS), circa 2014
By [WL] Weasel (Probably AFK)
OBSOLETE:
!!! Do NOT use !!! See the NEW system (and guide) instead!!!!



Note: Portions of this guide are still very-much "under-construction"!

This guide will attempt to describe how to build a "dedicated" game-server using Ubuntu[en.wikipedia.org] - which may then be used to support several different games. Although the screen-captures included in this guide are from an installation of Ubuntu within a VMware Player[en.wikipedia.org] virtual machine, most of the guide is not specific to VMware; and could easily be applicable to installing Ubuntu onto other virtualization platforms - or directly onto computer hardware.

This guide essentially starts from the perspective of either:
  • I have an Ubuntu Server 12.04 DVD (or ISO image) and some hardware, now what?
  • I have an Ubuntu Server 12.04 DVD (or ISO image) and VMware Player, now what?
  • I have a rental VPS running Ubuntu Server 12.04, now what?

Relevance of various sections of this guide:

Anyone that may be using a rental "Virtual Private Server[en.wikipedia.org]" (VPS) from an Internet hosting provider (who obviously has already performed some basic installation of Ubuntu), may skip the following sections:
  • 5 - Creating the virtual machine
  • 6 - Installing Ubuntu
  • 6(b) - Installing Ubuntu (continued)
  • 7 - Installing VMware Tools
Anyone building their own server (including installing Ubuntu themselves), but not using VMware Player, may skip these sections:
  • 5 - Creating the virtual machine
  • 7 - Installing VMware Tools
Anyone installing Ubuntu onto some other virtualization platform, should still review those sections - to determine what equivalent actions may be required for the particular virtualization platform they are using.

In any of those cases above, be sure not to skip the section entitled "8 - Preparing Ubuntu for games". It contains steps for ensuring all the various prerequisites and utilities are installed - which are critical to later sections of this guide.

Links to external web-pages and stuff:

Where practical, this guide will provide links to Wikipedia[en.wikipedia.org] - for definitions of various terms, or information about various products or technologies. Some links to third-party web-pages (i.e. where to download or otherwise acquire various resources) may also be included - as deemed relevant.

Shameless self-promotion:

Whenever you see my stuff anywhere on Steam or YouTube, please rate it up!
   
Award
Favorite
Favorited
Unfavorite
1 - Assumptions & thinking
The big assumption!

Each section of this guide, makes the assumption that you have followed the prior sections. In particular, it is assumed that you have used the example ports and file-paths specified in earlier sections. If you stray from the examples, be sure to adapt later sections - using the values that were actually selected - instead of the example values.

Why Ubuntu?

Ubuntu[en.wikipedia.org] will generally work "right out of the box" (as the saying somewhat inaccurately goes). This is because it is the Linux flavor that Valve[en.wikipedia.org] has targeted for releases of its games on Linux. Other flavors of Linux may certainly be used. However, they may require additional work-arounds or special library upgrades.

This is not a "dis" against any other flavor of Linux. The author currently uses Debian[en.wikipedia.org] for his dedicated game-servers, and has previously used CentOS[en.wikipedia.org] and RHEL[en.wikipedia.org]. However, this guide presumes the reader may only have very limited Linux experience. So, picking the "easiest" solution for this guide was an important consideration. Hence, Ubuntu.

That being said, the specific version of Ubuntu selected for this guide is 12.04.04 "LTS". "LTS" is a Ubuntu[/url] designation for "long-term support". Version 12.04 is the minimum "LTS" release that includes version 2.15 (or higher) of "GLIBC" - a code-library critical to the latest version of Valve's Source[en.wikipedia.org] game-engine.

Recently, there is a newer "LTS" release of Ubuntu - version 14.04 "LTS". However, this guide uses version 12.04 - in large part because most Internet hosting providers (who rent Virtual Private Servers[en.wikipedia.org]) are still only offering the older version of "LTS". Over time, that will likely change. However, as of the creation-date of this guide, most still only offer 12.04 - not 14.04.

Where to get Ubuntu?

The server version of Ubuntu may be downloaded from their server releases[www.ubuntu.com] web-page. To find a specific version, refer to their previous releases[releases.ubuntu.com] page. As previously mentioned, version 12.04.04 was used during the creation of this guide. That specific version may be downloaded from this page[releases.ubuntu.com]. In particular, below are download links for ISO-format[en.wikipedia.org] images of the installation disks:

VMware Player?

VMware Player[en.wikipedia.org] was used during the creation of this guide - party because it allowed the installation of Ubuntu without replacing the existing operating system of the author's computer. This also made it easy to gather screen-captures - to document various points in the installation and configuration process. Specifically, the free (for non-commercial use) version of VMware Player was used.

Some people may also find it convenient to have a virtual machine[en.wikipedia.org] which they can turn on when they need it, turn off when they do not need it, and copy or move from one physical computer to another as needed.

As mentioned in the description for this guide, there is no requirement to build a "dedicated" game server under VMware Player, or as any form of virtual machine. Ubuntu may be installed directly on physical computer hardware. It was simply convenient during the creation of this guide to use a virtual machine.

Where to get VMware Player?

The free (for non-commercial use) version of VMware Player may be downloaded from here[my.vmware.com].

Additional assumptions:

Stuff used throughout this guide:
  • The Ubuntu operating system "hostname": "game-server"
  • The Ubuntu operating system description: "Game Server"
  • The "logon-name" (aka "user-name", or "user account") for Ubuntu: "game-server"
  • The "game-server" account description/display-name: "Game Server"
  • The "game-server" account password: "n0t.Passw0rd!"
  • The "game-server" account "home-directory": "/home/game-server"
This guide will assume that the intention is to build a game-server which will be capable of hosting several simultaneous games. This will include the planning associated with ensuring each game-server does not conflict with the other, or with game-clients on the same network.

Although the planning will include examples for multiple simultaneous games, not every installation example will be fully-documented. Specifically, dedicated servers for the recently-released Fistful-of-Frags (FoF) will be used as the primary installation example.

The standard examples used throughout the balance of this guide will be:
2 - Planning: System requirements
Recommend minimum system specifications:

Below are the specifications recommended by the Author (of this "guide"). These assume the "server" version of a Ubuntu installation will be used. In other words, the installation will not include any "desktop" or "GUI", and instead will be a stripped-down / minimalist installation - with only a text-mode command-line interface on the console (plus remote "SSH" support).
  • CPU / Processor Architecture: Either 32-bit ("i386" or "x86") or 64-bit ("amd64" or "x86_64") will work just fine. Avoid anything that says "IA64" - which is a less-supported 64-bit architecture. Be aware that all game-related code that runs on the server is 32-bit only. Consequently, if you are running a 64-bit installation, you may need to enable something called "multi-architecture[help.ubuntu.com]" (for Ubuntu or newer Debian releases) or load "32-bit libraries" (for older releases, or other Linux flavors).
  • CPU / Processor (Specs): At least 2 "cores" or hyperthreads or virtual-CPU's. Speed (in GHz) will not be as important as the ability of the server to multi-task various operations - servicing hosted game(s) simultaneously with all operating system and utility processes. If you are planning to host multiple games simultaneously on the same server, a very general (and admittedly somewhat overkill) rule-of-thumb is:
    • 1-core: For lousy game-servers, that are only occasionally in use for hosting small private matches.
    • 2-cores: Good single-game dedicated full-time game-server. Generally also be tolerable for hosting 2 simultaneous games.
    • 4-cores: Good for hosting at least 4 simultaneous games.
    • 6-cores: Good for hosting at least 6 simultaneous games.
    • 8-cores: Good for hosting at least 8 simultaneous games.
  • RAM / Memory: At least 1GB of RAM - more if multiple games will run simultaneously on the same game-server. For each additional game you plan to have simultaneously running, plan to add an additional 384MB , 512MB, 768MB or even 1GB even of RAM. Exactly how much you will need to add, will depend largely on the exact game(s) involved - and how-many simultaneous players ("player slots") will be possible. Some games are heavier on memory utilization than others, and many consume additional memory as the concurrent player-count goes up.
  • Hard Drive / Storage: At least 30GB of drive space - more if multiple games will installed on the same game-server (even if they are not left running simultaneously). The "dedicated server" footprint of some games is relatively light (~1GB), while others can be larger (~8GB). Also, if you later start installing various server-side "modifications" and "custom content" (maps, models/skins, music, etc.), things can grow very quickly. If you are planning to rent a VPS to use as a game-server, I would suggest at least 60GB of storage - unless you are certain your needs will never grow later.
3 - Planning: Network "ports"
Each game-server instance potentially needs up to four unique "UDP ports" to operate properly. In some cases, the game-server will automatically assign port numbers which work properly without being explicitly specified. In other cases, the ports that are automatically chosen may not work properly - due to running multiple game-server instances, or due to having game-servers and game-clients behind the same Internet router/firewall device.

Internet connectivity & "ports":

In order to ensure the incoming game-related traffic from the Internet gets consistently directed to your game-server, there are typically several steps required:
  • Explicitly configure the ports for each game-server instance to use particular assigned values.
  • Ensure the values assigned for each port are both unique, and are outside the normal/default range for game-clients.
  • Ensure the game-server (virtual machine, or physical server) has either a "static" IP address; or if it uses a "dynamic" IP address, ensure that is has a "reservation"- so that it (in effect) never changes. Consequently, you may need to refer to your Internet router's documentation to determine how to setup a "DHCP Reservation" for your game-server.
  • Configure "port-forwarding[portforward.com]" on your Internet router to send all incoming traffic for those explicitly configured ports to your game-server's IP address. This guide will not attempt to describe how to configure port-forwarding[portforward.com] for any particular router - due to the wide variety of router models in existence. This guide will only describe what ports should be forwarded - not how to accomplish that forwarding. See the web-site http://portforward.com if you need assistance configuring port-forwarding for your Internet router.
Note: If you are renting a Virtual Private Server[en.wikipedia.org] (VPS) from an Internet hosting provider, you still need to ensure that all the ports you assign for each game-server instance are unique. However, you likely will not have to contend with "port-forwarding" - since your VPS will likely have it's own directly-applied public "registered" Internet IP address - instead of the "address-translation[en.wikipedia.org]" technology typically involved in residential or small-business locations.

Port-related settings for Source / HL2-based games:

Some examples of games using the Source Engine[en.wikipedia.org]:
  • Fistful of Frags (FoF)
  • Team Fortress 2 (TF2)
  • Counter-Strike:Global Offense (CS:GO)
  • Counter-Strike:Source
  • Half-Life 2 Multiplayer (HL2MP)
List of port-related settings (CVAR's) for games based-on the Source Engine[en.wikipedia.org] (sometimes referred to as the "HL2" engine):
  • +port (command-line) or port (autoexec.cfg) = Port that game-clients use to talk to the game-server. These should be explicitly configured, and may also need to be "port-forwarded" at your Internet router/firewall.
  • -steamport (command-line) or steamport (autoexec.cfg) = Port that various Valve-hosted "Steam" stuff uses to communicate with game-servers. These should be explicitly configured, and may also need to be "port-forwarded" at your Internet router/firewall.
  • +clientport (command-line) or clientport (autoexec.cfg) = Port that game-servers use to talk to various Valve-hosted "Steam" stuff.
  • +tv_port (command-line) or tv_port (autoexec.cfg) = "SourceTV" mass-spectator port. I generally recommend disabling "SourceTV" (using the -nohltv option), unless you know what you are doing. If so, you may need to explicitly configure this port.

Port-related settings for GoldSrc / HL1-based games:

Some examples of games using the GoldSrc Engine[en.wikipedia.org]:
  • Counter-Strike (the original)
  • Team Fortress Classic (TFC)
  • Deathmatch Classic (DMC)
  • Half-Life Multiplayer (HL1)
List of port-related settings (CVAR's) for games based-on the older GoldSrc Engine[en.wikipedia.org] (sometimes referred to as the "HL1" engine):
  • +port (command-line) or port (autoexec.cfg) = Port that game-clients use to talk to the game-server. These should be explicitly configured, and may need to be "port-forwarded".
  • -sport (command-line) or sport (autoexec.cfg) = Port that various Valve-hosted "Steam" stuff uses to communicate with game-servers. These should be explicitly configured, and may also need to be "port-forwarded" at your Internet router/firewall.
  • +clientport (command-line) or clientport (autoexec.cfg) = Port that game-servers use to talk to various Valve-hosted "Steam" stuff.
  • +tv_port (command-line) or tv_port (autoexec.cfg) = "SourceTV" mass-spectator port. I generally recommend disabling "SourceTV" (using the -nohltv option), unless you know what you are doing. If so, you may need to explicitly configure this port.

Sample port-assignment strategy:

Note: Due to a "feature" of how the Steam-related ports are utilized (which mysteriously adds 1 to whatever port is specified), it is recommended to only use "every-other ports" - or to put it another way, i.e. only even-number or only odd-number ports.

A simple port-assignment strategy is to assign ports in ranges - and within that range categorized by what purpose that port is assigned. This will simplify any later "port-forwarding[portforward.com]" that may be required.

For example "port-forwarding[portforward.com]" could be easily handled with the range of UDP ports 6000-6299, using the following plan:
  • Game client-server ports (+port): 6001 to 6099
  • Steam ports (-steamport or -sport): 6101 to 6199
  • Game-server "client" port (+clientport): 6201 to 6299
  • SourceTV / HLTV = disabled entirely (using the -nohltv option)
That strategy results in a port-assignment list, such as this:
Game Steam Client Game Server ---- ----- ------ ----------- 6001 6101 6201 Fistful-of-Frags (1 of 2) 6003 6103 6203 Fistful-of-Frags (2 of 2) 6005 6105 6205 Team Fortress 2 6007 6107 6207 Counter-Strike:Source
The port-assignment strategy described above will be used in all subsequent examples.

Of course, you can make-up your own strategy - as long as you keep track of each of the ports you are assigning for each game-server instance you will be running.

If you will only be running one game-server instance for one game - you probably will not have much trouble.

However, if you will be running multiple game-server instances (multiple servers of the same game, or multiple different games - or a combination of those) - you had better have a strategy and keep track of what is assigned.
4 - Planning: Folders / Paths
There will be several different components which will need a designated place to be installed, or store their related contents or use as a working-area.

Cautionary Notes:
  • The terms "folder" and "path" used effectively interchangeably throughout this guide.
  • Remember that the file-system under Ubuntu (unlike Windows) is case-sensitive!
  • Whenever possible, name all files entirely in lower-case!
  • Whenever possible, name all folders entirely in lower-case!
  • Remember that multiple files may exist with the same spelling - but [/b]different case![/b]
  • For example: "modt.txt", "MOTD.txt" and "MOTD.TXT" will be treated as three different files!
  • This guide assumes you are installing and running all game-related stuff under the "game-server" logon created during the sample installation instructions included in this guide.
  • Never, never, never run games (or much of anything else) under the built-in "root" logon!

Regarding the "~" character:
Under Ubuntu, the tilde "~" character (when used in specifying file paths/folders) is an alias for the "home-directory" of the currently-logged-on user. For example, while logged-on as the "game-server" user:
  • "~" = "/home/game-server"
  • "~/" = "/home/game-server/"
  • "~/steamcmd" = "/home/game-server/steamcmd"
  • "~/scripts" = "/home/game-server/scripts"
Consequently, you may see "~" used in various command-line examples, or sample scripts throughout the rest of this guide. However, do not confuse the use of "~" in file paths on the server, with the in-game usage of it - where it is generally used to open or close the "developer console" in various game-clients.

Special folders:
  • As mentioned above, the "home-directory" of the user-account that all the game-related stuff will be installed by and later operating under is critical. Assuming the example "game-server" logon is being used, the "home-directory" folder would be "/home/game-server". Going-forward most of the work being done to build the game-server will involve files stored somewhere inside this "home-directory" ("/home/game-server").
  • The Valve-provided "SteamCMD" utility, will be installed into the "steamcmd" sub-folder of the home-directory (effectively "/home/game-server/steamcmd").
  • A sub-folder of the "home-directory" will be used for various maintenance and utility scripts that will be detailed later in this guide. That folder will be: /home/game-server/scripts"

Per-game "Installation" folders:
Each game-server instance will be installed into its own sub-folder of the "home-directory". Each game-server installation folder will be named for what type game-server it contains, and a number (to allow for multiple installations of the same game). Based on our standard examples, these will be:
  • 1 of 2 copies of Fistful-of-Frags (FoF) = "/home/game-server/fof-1"
  • 2 of 2 copies of Fistful-of-Frags (FoF) = "/home/game-server/fof-2"
  • 1 copy of Team Fortress 2 (TF2) = "/home/game-server/tf2-1"
  • 1 copy of Counter-Strike:Source (CSS) = "/home/game-server/css-1"

Summing-up the folder strategy:

Using the folder-assignment strategy detailed above, results in a folder structure like this:
Folder Usage -------------------------- ---------------------------------------------- /home/game-server home-directory of the "game-server" logon /home/game-server/steamcmd Location of the "SteamCMD" utility /home/game-server/Steam Created by "SteamCMD" utility (do NOT delete!) /home/game-server/fof-1 Fistful-of-Frags (1 of 2) /home/game-server/fof-2 Fistful-of-Frags (2 of 2) /home/game-server/tf2-1 Team Fortress 2 /home/game-server/css-1 Counter-Strike:Source /home/game-server/scripts Various scripts for managing the game-servers

Combining the per-game "folder" assignments from above, with the per-game "ports" assignments from the previous section:
Game Steam Client Game Server Path Game Server ---- ----- ------ ----------------------- ------------------------- 6001 6101 6201 /home/game-server/fof-1 Fistful-of-Frags (1 of 2) 6003 6103 6203 /home/game-server/fof-2 Fistful-of-Frags (2 of 2) 6005 6105 6205 /home/game-server/tf2-1 Team Fortress 2 6007 6107 6207 /home/game-server/css-1 Counter-Strike:Source


5 - Creating the virtual machine
This section covers creation of an empty virtual machine[en.wikipedia.org], to install Ubuntu into for the purposes of building the "dedicated" game-server. The "free" (for non-commercial use) version of VMware Player (available here[my.vmware.com]) was used during the creation of this guide. However, any virtualization platform will probably have equivalent steps.

Note: If you are renting access to a Virtual Private Server[en.wikipedia.org] (VPS) that already has Ubuntu installed, you should be able to skip this section entirely. Likewise if you will be installing Ubuntu directly onto computer hardware. However, if you are installing into some other virtualization platform (instead of VMware Player), you should probably review this section to determine what equivalent steps may be required on your chosen virtualization platform.

Upon opening VMware Player, click on the option to "Create a New Virtual Machine".



On the first page of the "New Virtual Machine Wizard" screen, select the option "I will install the operating system later", and then click the "Next" to proceed.



Select "Linux" from the "Guest operating system" list, select "Ubuntu" from the "Version" drop-down list, and then press the "Next" button to proceed.



Enter a hostname for your server. This is not the "hostname" that appears in-game on the game-servers list. This is your computer's "DNS Hostname". This a unique identifier for this computer on your network. Ideally, choose are short name (<12 characters), containing combinations of only these types of characters:
  • Lower-case letters "a" through "z"
  • Numerals "0" through "9"
  • A hyphen "-"
Under "Location" is the location on your computer's hard drive where the virtual machine will be created. The default is probably "C:\Virtual Machines". You may use the "Browse" button to change this path as desired. Then, press the "Next" button to proceed.



Adjust the value of "Maximum disk size" as needed. Regarding the option of using single or multiple files to store the virtual disk, if unsure select "Split virtual disk into multiple files". Then, press the "Next" button to proceed.



Click the "Customize Hardware" button, to access additional screens that will need to be properly configured.



Click "Memory" in the list on the left-side of the panel, and then adjust the memory size as needed (1024MB / 1GB) in the example.


Click "Processor" in the list on the left-side of the panel, and then adjust the number of virtual processors/cores on the host that this virtual machine will have access to.



Click "CD/DVD" in the list on the left-side of the panel, and ensure that the "Connect at power on" option is enabled/checked. Ensure the "Use ISO image file" option is selected, and then use the "Browse" button to select the ISO image for the Ubuntu installation disk that you (presumably) already downloaded.



Click "Network Adapter" in the list on the left-side of the panel, and ensure that the "Connect at power on" option is enabled/checked. Ensure that the "Network connection" option is set to "Bridged".



Feel free to click "USB Controller", "Sound", Printer" and/or "Screen" sections as well. However, they will likely have little or no consequence to your installation. Click the "Close" button to return to the "New Virtual Machine Wizard" screen.



Click the "Finish" button on the "New Virtual Machine Wizard" screen - to save the virtual machine configuration.



At this point, you have a blank virtual machine. This is equivelant to having computer hardware physically assembled - and ready for an operating system install.


6 - Installing Ubuntu
If you are installing Ubuntu directly onto physical computer hardware, just put the "Ubuntu Server" installation disc into your CD/DVD drive, and turn on the computer.

If you are continuing the from the previous sections of this guide using VMware Player, the ISO file you specified (which was explicitly set to "Connect at power on") will in-effect already be "in" the virtual CD/DVD drive. Consequently, for VMware Player you should be able to just click the Play button or double-click the virtual machine in VMware Player.

Once the virtual machine is running, you must click (with your mouse) inside the virtual machine window - to send your keystrokes to whatever is going-on inside that virtual machine. To get back out of the virtual machine, you may tap CTRL+ALT keys - which will return control of the keyboard to Windows. That is a VMware Player feature / function - nothing specific to Ubuntu.

Note: Since this is a Ubuntu "server" install, there will be no "GUI" (or likely any mouse-driven menus) during the installation process. Generally, the following keys are used:
  • The Arrow / Directional keys (Up, Down, Left & Right) generally move up and down various lists - and sometimes from one item on a screen to another.
  • The Tab key generally moves between different areas on the screen.
  • The Enter or Return key generally accepts whatever is selected on-screen - and typically advances to the next screen.
  • The Esc key generally cancels a screen, or backs-out of a selection.
The Ubuntu installer will flash through a number of start-up screens, and then stop to prompt for language selections. This first language prompt is to let the installer know what language to use during the installation process itself. Highlight the desired language (by moving around the list with the Up / Down arrow keys), and press Enter to select the language and continue the installation process.



The next screen will prompt for what type of installation task you would like to perform. Select "Install Ubuntu Server" from the list, and press Enter to select that task and continue the installation process.



The Ubuntu installer may flash through a few more screens, and then stop to prompt for language selections (again). This second language prompt is to let the installer know what language to continue the installation process with - and make the default language for Ubuntu when the installation process is completed. Highlight the desired language (by moving around the list with the Up / Down arrow keys), and press Enter to select the language and continue the installation process.



The next screen will prompt for your location (Country). Select the appropriate location from the list, and press Enter to continue the installation process.



You may then be prompted about detecting the "keyboard layout". I suggest you skip past this detection process - and onto selecting the keyboard from a list. To do so, use the Tab key to move the highlighting to the "<No>" option, and press Enter to continue the installation process.



On the next screen, select the locale (Country) of your keyboard from the list provided. Most likely, the selection matching your locale will already be selected on the list. Highlight the proper locale (by moving around the list with the Up / Down arrow keys), and press Enter to select the select the locale and continue the installation process.



On the next screen, select the specific layout of your keyboard from the list provided. Most likely, the selection matching your keyboard layout will already be selected on the list. Highlight the proper locale (by moving around the list with the Up / Down arrow keys), and press Enter to select the select the keyboard layout and continue the installation process.



The Ubuntu installer may flash through a few more screens, and then stop to prompt for a "hostname". This is not the "hostname" that appears in-game on the game-servers list. This is your computer's "DNS Hostname". This a unique identifier for this computer on your network. Ideally, choose are short name (<12 characters), containing combinations of only these types of characters:
  • Lower-case letters "a" through "z"
  • Numerals "0" through "9"
  • A hyphen "-"
Enter the desired "hostname", and press Enter to continue the installation process.



On the next screen, the installer will start asking for details required to create a "user account". First, the installer will prompt you for what name to display, or effectively a description for this new "user account". This can be any descriptive text you care to use. Enter the desired text, and press Enter to continue the installation process.



On the next screen, you will specify the "user-name" (or "logon name") - which you will later to logon to the server (on the physical/virtual console, via SSH/PuTTY[en.wikipedia.org], and later via "webmin[en.wikipedia.org]"). Ideally, choose a short user-name (<12 characters), containing combinations of only these types of characters:
  • Lower-case letters "a" through "z"
  • Numerals "0" through "9"
  • A hyphen "-"
Enter the desired user-name, and press Enter to continue the installation process.



Next the installer will prompt you to select a password that will be used to logon with the "user-name" that was just specified. While entering the password, it will not be shown on-screen. Instead, only asterisks ("*") will be shown on-screen.

Note: While entering the password, it will not be shown on-screen. Instead, only asterisks ("*") will be shown on-screen. Be sure to choose a "strong" password, generally meeting these requirements:
  • At least eight (8) characters - the longer the better.
  • A combination of both UPPER-CASE and lower-case letters.
  • At least one numeral ("0" - "9"),
  • At least one special character (punctuation mark of some kind),
Enter the desired password text, and press Enter to continue the installation process.



In order to ensure your password was entered correctly, the installer will prompt you to re-enter that same exact password again. Enter the same password again, and press Enter to continue the installation process.


6(b) - Installing Ubuntu (Continued)
Next, the installer may ask about encrypting your "home directory". Unless you really know what you are doing (in which case, you probably would not be reading this guide), I suggest that you do not. Instead, use the Tab key as needed to ensure "<No>" is selected, and press Enter to continue the installation process.



Some installation screens may flash by, after which the installer will prompt you about setting-up the computer's clock. Assuming that the installer guessed your time-zone correctly, use the Tab key as needed to ensure "<Yes>" is selected, and press Enter to continue the installation process. If you select "<No>", there may be some additional screens prompting you to provide the correct time-zone. Those screens are not covered in this guide, but feel free to explore them and adjust your time-zone accordingly.



Some installation screens may flash by, after which the installer will prompt you about partitioning your computer's hard disk (or the virtual machine's virtual hard disk as the case may be). Unless you really know what you are doing (in which case, you probably would not be reading this guide), select the option "Guided - use entire disk and set up LVM", and press Enter to continue the installation process.



Next, the installer will prompt you with a warning that this will completely erase the selected disk, and if you have multiple hard drives - allow you to select which disk to erase and install Ubuntu onto. Unless you really know what you are doing (in which case, you probably would not be reading this guide), keep whatever hard-drive is already selected (if more than one), and press Enter to continue the installation process.



Next, the installer will prompt you with a yet-another warning that this will completely erase the entire hard disk . Unless you really know what you are doing (in which case, you probably would not be reading this guide), use the Tab key as needed to ensure "<Yes>" is selected, and press Enter to continue.



Next, the installer will prompt you about how-much of that hard drive to actually utilize - defaulting to all of it. Unless you really know what you are doing (in which case, you probably would not be reading this guide), accept the default value (using the Tab key as needed to ensure "<Continue>" is selected), and press Enter to continue.



Some installation screens may flash by, after which the installer will prompt you about finalizing the changes to your hard disk. Unless you really know what you are doing (in which case, you probably would not be reading this guide), the Tab key as needed to ensure "<Yes>" is selected, and press Enter to continue.



Some installation screens may flash by, after which the installer will inquire if you need to use a "Proxy Server" to access the Internet. This because the installer is preparing to reach-out the Internet to retrieve the latest packages to begin the actual installation of Ubuntu onto your computer. Needing to use a proxy-server to access the Internet is a relatively rare circumstance these days - common only in very locked-down "corporate" environments.

Note: If you need to use a proxy-server to access the Internet from your location, stop, turn-off your computer or virtual-machine, and walk-away. You can not run a dedicated-server from behind a proxy server properly. The author will not provide any assistance in troubleshooting installations with a proxy-server involved - in any way, shape, or form (period).

Assuming you do not need to use a proxy-server to access the Internet, use the Tab key as needed to ensure "<Continue>" is selected, and press Enter to continue.



Some installation screens may flash by, after which the installer with prompt you about automatically installing security updates for Ubuntu. Unless you really know what you are doing (in which case, you probably would not be reading this guide), the Arrow keys as needed to ensure "Install security updates automatically" is selected, and press Enter to continue.



Some installation screens may flash by, after which the installer with prompt you regarding what server-related software packages should be installed. Use the Arrow keys to scroll up and own the list, and the Spacebar to toggle the selection of individual packages - selected/enabled = "[ * ]", not-selected/disabled = "[ ]".

The only software package that you should have selected is "OpenSSH server". Deselect all other software packages, then press Enter to continue.



A number of installation screens will flash by, while the installer retrieves and installs the proper software packages. How long this will take, will depend largely on the speed of your Internet connection and the performance of the computer being used.



Eventually, the installer will stop again - this time to inquire about using "GRUB[en.wikipedia.org]". Unless you really know what you are doing (in which case, you probably would not be reading this guide), use the Tab key as needed to ensure "<Yes>" is selected, and press Enter to continue.



Eventually, the installer will finish. It let you know that you can remove the installation CD/DVD from the optical drive, and wait for confirmation before rebooting. Use the Tab key as needed to ensure "<Continue>" is selected, and press Enter to reboot the computer into Ubuntu Server!








7 - Installing VMware Tools
Note: If you are not using Ubuntu installed inside a VMware Player virtual machine, you may skip this section.

If you have installed Ubuntu into a VMware Player virtual machine, then you need to install a special set of drivers called VMware Tools. There are multiple possible methods available to install VMware Tools onto Ubuntu (as documented here[help.ubuntu.com]). This guide is shows installing VMware Tools initiated from the VMware Player menus.

Lgon to the console of the Ubuntu server you just installed. Ensure the virtual machine is running (generally click the Play button, or double-click the virtual machine). Then, click inside the virtual machine window, and press Enter to get a logon prompt.

Type the user-name ("game-server") that was created earlier, followed-by Enter, then type the password that was selected earlier, and press Enter.



Press CTRL+ALT to get mouse & keyboard control back to Windows. Then click VMware Player's "Player" menu. From that menu, select "Manage, then "Install VMware Tools.



If you have only recently installed VMware Player, or it has not been updated in a while, you may be prompted to download and install the latest version of VMware Tools. If so, click the Download and Install button.



VMware Player will proceed to download and install the latest version of VMware Tools. Once the download and installation is completed, click the "Close" button.





Click inside the virtual machine window again, to enter more commands into Ubuntu. Enter the following commands - each followed by the Enter key (be sure to enter all commands in the exact case they are provided!):
  • mkdir /mnt/cdrom
  • mount -t auto /dev/cdrom /mnt/cdrom
  • ls -lh
That last command ("ls -lh ") list the contents of the virtual CD/DVD disk that contains VMware Tools. Note the exact name of the file ending with ".tar.gz". In this example, the file name is "VMwareTools-9.6.2-1688356.tar.gz". On your installation, the file name could be different (a new version than what was available - compared when this guide was created).

Enter the following commands - each followed by the Enter key (be sure to enter all commands in the exact case they are provided!):
  • cd /tmp
  • tar zxfp /mnt/cdom/VMwareTools-9.6.2-1688356.tar.gz (Note: use the actual file name here!)
  • umount /mnt/cdrom
  • ls -lh
  • cd vmware-tools-distrib/
  • ls -lh
That ls -lh command should show that the contents of the VMware Tools file (VMwareTools-9.6.2-1688356.tar.gz) were extracted successfully the to /tmp/vmware-tools-distrib folder. Inside that folder is the installation script for VMware Tools (vmware-install.pl).

Start the VMware Tools installation script, by using the "./vmware-install.pl" comamnd, folloed of course by Enter.



The VMware Tools installation script will stop several times to prompt for various information. In several cases accepting the default value (by just pressing the Enter key) is sufficient. However, this is not the case with every prompt. Below are the responses that should be used for each prompt:
  1. In which directory do you want to install the binary files? [/usr/bin] <-- Accept default (Enter)
  2. The VMware host-guest ... Do you want to enable this feature? Type No, then Enter
  3. The vmblock enables ... Do you want to enable this feature? Type No, then Enter
  4. Would you like to enable VMware automatic kernel modules? [No] <-- Accept default (Enter)



After the VMware Tools installation script completes, you should reboot the server to ensure all the new drivers are in effect before continuing. Since you are not logged-in as "root", the "sudo" command must be pre-pended to certain system commands. For security reasons, sudo will likely re-prompt you for the game-server account's password. To reboot Ubuntu from the command-prompt, type the "sudo reboot" command - followed by the Enter key. The, if prompted, re-enter the password for the game-server account.

8 - Preparing Ubuntu for games
Readiness Check:
Review the following items before you proceed any further:
  • Ubuntu must already be installed at this point. Either you installed it yourself into a virtual machine, or directly on to computer hardware; or you are renting a Virtual Private Server[en.wikipedia.org] (VPS) that already has Ubuntu installed.
  • Either during the installation process (if you installed Ubuntu yourself) or after that process (if you are renting a VPS), a user-account was created to use other than "root" - which will be used for installing and running the game-servers. Based on previous sections, this section assumes that non-root user-account is named "game-server". If you are using a rental VPS and have not created a non-root user-account yet, stop and create it now - and ensure it has "sudo" privileges.
  • If you are renting a VPS, and have not created a non-root user-account yet, you may use this command (while logged-in as "root") to create such an account:
    adduser game-server
    Of course, followed by Enter - and then follow the prompts to select a password, provide a display-name / description, etc.
  • If you are renting a VPS, and have just now manually created a non-root user-account ("game-server"), it likely will not yet have "sudo" privileges - which will be required to complete many of the "preparation" steps in this section. In that case, the following command may be used to grant "sudo" access:
    sudo adduser game-server sudo
    Of course, followed by Enter.

Logon to Ubuntu:

Login to Ubuntu using either:
  • The console (if installed directly on hardware),
  • The virtual machine in VMware Player (used for example screen-captures), or
  • Using PuTTY[en.wikipedia.org] to connect over SSH (if using a rental VPS).
From this point forward, all commands should be available while logged-in via any of those three methods. Login using the non-root user-account (presumably named "game-server"):



Apply the latest updates for Ubuntu:

To apply the latest updates for Ubuntu, you must first tell the update system ("apt[en.wikipedia.org]") to refresh its list of what updates are available. Enter the following command, followed by Enter:
sudo apt-get update
Note: As a security measure, sudo may prompt you again for the password of the account being used ("game-server")



Now that the list of available updates is known to "apt[en.wikipedia.org]", the latest updates may be downloaded and installed by using the following command, followed by Enter:
sudo apt-get upgrade
Note: As a security measure, sudo may prompt you again for the password of the account being used ("game-server")



Before "apt[en.wikipedia.org]" actually installs the updates on to the server, it will prompt for verification. Type "y" and then Enter to proceed with the installation of the updates:



After the "apt[en.wikipedia.org]" finishes updating the server, you should reboot the server to ensure all new updates are effect before continuing. The server may be rebooted from the command-line by using the following command, followed by Enter:
sudo reboot
Note: As a security measure, sudo may prompt you again for the password of the account being used ("game-server")

8(b) - Preparing Ubuntu (continued)
Installing additional utilities:

Log back into the server again using the non-root user-account ("game-server"):



At this point a number of additional utilities will be be installed. Some of these are absolute prerequisites (to having SteamCMD or the games themselves install or operate correctly), or just prerequisites for later sections of this guide (regarding "webmin[en.wikipedia.org]" for example).

Below is a list of what the specific utilities will be installed:
  • tar[en.wikipedia.org] <-- Actually, must already be installed. However, it never hurts to add it to list anyway.
  • gzip[en.wikipedia.org] <-- Actually, should already be installed. However, it never hurts to add it to list anyway.
  • ncompress[en.wikipedia.org] <-- A commonly-used compression utility, possibly still required by SteamCMD and/or Source[en.wikipedia.org] or GoldSrc[en.wikipedia.org].
  • bzip2[en.wikipedia.org] <-- Another common compression utility, often used for in-line compression of custom-content downloads in Source[en.wikipedia.org].
  • zip & unzip[en.wikipedia.org]<-- Another common compression utility.
  • p7zip (full)[en.wikipedia.org] <--- command-line version of the ultimate compression / archiver tool, used in example scripts.
  • nano[en.wikipedia.org] <-- An easy-to-use "character-mode" text-file editor.
  • elinks[en.wikipedia.org] <-- A "character-mode" web-browser, useful for finding stuff on the Internet and directly downloading it onto the server (when "wget[en.wikipedia.org]" is not enough).
  • screen[en.wikipedia.org] <-- A utility for running processes "disconnected" and being able to re-connect to them later, used extensively in example scripts.
  • webmin[en.wikipedia.org] <-- A web-based management portal, example usage in a later section.

"apt[en.wikipedia.org]" can download and install many of these packages directly from Ubuntu's "official" repositories. Also "apt[en.wikipedia.org]" can download and install many packages at the same time - as part of the same command-line.

First, install the easy stuff, with one big "apt[en.wikipedia.org]" command, followed by Enter:
sudo apt-get install tar gzip ncompress zip unzip bzip2 p7zip-full nano elinks screen
Note: As a security measure, sudo may prompt you again for the password of the account being used ("game-server"). Also, apt[en.wikipedia.org] may prompt for verification before proceeding with the installation. If so, type "y" and then Enter to proceed.



Installation of "webmin":

Next, use one big "apt[en.wikipedia.org]" command (followed by Enter) to install various prerequisites for webmin[en.wikipedia.org]:
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
Note: As a security measure, sudo may prompt you again for the password of the account being used ("game-server"). Also, apt[en.wikipedia.org] may prompt for verification before proceeding with the installation. If so, type "y" and then Enter to proceed.



Once the above prerequisites are installed, webmin[en.wikipedia.org] itself may be downloaded and installed using the following commands (each followed by Enter):
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.680_all.deb sudo dpkg --install webmin_1.680_all.deb
Note: As a security measure, sudo may prompt you again for the password of the account being used ("game-server").



The sections of the guide relevant to webmin[en.wikipedia.org], are still further ahead. However, before you can actually use webmin[en.wikipedia.org], you will need to know the IP address of your server. You can display the IP information for your server, using the "ifconfig" command, followed by Enter.



Installing Valve's "SteamCMD" utility:

Valve's SteamCMD utility is used to download and install "dedicated server" portions of various games that are available on Steam. Not every game available on Steam has a "dedicated server" available. However, most games based on either Source[en.wikipedia.org] or GoldSrc[en.wikipedia.org] typically do have a "dedicated server" component.

Obviously, the SteamCMD utility itself must be installed - before it can be used to install any "dedicated server" components for any games.

Use the following commands (each followed by Enter) to download the SteamCMD installer onto your Ubuntu server:
cd ~ pwd mkdir steamcmd cd ~/steamcmd wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz tar -xvzf steamcmd_linux.tar.gz



Those commands should result in additional files (essentially SteamCMD[/i]) being added to the "~/steamcmd" folder (effectively "/home/game-server" folder). The "ls -lh" command (followed by Enter) may be used to list the contents of that folder.

To install SteamCMD, run the installer script - "./steamcmd.sh". This will essentially result in SteamCMD updating itself to the most current version - and then opening it's own "Steam>" command-prompt.



With the "Steam>" command-prompt, enter these commands (followed by Enter) to logon once to the Steam content system ("SteamPipe") - just to ensure communication is working properly, and then exit SteamCMD:
login anonymous quit

9 - Editing files (with "nano" & "webmin")
!!! This section is still UNDER-CONSTRUCTION !!!

One of the most critical tasks related to configuring dedicated game-servers, is being able to edit the contents of many different files. Although these files may be in different locations, and have different file-name extensions (.txt, .ini, .cfg, etc.) - they are generally all plain-text.

In addition, the creation of various utility scripts also obviously necessitates access to some form of text editor.

This section will briefly cover two things:
  • Editing files from the command-line (either on the "console" or remotely connected via PuTTY[en.wikipedia.org]/SSH) - using the character-mode text-editor named "nano[en.wikipedia.org]" (which was installed during a previous section of this guide).
  • Managing and editing file from a web-browser - using the "webmin[en.wikipedia.org]".

Editing files with "nano":
















Editing files with "webmin":































10 - Installing dedicated servers for games
Regarding Valve's SteamCMD utility:

The SteamCMD utility is used to install "dedicated servers" for various games that are available on the Steam distribution platform. However, not every game has a stand-alone "dedicated server" component available. Also, not every game that has a stand-alone "dedicated server" component available - offers it for free. In some cases, a copy of the (non-free) game must be purchased - in order to host a "dedicated server" for it.

Certain commands within the SteamCMD utility's "Steam>" prompt require you to logon with a Steam account. Typically, these are commands that are used to download, install or verify game-related content (which is generally subject to various copyright or licensing terms). The two cases generally are:
  • If a game distributed on Steam offers a "dedicated server" component, and it offers that component for free, then the generic "anonymous" logon is used. Both Fistful of Frags (FoF) and Team Fortress 2 (TF2) are examples of that situation.
  • If a game distributed on Steam offers a "dedicated server" component, but it does not offer that component for free, then you must logon within SteamCMD with a "real" Steam logon (like you would on a client to play that game). In this case, the Steam logon used must "own" that particular game. Counter-Strike (the original) is an example of that situation.

Got an "AppID" for that?

All games available through Steam are assigned one or more unique ""AppID's". You must know the "AppID" of a game, in order to install a "dedicated server" for it using SteamCMD. Generally, a game will have separate "AppID's" for the game-client, and game-server (if available at all). Some examples of this include:
AppID-Client AppID-Server Game ------------ ------------ ----------------------------- 265630 295230 Fistful of Frags (FoF) 440 232250 Team Fortress 2 (TF2) 240 232330 Counter-Strike: Source (CS:S)
Generally, in cases where the game-client is not free, typically whatever Steam account has purchased / licensed that game-client is automatically granted access to the equivalent game-server component - even though the "AppID's" are different. In some cases, even if the game-client is not free, the publisher will allow installation and usage of dedicated servers without having to link it to a licensed Steam account. Counter-Strike:Source is an example of a game-client that is purchased/non-free, while it's game-server is free - and is installed using the "anonymous" Steam logon.

Where does all this stuff go?

Another key piece of information that you will need for each installation, is where SteamCMD should install it - meaning, in what folder / path.

You may remember, that was part of the initial planning, detailed in earlier sections of this guide:
Game Server Path
Game Server
/home/game-server/game-fof-1
Fistful-of-Frags (1 of 2)
/home/game-server/game-fof-2
Fistful-of-Frags (2 of 2)
/home/game-server/game-tf2-1
Team Fortress 2
/home/game-server/game-css-1
Counter-Strike:Source

Putting it all together, and installing a "dedicated server" for a game:

To review the pieces of information you need are:
  • The What: "AppID" for the "dedicated server" component of the game involved.
  • The Where: folder / path to install that game's "dedicated server" into.
  • The Who: Steam logon ID to use (and if not "anonymous" what password goes with it!)
The Valve's web-page regarding SteamCMD describes the command involved in using those pieces of information to perform an install. However, all of that can be boiled-down to two potential commands:
  • If an "anonymous" login may be used to install a particular game:
    cd ~/steamcmd;~/steamcmd/steamcmd.sh +login anonymous +force_install_dir {install-folder-here} +app_update {appid-here} validate +quit;
  • if a "real" Steam ID must be used to install a particular game:
    cd ~/steamcmd;~/steamcmd/steamcmd.sh +login {real-steam-id-here} {steam-id's-password-here} +force_install_dir {install-folder-here} +app_update {appid-here} validate +quit;
Obviously, the stuff in braces ("{" and "}") needs to be replaced with actual values. Also be sure not to include the braces ("{" and "}" themselves in the command-line!
11 - Installing EXAMPLE servers
Installing the standard examples:

Combining our standard examples (established in previous sections of this guide), with the information regarding AppID's - yields this table of information:
Folder AppID SteamID Game-Server -------------------------- ------ --------- ------------------------- /home/game-server/fof-1 295230 anonymous Fistful-of-Frags (1 of 2) /home/game-server/fof-2 295230 anonymous Fistful-of-Frags (2 of 2) /home/game-server/tf2-1 232250 anonymous Team Fortress 2 /home/game-server/css-1 232330 anonymous Counter-Strike:Source

You may create the installation folders for each of those, with the following commands:
mkdir fof-1 mkdir fof-2 mkdir tf2-1 mkdir css-1

Note: The "pwd" command shows the currently "working directory"). This whatever folder anything you do will be performed - such as create a sub-folder (as we are doing above) or edit a file with "nano[en.wikipedia.org]", etc.



Once those folders are created, you may also use the Refresh button in webmin's "File Manager" to update it's display - now showing those four new folders that were just created:



A matter of space & time:

How long each installation command will take to complete, will depending largely upon:
  • The bandwidth of your Internet connection.
  • The size of the particular game-server(a) involved (sizes vary greatly).
Just for reference, as of the creation of this guide, below are the approximately sizes of each of the "standard examples":
  • Fistful-of-Frags (FoF) server - first copy: Just over 1-GB.
  • Fistful-of-Frags (FoF) server - second copy: Just over 1-GB.
  • Team Fortress 2 (TF2) server: Just under 5-GB.
  • Counter-Strike (CS:S) server: Just over 2-GB.
  • Total for all of the above servers: Approximately 10-GB (without any "custom" content)

Can we just do it already?

The commands that follow may be used to install each of our "standard examples". Notice the differences in AppID and/or installation folder for each.
  • For the 1st of 2 Fistful-of-Frags (FoF) servers:
    cd ~/steamcmd;~/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/game-server/fof-1 +app_update 295230 validate +quit;
  • For the 2nd of 2 Fistful-of-Frags (FoF) servers:
    cd ~/steamcmd;~/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/game-server/fof-2 +app_update 295230 validate +quit;
  • For the (only) Team Fortress 2 (TF2) server:
    cd ~/steamcmd;~/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/game-server/tf2-1 +app_update 232250 validate +quit;
  • For the (only) Counter-Strike (CS:S) server:
    cd ~/steamcmd;~/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/game-server/css-1 +app_update 232330 validate +quit;

How to tell what and how-much got installed:

The following commands may be used to determine how-much content was downloaded for each game's "dedicated server" installation:
cd ~ pwd ls -lh du -hs fof-1/ du -hs fof-2/ du -hs tf2-1/ du -hs css-1/



Also, you can use the "File Manager" feature of webmin to check the contents of each of those folders. Each should now have a significant structure of sub-folders inside:

12 - Configuring game-servers
Game Directory:

Before each game will work as expected, there are a variety of configuration files that must be edited. In some cases, these files may already exist - with little or no contents. In other cases, they need to be created. Either nano or webmin may be used to create and/or edit the required files.

The location of these files, is relative to the "base location" of each game-server installation. The "base location" (or "base path") is the folder specified during the SteamCMD installation of that game-server using the "force_install_dir" parameter - plus a game-specific "game" or "mod" folder as noted below:
  • Fistful-of-Frags (FoF) = "fof"
  • Team Fortress 2 (TF2) = "tf"
  • Counter-Strike:Source (CS:S) = "cstrike"
Resulting in this list of paths:
Game-Directory {base-folder} Game-Server ------------------------------- ------------------------- /home/game-server/fof-1/fof Fistful-of-Frags (1 of 2) /home/game-server/fof-2/fof Fistful-of-Frags (2 of 2) /home/game-server/tf2-1/tf Team Fortress 2 /home/game-server/css-1/cstrike Counter-Strike:Source

Important Configuration Files:

  • cfg/autoexec.cfg: Settings that can only be set before the "map" is loaded, or can only be set once and can NOT changed without restarting the game-server. The very last line of this file should always the "map" command (followed by which map to load at startup) - unless you are using the "+map" option in your startup command-line.
  • cfg/server.cfg: Settings that can only be configured after the "map" is loaded, and can be changed anytime without restarting the game-server.
  • motd.txt: "Message-of-the-Day" (MOTD) text to display to players when they connect to the server. In some games, HTML may be used to format the contents this file. If HTML is supported in a game, they will also usually allow this fine to have a single-line of text - which will be the full URL of a web-page to use instead of the contents of the file itself. For games that do not support HTML-based MOTD's, the contents of this file is displayed for players as plain-text.
  • motd_text.txt: If HTML-based MOTD's are supported for by the game, but the player has disabled HTML-based MOTD's on their client (using cl_disablehtmlmotd), then the contents of this file will be displayed for those players as plain-text - instead of using the motd.txt file.
  • mapcycle.txt: This is a plain-text file, containing a one-map-per-line list of which maps the server will "cycle" through (or "rotate" as it is commonly referred-to).
  • maplist.txt: This is a plain-text file, containing a one-map-per-line list of which maps are available on the server - even if they are not in the "map cycle". How this file is used, varies somewhat by game (or is not used at all).

In summary, the location and purpose of each of those configuration files, relative to the game-servers "{base-folder}", are as follows:
Configuration File Usage ------------------------------- ------------------------------------------------------- {base-folder}/cfg/autoexec.cfg Options set only once - not at every map start/change {base-folder}/cfg/server.cfg Options to set at (every) map start/change {base-folder}/motd.txt "Message-of-the-Day" (MOTD) file - HTML version {base-folder}/motd_text.txt "Message-of-the-Day" (MOTD) file - non-HTML version {base-folder}/mapcycle.txt List of maps to cycle / rotate through {base-folder}/maplist.txt List of maps available on the server

Commands and CVAR's:

Inside cfg/autoexec.cfg and cfg/server.cfg will be various combinations of:
  • "console commands": Commands that you may also type directly to the SRCDS console to perform some action - such as load a map, ban a player, or execute another configuration file (such as cfg/banned_user.cfg), or
  • "console variables" (CVAR's): Settings that change various aspects of the game - such as alter the gravity, change how long a map should be run before switching to the next one, etc.
Exactly which commands or CVAR's belong (or will even work) in cfg/autoexec.cfg compared to cfg/server.cfg - varies some by game.

Unfortunately (as stated), every game seems to implement this somewhat differently. Consequently, you will definately need to look at the sample cfg/autoexec.cfg and cfg/server.cfg that come with each game-server installation to see where they belong - for each specific game.

Common Options (CVAR's):

Below is a list of some of the most common CVAR's - found on most (if not all) game-servers. Again, it will vary based on specific game as to whether they should be used in the cfg/autoexec.cfg or cfg/server.cfg file:
  • maxplayers: How many people can play on the server simultaneously. The highest value allowed varies greatly by game.
  • sv_password: Require a password to play on the server, or set to empty quotes "" to have no password.
  • hostname: Description to display in the list of servers that game-clients see.
  • sv_tags: Adds comma-separated "tag" information into the server-list, to make it easier for players to find servers with (or without) certain features.
  • sv_contact: How to contact the administrator. Typically an e-mail address, or Steam profile URL.
  • mp_timelimit: How many minutes to run each map, before automatically changing to the next map in the mapcycle.txt file.
  • mp_teamplay: Generally 0 = Deathmatch, and 1 = Teams. Exact implementation varies greatly from one game to another.
  • mp_friendlyfire: Generally 0 = CAN hurt your own teammates, and 1 = CAN NOT hurt your own teammates. Implementation varies some from one game to another.
  • sv_gravity: Sets the default gravity for the server. 800 = "normal" (1G) gravity. Can be overridden by maps in most games, and can be changed on-the-fly by certain server-side modifications.
  • sv_voiceenable: 0 = voice-chat disabled, 1 = voice-chat enabled.
  • sv_alltalk: Generally 0 = Teams only see/hear their own teammate's communications, and 1 = Everybody sees/hears everybody's communications.
  • log: 0 = logging disabled, 1 = logging enabled. Will log various information to log files - generally in the {base-folder}/log sub-folder.
  • exec: Technically a "command" not a "CVAR". Will execute the contents of another configuration file - which may contain its own combination of "commands" and "CVAR's".
  • map: Technically a "command" not a "CVAR". Will load whatever map is specified. Generally only used at startup, since it will drop all players from the server if used mid-game! Typically only used either in the cfg/autoexec.cfg file or in the startup command-line.
  • changelevel: Technically a "command" not a "CVAR". Will gracefully change to whatever map is specified - without dropping players. Generally only used "ad-hoc" by admin's to change the map on-the-fly (i.e. not in cfg/autoexec.cfg or cfg/server.cfg).
13 - Configuring FoF (1 of 2): Team-Deathmatch
Within some of the sample configuration (.cfg) files, you may notice the "\\" operator quite often. This indicated the beginning of a "comment" - which will be ignored by the game itself. Lines that start with "\\" are ignored entirely. Lines with "\\" somewhere in their middle, are ignored from the "\\" to the end of that line. The author has placed an extraordinary amount of commenting in these sample files.

Sample autoexec.cfg:
The autoexec.cfg file is executed once when the game-server is first started - not at every map change. Generally, stuff goes into autoexec.cfg to keep the startup command-line simple.
echo [Start of AutoExec.CFG] // // !! FOF-SPECIFIC LIMIT !! // ------------------------ // Regarding "maxplayers": // // FoF currently limits the max // number of players to 20. // You can set "maxplayers" to // any value equal to or lower // than that. // maxplayers "20" // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "mp_teamplay": // // 1 = Team-based deathmatch // 0 = No teams, free-for-all deathmatch // mp_teamplay 1 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "mp_friendlyfire" // // 0 = friendly-fire disabled, you can NOT hurt teammates // 1 = friendly-fire enabled, you CAN hurt teammates // mp_friendlyfire 0 // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "fof_sv_maxteams" // // 2 = Vigilantes & Desperados // 3 = Vigilantes, Desperados & Bandidos // 4 = Vigilantes, Desperados, Bandidos & Rangers // fof_sv_maxteams 4 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "hostname": // // This is the name/description for the // server as it will be seen in-game by // clients on their server-listing. // hostname "FoF team-play (example, by Weasel)" // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_contact": // // The e-mail address or URL where the // owner/operator/admin of the server // may be reached ... // sv_contact "http://blogs.valvesoftware.com/sumdumgi" // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_downloadurl": // // This allows for various custom content // such as maps and sounds to be downloaded // via HTTP instead of using the (very slow) // in-game protocol download ... // // For more information about how this works, see: // https://developer.valvesoftware.com/wiki/Sv_downloadurl // sv_downloadurl "http://blogs.valvesoftware.com/sumdumgi/fof" // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_tags": // // It is a comma-separated list of different "tag" // information that will be listed for each server // in the server-list that every FoF game-client // sees. Clients may use the "include" or the // "exclude" function to find or filter-out servers // with various settings. // // Some suggested tags: // Server Type: // dedicated // listen // Game Mode / Teams: // deathmatch // 2-teams // 3-teams // 4-teams // elimination // Other Suggestions: // music = custom in-game music // sourcemod = server runs SourceMod // [... etc ...] // sv_tags "dedicated,4-team" // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // More general, non-FoF-specific settings // below, Google each for more details ... // pausable "0" sv_clienttrace "3.5" sv_lan "0" // // Steam game-SERVER account, unique to // THIS game-server instance. It is used // to assist players in finding games that // they have added to their "favorite" // servers list, but whose IP addresses // have changed since they last played. // // See this URL for more details... // https://www.mail-archive.com/hlds_announce%40list.valvesoftware.com/msg00669.html // //sv_setsteamaccount SOMEBIGHEXIDECIMALNUMBERHERE // //echo [End of AutoExec.CFG] map fof_fistful //map fof_desperados //map fof_robertlee //map fof_revenge

Sample motd.txt:
This is the "Message-of-the-Day" (MOTD) text to display to game-clients that have HTML-based MOTD's enabled. Consequently, HTML may be used in this version of the file.
<html> <head> <title>HTML-Based MOTD for FoF></title> </head> <body> <p>Welcome to the sample <a href="http://steamproxy-script.pipiskins.com/games/fof">Fistful-of-Frags</a> (FoF) <strong>TEAM PLAY</strong> game server!</p> <p>Our map rotation is:</p> <ul> <li>fof_fistful</li> <li>fof_desperados</li> <li>fof_revenge</li> <li>fof_robertlee</li> </ul> The administrator may be reached at: <a href="mailto:Sum-Dum-Gi@ValveSoftware.com@ValveSoftware.com>Sum-Dum-Gi@ValveSoftware.com@ValveSoftware.com</a> </body>

Sample motd_text.txt:
This is the "Message-of-the-Day" (MOTD) text to display to game-clients that have HTML-based MOTD's disabled. Consequently, HTML should not be used in this version of the file - it should be "plain-text".
Welcome to the sample Fistful-of-Frags (FoF) TEAM-PLAY game server! Our map rotation is: - fof_fistful - fof_desperados - fof_revenge - fof_robertlee The administrator may be reached at: Sum-Dum-Gi@ValveSoftware.com
13(b) - Configuring FoF (1 of 2): Team-deathmatch (continued)
Sample server.cfg:
The server.cfg file is executed at every map load (or change).
echo [Start of Server.CFG] // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "fof_sv_currentmode": // // 1 = Deathmatch (team based or non-team) // other numbers may be added in the // future to support other game-modes // built-into later versions of the game. // fof_sv_currentmode 1 // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "fof_sv_bot_dynamicjoin": // // 1 = bots join and leave automatically // 0 = some other functionality // fof_sv_bot_dynamicjoin 1 // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "fof_sv_bot_slotpct": // // Determines what PERCENTAGE of SLOTS // to allow bots to back-fill up to. // // For a 20-SLOT server, that would be: // fof_sv_bot_slotpct 1.0 = up to 20 bots // fof_sv_bot_slotpct 0.9 = up to 18 bots // fof_sv_bot_slotpct 0.8 = up to 16 bots // fof_sv_bot_slotpct 0.7 = up to 14 bots // fof_sv_bot_slotpct 0.6 = up to 12 bots // fof_sv_bot_slotpct 0.5 = up to 10 bots // fof_sv_bot_slotpct 0.4 = up to 8 bots // fof_sv_bot_slotpct 0.3 = up to 6 bots // fof_sv_bot_slotpct 0.2 = up to 4 bots // fof_sv_bot_slotpct 0.1 = up to 2 bots // // For a 10-SLOT server, that would be: // fof_sv_bot_slotpct 1.0 = up to 10 bots // fof_sv_bot_slotpct 0.9 = up to 9 bots // fof_sv_bot_slotpct 0.8 = up to 8 bots // fof_sv_bot_slotpct 0.7 = up to 7 bots // fof_sv_bot_slotpct 0.6 = up to 6 bots // fof_sv_bot_slotpct 0.5 = up to 5 bots // fof_sv_bot_slotpct 0.4 = up to 4 bots // fof_sv_bot_slotpct 0.3 = up to 3 bots // fof_sv_bot_slotpct 0.2 = up to 2 bots // fof_sv_bot_slotpct 0.1 = up to 1 bots // //fof_sv_bot_slotpct 0 fof_sv_bot_slotpct 0.4 // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "mp_forcecamera": // // Controls how spectators are // permitted to see things ... // // 0 = Free roaming (flying around) // 1 = Force to follow members of same team // 2 = Spectating not allowed // mp_forcecamera 0 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "mp_timelimit": // // Time limit (in minutes) to run each // map, before proceeding to the next // map in the the "mapcycle.txt" file. // mp_timelimit 15 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_voiceenable": // // Enables (1) or disables (0) the // game's built-in voice-chat feature. // sv_voiceenable 1 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_alltalk": // // Allows (1) all players to hear // everyone's voice-chats and see // everyone's text-chats - or // disables (0) that feature. // sv_alltalk 1 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_password": // // Sets a password that players // must know to play on this // particular server. // // "somepassword" = makes the password "somepassword" // "" = no password required // //sv_password "whateverpasswordyouwanthere" sv_password "" // // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "rcon_password": // // Sets a "remote-console" password // which may be used by admins to // remotely issue commands to the // server console. // // "" = no rcon-password (RCON disabled) // "somepassword" = makes the password "somepassword" // // WARNING: This a very insecure // and exploitable feature, which // is NOT recommended. Instead use // a server-side administrative mod // such as "SourceMod" // rcon_password "" //rcon_password "whateverrconpasswordyouwanthere" // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Rate-related stuff: (FoF-provided samples) // //sv_Maxrate 50000 //sv_Minrate 50000 //sv_Maxupdaterate 100 //sv_Minupdaterate 33 //sv_Maxcmdrate 100 //sv_Mincmdrate 33 //sv_client_max_interp_ratio 5 //sv_client_min_interp_ratio 1 //sv_client_predict 1 //sv_client_interpolate 1 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Rate-related stuff (Weasel-provided samples) // fps_max "60" // 60 frames-per-second sv_minrate "2400" // 2.4 Kbps sv_maxrate "14400" // 14.4 Kbps sv_maxupdaterate "60" // Maximum updates per second that the server will allow sv_minupdaterate "10" // Minimum updates per second that the server will allow // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // More general, non-FoF-specific settings // below, Google each for more details ... // sv_pure 1 sv_pure_kick_clients 1 sv_allow_wait_command 0 sv_lan 0 sv_region 255 log on sv_logflush 1 //Flush write to log immediately. sv_logbans 1 sv_logecho 1 sv_logfile 1 sv_log_onefile 0 // echo [End of Server.CFG] // // Reload the list(s) of any // banned players ... // exec banned_user.cfg exec banned_ip.cfg
14 - Configuring FoF (2 of 2): Deathmatch
Within some of the sample configuration (.cfg) files, you may notice the "\\" operator quite often. This indicated the beginning of a "comment" - which will be ignored by the game itself. Lines that start with "\\" are ignored entirely. Lines with "\\" somewhere in their middle, are ignored from the "\\" to the end of that line. The author has placed an extraordinary amount of commenting in these sample files.

Sample autoexec.cfg:
The autoexec.cfg file is executed once when the game-server is first started - not at every map change. Generally, stuff goes into autoexec.cfg to keep the startup command-line simple.
echo [Start of AutoExec.CFG] // // !! FOF-SPECIFIC LIMIT !! // ------------------------ // Regarding "maxplayers": // // FoF currently limits the max // number of players to 20. // You can set "maxplayers" to // any value equal to or lower // than that. // maxplayers "20" // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "mp_teamplay": // // 1 = Team-based deathmatch // 0 = No teams, free-for-all deathmatch // mp_teamplay 0 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "mp_friendlyfire" // // 0 = friendly-fire disabled, you can NOT hurt teammates // 1 = friendly-fire enabled, you CAN hurt teammates // mp_friendlyfire 0 // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "fof_sv_maxteams" // // 2 = Vigilantes & Desperados // 3 = Vigilantes, Desperados & Bandidos // 4 = Vigilantes, Desperados, Bandidos & Rangers // //fof_sv_maxteams 4 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "hostname": // // This is the name/description for the // server as it will be seen in-game by // clients on their server-listing. // hostname "FoF deathmatch (example, by Weasel)" // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_contact": // // The e-mail address or URL where the // owner/operator/admin of the server // may be reached ... // sv_contact "http://blogs.valvesoftware.com/sumdumgi" // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_downloadurl": // // This allows for various custom content // such as maps and sounds to be downloaded // via HTTP instead of using the (very slow) // in-game protocol download ... // // For more information about how this works, see: // https://developer.valvesoftware.com/wiki/Sv_downloadurl // sv_downloadurl "http://blogs.valvesoftware.com/sumdumgi/fof" // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_tags": // // It is a comma-separated list of different "tag" // information that will be listed for each server // in the server-list that every FoF game-client // sees. Clients may use the "include" or the // "exclude" function to find or filter-out servers // with various settings. // // Some suggested tags: // Server Type: // dedicated // listen // Game Mode / Teams: // deathmatch // 2-teams // 3-teams // 4-teams // Other Suggestions: // music = custom in-game music // sourcemod = server runs SourceMod // [... etc ...] // sv_tags "dedicated,deathmatch" // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // More general, non-FoF-specific settings // below, Google each for more details ... // pausable "0" sv_clienttrace "3.5" sv_lan "0" // // Steam game-SERVER account, unique to // THIS game-server instance. It is used // to assist players in finding games that // they have added to their "favorite" // servers list, but whose IP addresses // have changed since they last played. // // See this URL for more details... // https://www.mail-archive.com/hlds_announce%40list.valvesoftware.com/msg00669.html // //sv_setsteamaccount SOMEBIGHEXIDECIMALNUMBERHERE // //echo [End of AutoExec.CFG] map fof_fistful //map fof_desperados //map fof_robertlee //map fof_revenge

Sample motd.txt:
This is the "Message-of-the-Day" (MOTD) text to display to game-clients that have HTML-based MOTD's enabled. Consequently, HTML may be used in this version of the file.
<html> <head> <title>HTML-Based MOTD for FoF></title> </head> <body> <p>Welcome to the sample <a href="http://steamproxy-script.pipiskins.com/games/fof">Fistful-of-Frags</a> (FoF) <strong> DEATHMATCH </strong> game server!</p> <p>Our map rotation is:</p> <ul> <li>fof_fistful</li> <li>fof_desperados</li> <li>fof_revenge</li> <li>fof_robertlee</li> </ul> The administrator may be reached at: <a href="mailto:Sum-Dum-Gi@ValveSoftware.com@ValveSoftware.com>Sum-Dum-Gi@ValveSoftware.com@ValveSoftware.com</a> </body>

Sample motd_text.txt:
This is the "Message-of-the-Day" (MOTD) text to display to game-clients that have HTML-based MOTD's disabled. Consequently, HTML should not be used in this version of the file - it should be "plain-text".
Welcome to the sample Fistful-of-Frags (FoF) DEATHMATCH game server! Our map rotation is: - fof_fistful - fof_desperados - fof_revenge - fof_robertlee The administrator may be reached at: Sum-Dum-Gi@ValveSoftware.com
14(b) - Configuring FoF (2 of 2): Deathmatch (continued)
Sample server.cfg:
The server.cfg file is executed at every map load (or change).
echo [Start of Server.CFG] // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "fof_sv_currentmode": // // 1 = Deathmatch (team based or non-team) // other numbers may be added in the // future to support other game-modes // built-into later versions of the game. // fof_sv_currentmode 1 // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "fof_sv_bot_dynamicjoin": // // 1 = bots join and leave automatically // 0 = some other functionality // fof_sv_bot_dynamicjoin 1 // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "fof_sv_bot_slotpct": // // Determines what PERCENTAGE of SLOTS // to allow bots to back-fill up to. // // For a 20-SLOT server, that would be: // fof_sv_bot_slotpct 1.0 = up to 20 bots // fof_sv_bot_slotpct 0.9 = up to 18 bots // fof_sv_bot_slotpct 0.8 = up to 16 bots // fof_sv_bot_slotpct 0.7 = up to 14 bots // fof_sv_bot_slotpct 0.6 = up to 12 bots // fof_sv_bot_slotpct 0.5 = up to 10 bots // fof_sv_bot_slotpct 0.4 = up to 8 bots // fof_sv_bot_slotpct 0.3 = up to 6 bots // fof_sv_bot_slotpct 0.2 = up to 4 bots // fof_sv_bot_slotpct 0.1 = up to 2 bots // // For a 10-SLOT server, that would be: // fof_sv_bot_slotpct 1.0 = up to 10 bots // fof_sv_bot_slotpct 0.9 = up to 9 bots // fof_sv_bot_slotpct 0.8 = up to 8 bots // fof_sv_bot_slotpct 0.7 = up to 7 bots // fof_sv_bot_slotpct 0.6 = up to 6 bots // fof_sv_bot_slotpct 0.5 = up to 5 bots // fof_sv_bot_slotpct 0.4 = up to 4 bots // fof_sv_bot_slotpct 0.3 = up to 3 bots // fof_sv_bot_slotpct 0.2 = up to 2 bots // fof_sv_bot_slotpct 0.1 = up to 1 bots // //fof_sv_bot_slotpct 0 fof_sv_bot_slotpct 0.4 // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Regarding "mp_forcecamera": // // Controls how spectators are // permitted to see things ... // // 0 = Free roaming (flying around) // 1 = Force to follow members of same team // 2 = Spectating not allowed // mp_forcecamera 0 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "mp_timelimit": // // Time limit (in minutes) to run each // map, before proceeding to the next // map in the the "mapcycle.txt" file. // mp_timelimit 15 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_voiceenable": // // Enables (1) or disables (0) the // game's built-in voice-chat feature. // sv_voiceenable 1 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_alltalk": // // Allows (1) all players to hear // everyone's voice-chats and see // everyone's text-chats - or // disables (0) that feature. // sv_alltalk 1 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "sv_password": // // Sets a password that players // must know to play on this // particular server. // // "somepassword" = makes the password "somepassword" // "" = no password required // //sv_password "whateverpasswordyouwanthere" sv_password "" // // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Regarding "rcon_password": // // Sets a "remote-console" password // which may be used by admins to // remotely issue commands to the // server console. // // "" = no rcon-password (RCON disabled) // "somepassword" = makes the password "somepassword" // // WARNING: This a very insecure // and exploitable feature, which // is NOT recommended. Instead use // a server-side administrative mod // such as "SourceMod" // rcon_password "" //rcon_password "whateverrconpasswordyouwanthere" // // !! FOF-SPECIFIC SETTING !! // -------------------------- // Rate-related stuff: (FoF-provided samples) // //sv_Maxrate 50000 //sv_Minrate 50000 //sv_Maxupdaterate 100 //sv_Minupdaterate 33 //sv_Maxcmdrate 100 //sv_Mincmdrate 33 //sv_client_max_interp_ratio 5 //sv_client_min_interp_ratio 1 //sv_client_predict 1 //sv_client_interpolate 1 // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // Rate-related stuff (Weasel-provided samples) // fps_max "60" // 60 frames-per-second sv_minrate "2400" // 2.4 Kbps sv_maxrate "14400" // 14.4 Kbps sv_maxupdaterate "60" // Maximum updates per second that the server will allow sv_minupdaterate "10" // Minimum updates per second that the server will allow // // !! GENERAL, NON-FOF-SPECIFIC !! // ------------------------------- // More general, non-FoF-specific settings // below, Google each for more details ... // sv_pure 1 sv_pure_kick_clients 1 sv_allow_wait_command 0 sv_lan 0 sv_region 255 log on sv_logflush 1 //Flush write to log immediately. sv_logbans 1 sv_logecho 1 sv_logfile 1 sv_log_onefile 0 // echo [End of Server.CFG] // // Reload the list(s) of any // banned players ... // exec banned_user.cfg exec banned_ip.cfg
15 - Starting the games
Now that the games are both installed and configured, lets discuss how to actually start or "launch" each game-server.

Each game-server has its own copy of the the Source-engine dedicated server executable (commonly referred to as "SRCDS") - in it's own installation folder. This is the executable that will be run (with command-line parameters) to host your game.

Technically, the only parameter that must be passed at the command-line[/i] is the game/mod sub-folder (-game parameter). Any other required information that is not specified in the command-line, will be taken instead from the autoexec.cfg file. If a required parameter not specified in the autoexec.cfg file or the command-line, then some automatic default or dynamically generated value may be used - which may not be desirable (particularly in the case of "ports").

However, the author recommends specifying the following parameters in the start-up command-line:
  • Special game/mod sub-folder: -game parameter
  • Game communication port to use: +port parameter
  • Steam communication port to use: -steamport parameter (or -sport parameter for older games)
  • Game-server-is-also-a-client port: +clientport parameter
  • Disable SourceTV/HLTV: -nohltv
  • Enabled VAC: -secure
Note: It is also common-place to specify the initial map in the start-up command-line, using the "+map" parameter. In this guide, that functionality is included in the autoexec.cfg file instead of at the command-line.

Based on that, a typical SRCDS might be:
./srcds_run -secure -game gamemodfolderhere -nohltv +port portnumber -steamport portnumber +clientport portnumber
Note:Be sure that the srcds_run command starts with a period and a back-slash ("./")!

This can be accomplished by combining a change-directory ("cd") command just prior to the command to start SRCDS - with a semi-colon (";") between the two commands.
cd /gameserversforceinstalldir/;./srcds_run -secure -game gamemodfolderhere -nohltv +port portnumber -steamport portnumber +clientport portnumber
Obviously, since each installation has its own copy of SRCDS, the command-line to start SRCDS must be specified from within the correct folder. As you may remember from prior sections, the folders for our standard example are as follows:
Game Server Path Game Server ----------------------- ------------------------- /home/game-server/fof-1 Fistful-of-Frags (1 of 2) /home/game-server/fof-2 Fistful-of-Frags (2 of 2) /home/game-server/tf2-1 Team Fortress 2 /home/game-server/css-1 Counter-Strike:Source
The game/mod sub-folders for each of those are:
  • Fistful-of-Frags (FoF): fof
  • Team Fortress 2 (TF2): tf
  • Counter-Strike:Source (CS:S): cstrike
16 - Starting the EXAMPLE servers
Combining the per-game "port" assignments, "folder" assignments from earlier sections, with the per-game "game/mod" sub-folders from the previous section - yields the following list for folders and parameters required to determine the start-up command-line for each game-server:
Game Steam Client Game Server Path Game Game Server ---- ----- ------ ----------------------- ------- ------------------------- 6001 6101 6201 /home/game-server/fof-1 fof Fistful-of-Frags (1 of 2) 6003 6103 6203 /home/game-server/fof-2 fof Fistful-of-Frags (2 of 2) 6005 6105 6205 /home/game-server/tf2-1 tf Team Fortress 2 6007 6107 6207 /home/game-server/css-1 cstrike Counter-Strike:Source

Next are the start-up command-lines for each of our standard example game-servers, including the "cd" command appended to the front-end of the command - to ensure SRCDS is started from the proper folder.

Starting FoF server #1 of 2 (team-play):
  • Folder: /home/game-server/fof-1
  • Game/mod sub-folder: fof
  • Game (client/server) communication port: 6001
  • Steam communication port: 6101
  • Game-server-is-also-a-client port: 6201
  • Disable SourceTV/HLTV: -nohltv
  • Enabled VAC: -secure
cd /home/game-server/fof-1/;./srcds_run -secure -game fof -nohltv +port 6001 -steamport 6101 +clientport 6201

Starting FoF server #2 of 2 (deathmatch):
  • Folder: /home/game-server/fof-2
  • Game/mod sub-folder: fof
  • Game (client/server) communication port: 6003
  • Steam communication port: 6103
  • Game-server-is-also-a-client port: 6203
  • Disable SourceTV/HLTV: -nohltv
  • Enabled VAC: -secure
cd /home/game-server/fof-2/;./srcds_run -secure -game fof -nohltv +port 6003 -steamport 6103 +clientport 6203

Starting the Team Fortress 2 server:
  • Folder: /home/game-server/tf2-1
  • Game/mod sub-folder: tf
  • Game (client/server) communication port: 6005
  • Steam communication port: 6105
  • Game-server-is-also-a-client port: 6205
  • Disable SourceTV/HLTV: -nohltv
  • Enabled VAC: -secure
cd /home/game-server/tf2-1/;./srcds_run -secure -game tf -nohltv +port 6005 -steamport 6105 +clientport 6205

Starting the Counter-Strike:Source server:
  • Folder: /home/game-server/css-1
  • Game/mod sub-folder: cstrike
  • Game (client/server) communication port: 6007
  • Steam communication port: 6107
  • Game-server-is-also-a-client port: 6207
  • Disable SourceTV/HLTV: -nohltv
  • Enabled VAC: -secure
cd /home/game-server/css-1/;./srcds_run -secure -game cstrike -nohltv +port 6007 -steamport 6107 +clientport 6207


17 - Scripts to do the work
!!! This section is still UNDER-CONSTRUCTION !!!
18 - Scripts for EXAMPLE servers
!!! This section is still UNDER-CONSTRUCTION !!!
19 - Using "webmin" as a menu
!!! This section is still UNDER-CONSTRUCTION !!!
20 - Clean-up and security-related notes
!!! This section is still UNDER-CONSTRUCTION !!!
21 - Linux "IP Tables" Firewall
!!! This section is still UNDER-CONSTRUCTION !!!
22 - Weasel's "canned" server configs
!!! This section is still UNDER-CONSTRUCTION !!!
23 - Weasel's "canned" virtual machine
!!! This section is still UNDER-CONSTRUCTION !!!
10 Comments
TorMazila 23 Sep, 2017 @ 2:54pm 
@RainOfPain125 simply because it's more suitable for a sever and you can do multiple tricks that either are not possible or require additional software and skills to perform on windows. And "free" copy of windows isn't completely legal either (30 day trial and Windows Insider aren't suitable for anything in the long term). And you don't waste resources for GUI + can access your sever even via GPRS.
2 examples:
A FreeBSD proxy sever I've set up in 2000, still running with 13GB IDE HDD. Survived a couple of OS upgrades.
A FreeBSD-6 BGP+OSPFv2 router (+NAT/firewall/VPN/DNS), boots up from 1GB flash drive (that has 4 copies of this OS+configs, actually 256MB flash was enough) - set up in 2007. Still working.

Just try to count how many times you've reinstalled windows and how much time you've spent :)
RainOfPain125 6 Sep, 2017 @ 3:18pm 
My biggest question is why even use ubuntu?

Surely the dev of the game made it so his server-creation feature works on all platforms, ESPECIALLY one of the most popular ones, like Windows 10 - which anyone can get a free copy of, and most people are familiar with

Why even make a guide about ubuntu specifically? Why the hell are there no guides on making a server on a windows OS? I'm gettin a lil' frustrated if I do say so myself.
Rajsh 24 Aug, 2017 @ 7:16am 
Thank you so much for this guide! It took me a while to understand everything but I eventually did and have an elimination server for our clan up and running on a cheap VPS.
[WL] Weasel (Probably AFK)  [author] 28 Jul, 2015 @ 11:03am 
Sorry I let this go for a while and didn't finish all I promised. Been busy, and no longer have that virtual machine I built. So, to pick this up again, I would kind of have to start over.
Mazer 24 Nov, 2014 @ 5:30am 
Thumbs up, Weasel.

2 comments:

Quick fix: In section 14, your prose has the wrong comment slashes.

Suggested add: You also mention FoF-specific team scramble:

//// Scrable Teams
// Teams get scrambled when 75% of kills come from same team
fof_sv_scrambleteams 1 // enables scramble
fof_sv_scrambleteams_maxkillratio 0.75 // threshold for activating scramble
ToxicFever | Yanik 17 Aug, 2014 @ 2:38pm 
such a nice guide!!! helped me to understand installing a Gameserver for linux Ubuntu very well!
very good job!!! keep it up!!!:p2blue::worker::p2blue:
SHOUBI 3 Jun, 2014 @ 2:31am 
░░░░░░░░░░░░░░░
░░░░░░░░░░░████
░░░░░░░░░░░█░░█
░░░░░░░░░░█░░░█
░░░░░░░░░█░░░░█
█████████░░░░░███████
▓▓▓▓▓▓█░░RATE░░░░░░░░░█
▓▓▓▓▓▓█░░░IT░░░░░░░░░█
▓▓▓▓▓▓█░░░░ ░░░░░░░░░░█
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█████░░░░░░░░░█
███████░░░░█████████
[WL] Weasel (Probably AFK)  [author] 2 Jun, 2014 @ 6:30pm 
I guess it is not that good, I do not see anybody clicking the "Rate-Up" thumb's-up button. :-(
MrBreast (REAL) 29 May, 2014 @ 5:04am 
Awesome work! Keep it up!
SHOUBI 29 May, 2014 @ 3:18am 
:roach_jim:good job dude! Damn knowledge!