Overview
Dedicated Server basics and advanced in comprehensive yet easy to read guide.
1.) Introduction
Ohai, I’m Arc and this guide will show you how to start a server in a few simple steps and help you maintain and even customise it.
Your server should be up and running by the 4th section of the guide, anything onwards is only should you need to customize or further maintain your server.
2.) Preparation, requirements
In this section i’ll explain what you will need to have. From necessary Hardware to minimum and recommended software 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 that is.
Minimum Requirements:
HDD:    12GB or more for custom content and future patches,
RAM:    2GB free,
CPU:    Core i3 (or AMD equivalent) or better, prefered high performance per-core, BOTS (AI) will tank your CPU !
Stable internet connection, prefered wired (cable, fibre optic),
Internet Bandwidth: At least 4Mbps Download/Upload for 6 player COOP or 6v6 PVP, You will need a lot of bandwidth for big PVP server.
 Optional:
 External HTTP server (for custom content), DoI server does support Steam Workshop.
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 different port than default 27015, you need to forward that as well.
Port range normally used for servers:
How to do port forwarding:
 [link]
2.2) Software requirements
These are required for the guide and minimum amount of software you should have for comfortable server management.
Required:
Microsoft Visual C++ 2013/2015 Redistributable Package (both x86 and x64)
[link]
[link]
Steam Client or SteamCMD for downloading the server
[link]
or
[link]
Optional/Recommended:
Notepad++ text editor for easier file creation and editing:
[link]
7Zip for custom content packing and unpacking:
[link]
GCFscape for unpacking VPK files should you need to modify them: [link]
3.) Downloading the server
Once we meet the necessary requirements we can download our server. I’ll describe both method of how can one obtain a server, pick only 1.
3.1) Steam Client
Go to your Steam client, Library, change “games” tab to “tools” and find “Day of Infamy Dedicated Server”, let it download, that’s all.
3.2) SteamCMD
Download SteamCMD, create folder C:SteamCMD, put the steamcmd.exe into that folder, run .exe and it will download necessary files and updates. Once it’s done you can now download Day of Infamy Dedicated Server by typing following commands into SteamCMD console line by line:
Explanations: 
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:GamesSRCDS )
app_update:		is actual download/update command, requires ID of tool you want to download (462310 for Day of Infamy server).
quit:			if you want to quit SteamCMD after you download the server.
Troubleshooting:
This error message pops up if you put unsupported character to folder path (example: E:Games?SRCDS )
4.) Basic Server setup
Now You can proceed to setup the actual server, only with minimum necessary commands.
4.1) Startup file (aka batch)
You will be starting your server with this file instead of srcds.exe.
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:
-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:
[link]
List of game modes:
[link]
There are few optional parameters you might be interested in:
4.2.) Creating basic server.cfg
Every “config” (*.CFG) file is located in “..doicfg” directory, so server.cfg belongs to that directory as well..
Fully functional example of server.cfg (you can copy&paste it, just change password, name and mapcyclefile):
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.
Unlike Insurgency server, DoI no longer uses default mapcycle files for NWI servers so don’t be surprised if you didn’t see any in your doi folder.
Now You have 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
Before you jump to edit files, you need to know what CVARs are available.
You can generate cvarlist manually by typing this into the server console:
it will store whole cvarlist to a text file located in “..doi” directory. If you choose this method, it’s recommended to generate cvarlist each server update !
5.3) List of gamemode config files and how to edit them
Firstly you must know how Server handles loading of multiple config files before you will be editing them:
Loaded from top to bottom (from most general to most specific). 
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 “..doicfg” directory and contain per-gamemode settings, the name of the file matching the mode it modifies.
Example of server_stronghold.cfg, starting with default settings:
Now you can edit this with adding optional CVARs such as these:
These are only examples, there are hundreds of variables which you can customize.
5.4) Custom server.cfg
Here i’ll explain optional CVARs for your already functional basic server.cfg, bare in mind, there are a lot more CVARs than in this guide, see Cvarlist.
Certain cvars are better suited as global ones (server.cfg) and some for per-gamemode settings.
5.5) per-map and per-map-gamemode configs
!!! UNTESTED !!!
As you already know, you can make such settings, it will use same CVARs as you put into your server_gamemode.cfg, i pick Skirmish mode with sinjar map as an example:
Create text file inside “CFG” folder, rename it to “server_bastogne.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_bastogne_offensive.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.
!!! UNTESTED !!!
5.6) Custom mapcycle file
Now you can create your own mapcycle. 
Create text file and rename it to mapcycle_whatever.txt (mapcycle_mixed.txt for example) in “..doi” 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)
MOTD is simple text file which shows whatever you write there during client’s map load screen. Keep it as simple as possible. 
Create text file in “..doi” directory, rename it to “motd.txt”. 
Example file:
5.8) Matchmaking and Stats
Here is a separate guide containing everything you need to know about Playlist, server matchmaking and stats:
[link]
5.9) Remote Control (aka RCON)
Server can be remotely controlled. You need to set password for it. You already have necessary cvar line added in basic server.cfg, but for recap it’s:
Once you are in game playing on your server and want to remotely access to your server, open client console and type there:
This signs you as admin and displays current status of the game and disables auto-kick for your person.
Now if you want to change some variable simply put “rcon” before you type cvar, example:
5.10) Config file commenting
This useful feature is visible across whole guide. It’s commenting of lines by adding “//” (double slash) symbol.
All which is behind the double slash is ignored by the server. You can create sidenotes with it (as shown throughout the guide) or you can disable cvars with it instead of deleting them, example:
Now the whole line will be ignored thus will server have matchmaking disabled.
5.11) External admin tools
SourceMod:
 Sourcemod is all-kind of admin tool, powered by user scripts (plugins) it can do almost anything on the server.
Installing:
[link]
All documentations:
[link]
Plugins:
[link]
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 !
5.12) Scripting possibilities for batch and SteamCMD
You can modify startup batch file to contain “autorestart” feature in Windows. Just modify your existing file and replace it with this:
Replace highlighted code with your own settings.
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 “doi_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:
Bare in mind that if you have space char between any word in <path> you need to bound that via quotation marks, 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
Create following files in “..doicfg” directory:
!!!!!!!! if you copypasted my example, skip this step below !!!!!!!!
Now add these commands into your “server.cfg”
!!!!!!!! end of skippable part !!!!!!!!
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 “1.2.3.4”
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
listip – will show you how many IPs are banned, exact IPs and for how long
5.14) Anti-cheat
Day of Infamy does have 3rd party Anti-cheat called “BattlEye”. It is enabled by default for all NWI PVP servers and community servers running NWI PVP playlist.
If you do want to enable this anti-cheat on your custom server while not using NWI PVP playlist, simply add this line to your server config file or your custom playlist:
6.) Custom content
Use of Steam Workshop is RECOMMENDED
Servers can handle custom content like maps, skins, sounds, theaters server-side, which means it will be forced and uploaded to clients. Some of content works only with Steam workshop support enabled, i’ll explain later.
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.
Use of Steam Workshop is RECOMMENDED
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.
How to Workshop:
[link]
How to FastDL:
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 “scriptstheaters”, 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) Theaters (aka Scenario scripts)
Theaters can change all kind of things. Weapon weight, restrictions for team, and stuff like that.
To enable custom theater on your server, open server_gamemode.cfg corresponding to settings in your theater file and put this line into it:
This is not compatible with use of NWI Playlists or custom Playlists which have this under “forced_cvars” section.
Use Steam Workshop to distribute custom files !
[link]
7.) Known issues
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.
Theater script is known for it’s behaving during client download procedure if host uses FastDL. Steam Workshop should work just fine !
9.) Additional notes and info
Always make backup of your config files. Every major update of server or validating files will result in re-downloading default files and configs (default_server_gamemode.cfg, etc.).
Guide updates
This guide is up to date for version 2.9.8.9
[link]
Feel free to post suggestions & feedback !