
Before we proceed to the next point, I’d like to thank everyone who helped me, the devs for providing as much info as they can, and also thanks to the modders which providing us with awesome creations :)
Special thanks to:
“sparkie951” for text corrections and additional content,
that b*stard phil (aka “frombehind” ) for text corrections, additional content and general overhaul of this guide.
If you seek for Listenserver guide, please click here.
2.) Preparation, requirements
2.1) Hardware requirements
It is possible to run server and a client on the same machine, if you have Hardware capable of it.Minimum Requirements:
- 10GB HDD space or more for custom content and future patches,
- 2GB free RAM,
- CPU at least Core i3 (or AMD equivalent), prefered high performance per-core,
- Stable internet connection, prefered wired (cable, fibre optic),
- Internet Bandwidth: At least 2Mbps Download/Upload for 6 player COOP or 6v6 PVP, You will need a lot of bandwidth for big PVP server.
- External HTTP server: Custom content needs to be hosted externally, otherwise you will not be able to upload files greater than 64MB to the clients. Fear not, there is Steam Workshop support, explained later.
The next step is for those of you behind a router.
You need to forward the following ports (port forwarding):
If you want to assign other port than default 27015, you need to portforward it.
Port range normally used for servers:
How to do port forwarding: http://portforward.com/
2.2) Software requirements
Required:
Microsoft Visual C++ 2010 Redistributable Package (x86)
https://www.microsoft.com/en-us/download/details.aspx?id=5555
Steam Client or SteamCMD for downloading the server
http://media.steampowered.com/installer/steamcmd.zip
or
http://media.steampowered.com/client/installer/SteamSetup.exe
Notepad++ for easier file creation and editing
http://notepad-plus-plus.org/download/
Recommended:
7Zip for custom content packing and unpacking
http://sourceforge.net/projects/sevenzip/files/latest/download?source=files
GCFscape for unpacking VPK files if you want to create your own mods or theater scripts http://nemesis.thewavelength.net/index.php?p=26
3.) Downloading the server
3.1) Steam Client
3.2) SteamCMD
login anonymous
login: it’s like steam login, you can use your account if you want but it’s not necessary
force_install_dir : if you do not want to have Server downloaded inside of SteamCMD folder use this command, <path> means full path to your desired folder (example: force_install_dir E:\Games\SRCDS)
app_update:
quit: if you want to quit SteamCMD after you download the server.
Troubleshooting: This error message pops up if you put an unsupported character to folder path (example: E:\Games?\SRCDS )
error! app 237410 state is 0x1 after update job.
4.) Basic Server setup
4.1) Startup file (aka batch)
Go to your SRCDS folder and create plain text file inside same folder as srcds.exe is. Rename that file to “Startup” and change it’s extension from .TXT to .BAT (you need to have unchecked “Hide extension of known files” in windows, google for it if you do not know).
Now, edit the Startup.bat in notepad, and place there following commands:
start srcds.exe -usercon +maxplayers 24 +sv_lan 0 +map "market skirmish"
-usercon: enables server/rcon port so you can use 27015 as an actual server port
+maxplayers: limiter for player slots, this is also needed for COOP server as it’s limit bot+player number
+map: change it to map+mode you want to server start with
Complete maplist:
http://pastebin.com/3XP6UpbM
List of game modes:
http://pastebin.com/4fu26G23
There are few optional parameters you might be interested on:
otherwise do not include
4.2.) Creating basic server.cfg
BASIC
hostname "your_server_name": server name
rcon_password "your_password": remote console access password
sv_password "": server password for private matches, if you have sv_playlist, it won't be matchmaker
LOGGING
BAN LIST
MAPCYCLE FILE
Explanations:
mapcyclefile: this Console Variable (aka CVAR, cvars can be found in “cvarlist” explained later in this guide, you will not need this for basic setup) sets your map cycle file, you can either use default mapcycle files or create your own.
List of default mapcycle files: http://pastebin.com/TDQfDAUe
Default mapcycle files usually have maps with modes corresponding with name of the mapcycle text file. For example “mapcycle_checkpoint.txt” contains only “checkpoint” mode while “mapcycle_cooperative.txt” contains all cooperative modes. My advice is that you should not modify default mapcycles rather than create your own.
Now You have a fully functional server with basic settings if you want more customization just continue reading this guide.
5.) Advanced Server settings
Now we can proceed to personal modification of the server, starting with list of locations of files we will be using. As well as example files for other server functions.
5.1) Useful file directories
5.2) Cvarlist
Thanks to Ballou.J you can use his webpage tool:
http://jballou.com/insurgency/cvarlist.php
or you can generate cvarlist manually by typing this into the server console:
5.3) List of gamemode config files and how to edit them
If you have conflicting CVARS (Console Variables, simply put: commands) the last loaded config will have highest priority, thus overriding such conflicting cvar.
You just saw that there is possibility to have per-map settings as well as per-map-gamemode. Those config files are not default and you must create them if you want to have such settings.
Now You can proceed to edit files which are loaded by the server and correspond to the current game mode. These files are located in "..\insurgency\cfg" directory and contain per-gamemode settings, the name of the file matching the mode it modifies.
http://pastebin.com/WGDPYJiG
Example of server_checkpoint.cfg, starting with default settings:
Now you can edit this by adding optional CVARs such as these:
5.4) Custom server.cfg
5.5) per-map and per-map-gamemode configs
Create text file inside “CFG” folder, rename it to “server_sinjar.cfg” (again, you need to have disabled “hide known file extensions” in windows to be able to change TXT to CFG). Now you can put whatever CVAR you want to be active for that map.
Same goes for per-map-gamemode: Create text file in “CFG folder” rename it to “server_sinjar_skirmish.cfg”
Both Config options MUST start with “server_” as shown in the guide, otherwise your Server will not load them. You can have both optional config files at the same time, this purely depends on your preferences.
5.6) Custom mapcycle file
Create text file and rename it to mapcycle_whatever.txt (mapcycle_mixed.txt for example) in “..\insurgency” folder, open it and add copy&paste your desired map names and mode names into it following this example:
You can have all modes at one mapcycle, as well as 1 mode only or a few of them. Your choice.
Now when you have file saved, set it in server.cfg by changing “mapcyclefile”” variable:
Remember to write down “.txt”, otherwise it won’t work.
5.7) Message of the day (aka MOTD)
Create text file in “..\insurgency” directory, rename it to “motd.txt”.
Example file:
5.8) Matchmaking and Stats
5.9) Remote Control (aka RCON)
Now if you want to change some variable simply put “rcon” before you type cvar, example:
5.10) Commenting
All which is behind the double slash is ignored by server. You can create sidenotes with it (as shown throughout the guide) or you can disable cvars with it instead of deleting them, example:
5.11) External admin tools
Installing:
https://wiki.alliedmods.net/Installing_SourceMod
All documentations:
https://wiki.alliedmods.net/index.php/Category:SourceMod_Documentation
Plugins:
http://www.sourcemod.net/plugins.php?cat=0&mod=-1&title=&author=&description=&search=1
Jballou's plugins and tools:
http://jballou.com/insurgency/
There are also other tools like HLStatsX for player stats, web based rcon tools and so on. I’m lacking of knowledge here so search in google or ask in our group about them.
5.12) Scripting possibilities for batch and SteamCMD
For SteamCMD you can create script which make it easier to downloading and updating your server in future.
1.) create a blank TXT file in SteamCMD main directory (where the SteamCMD.exe is) rename it to, for example "ins_server" and copy&paste there this code and change path to the folder you want:
<path> - full path to folder you want to download the Server into, example:
2.) Now you have the script file, you just need to tell SteamCMD to use it, create shorttcut on your desktop (or wherever you want it to be) of SteamCMD.exe and add this parameter to "Target" line in it's Properties:
for example:
5.13) Kicking, Banning and Unbanning
Now add these commands into your “server.cfg”
To discover player SteamID or IP, type "status" into the Server console, or "rcon status" to the Client console.
Kicking:
Explanation:
<name> is user name
<id> is SteamID and have following format: STEAM_x:x:xxxxxxxx where “x” stands for number
Examples:
kick arc
kickid STEAM_0:0:12345678
Adding/removing banned users/ips through console (works also via RCON):
Adding/removing IP:
Explanation:
<time> how many MINUTES will be IP banned, 0 = permanent ban
<ip> stands for numeric IPv4 address of user (example: 1.2.3.4)
removeip does not need <time> parameter
Examples:
addip 0 10.10.10.11
removeip 1.2.3.4
Adding/removing steamID:
Explanation:
<time> how many MINUTES will be IP banned, 0 = permanent ban
<id> is SteamID and have following format: STEAM_x:x:xxxxxxxx where “x” stands for number
Examples:
banid 0 STEAM_0:0:12345678
removeid STEAM_0:0:87654321
To write banned IPs/IDs to a file, type this command into the console depending of what you’ve banned:
To view banned IDs or IPs through console, use those resepctive commands:
listid - will show you how many IDs are banned, exact IDs and for how long
5.14) Anti-cheat
If you do want to enable this anti-cheat on your custom server simply add this line to your server config file or playlist:
6.) Custom content
There are 2 ways how to maintain custom content: Steam workshop and FastDL server (see HW requirements in Basic section)
Workshop is generally easier to maintain and it’s not time consuming to set. But you are forced to use Steam servers which can sometimes be slow or stop responding.
FastDL server can be faster than Steam Workshop, but it’s harder to maintain the content and generally hard to find “Free of use” server for your content hosting.
VPK mods works server-side only through Steam Workshop.
You need to follow directory structure on your FastDL server
By use of 7Zip pack custom content to BZ2 format before upload. Maps go to “maps” folder, theater files into “scripts\theaters”, and so on.
Then in your main "server.cfg", add this line:
How to net_maxfilesize:
In case you have high upload speed and small-sized custom files (maps for example), you do not need FastDL or Steam Workshop support set.
The command should go into server.cfg and will look like this:
However, net_maxfilesize is limited to 64MB. So Server itself can only upload files which are =< 64MB !!
Also, this works only if you did not set “sv_downloadurl”, otherwise the server will pick the FastDL folder as the one which will client download content from.
If the custom content is larger than 64MB, FastDL or Steam Workshop is needed.
6.1) Custom maps
FastDL:
Firstly download your desired map from this site:
http://insmaps.com/site/index.php/downloads/maps
then extract zipped file into your "maps" folder in your dedicated server, then make a copy and pack map files to BZ2 format and upload them into "..\insurgency\maps" directory in your FastDL server.
If you have 3 files per map, pack them separately, 1 file per BZ2 package.
6.2) Theaters (aka Scenario scripts)
To enable custom theater on your server, open server_gamemode.cfg corresponding to settings in your theater file and put this line into it:
FastDL (non-VPK):
Either create or download theater file, create "..\insurgency\scripts\theaters" directories in your SRCDS Server and put ".theater" file into it.
Make a copy of the ".theater" file and pack it with 7Zip to "BZ2" format, go to your FastDL, make there exactly the same folder structure as in SRCDS Server and upload said zipped theater file into "theaters" folder in your FastDL server.
example:
6.3) Other custom content
7.) Known issues
Changelevel vote options is NOT working if you specified “gamemode” in mapcycle. Reported bug.
“-nowsmapcycle” still loads first Workshop map from “mapcycle_workshop.txt”, overriding your “+map” command, after the map finishes, current set mapcycle will be in use.
If you want to have multiple servers at the same IP with Workshop support, you need to have Steam Client or SteamCMD running before you start your servers. Otherwise first server will load and the others will freeze.
Theater script is known for it’s behaving during client download procedure. It’s highly recommended to have this file in BZ2 format on FastDL.
Port 27020 is pre-occupied by SourceTV so server will not be able to run on this port unless you put "-nohltv" into the command line.
8.) Beta branch
It’s publicly accessible so you do not need key.
Opting via Steam Client:
Right click on your Server in steam, hit Properties, go to Betas tab, and pick a “beta”, no key needed, let the update downloads. Opting out is reversed procedure, just pick a Stable branch.
Opting via SteamCMD:
Open your steamcmd.exe, type “force_install_dir” and path to your SRCDS folder as shown before, then type:
Opting out:
9.) Additional notes and info
Additionally, you can visit our Official Steam Group for more information about a Insurgency server and stuff like that: http://steamcommunity.com/gid/103582791435735402