Contagion is a zombie apocalypse game with human survivors. Ammunition and weapons are scarce so teamwork is the key to survival. There are 3 game modes available that change the objectives but when a human player is killed they respawn as a zombie.
The Contagion Dedicated Server can be run as a Windows Service using FireDaemon Pro. FireDaemon Pro allows you to have Contagion Dedicated Server start automatically at boot prior to login, start multiple instances of Contagion Dedicated Server and restart Contagion Dedicated Server should it crash. This guide will show you how to set it up.
Contagion Dedicated Server Setup under FireDaemon ProBefore commencing setup please read our general notes in regard to service setup.
You can only install the server files if you own a copy of the game. The easy way to install them is via Steam's SteamPipe servers, but the caveat to this is that the Steam account must have Contagion owned on it. We suggest that you do not use your local client version of Steam as it will be logged out when you install/update the server files and you risk having your Steam account hijacked/stolen should your server ever be hacked (since the hackers could then get access to your Steam account).
Step 1: Create A Steam AccountCreate a new Steam account for your server. If you want to use your existing Steam account that already has Contagion, then skip to step 3.
Step 2: Purchase ContagionPurchase Contagion and gift it to the server account you just created.
Step 3: Install SteamCMDDownload and extract SteamCMD.exe into its own folder (eg. C:\SteamCMD).
Step 4: Create The Contagion Install FolderDetermine where you are going to install the Contagion Dedicated Server. It should NOT be installed into the SteamCMD folder. Install elsewhere - for example C:\Contagion. Create that folder.
Step 5: Install ContagionGo to the directory where you installed SteamCMD and create a shortcut to "SteamCMD.exe". Right click to view the properties, and then click to edit the Shortcut Properties. In the Target field append the following so that it reads:
C:\SteamCMD\steamcmd.exe +login USERNAME PASSWORD +force_install_dir "C:\Contagion" +app_update 238430 validate +quitReplace USERNAME with your Steam username and PASSWORD with your Steam password. You will need to enter a verification string if your steam account has SteamGuard enabled. The verification string will be sent to the Steam account email address you set up. This string only needs to be entered in once. It might take a while to download the dedicated server because there are over 6GB of files. You should also run the shortcut periodically (eg. every month or so) to grab the latest server updates. Remember to stop your dedicated server first.
Step 6: Set up Contagion Configuration FilesThe server files do not include any server configs. Download the Contagion-Config-Files.zip file attached at the end of this HOWTO and extract the cfg folder containing the configuration files to the directory "C:\Contagion\contagion". This download also contains a sample FireDaemon Pro Service Configuration XML file.
Step 7: Download and Install FireDaemon ProDownload and install FireDaemon Pro.
Step 8: Set up the FireDaemon Pro ServiceRun FireDaemon Pro from the desktop shortcut. Click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Adjust the path to suit your installation.
Executable: The path to your contagionds.exe file. For the purposes of this HOWTO, the path is C:\Contagion\contagionds.exe.
Working Directory: The directory containing your contagionds.exe file. For the purposes of this HOWTO, the path is C:\Contagion.
The most important field on the tab is the Parameters. The Parameters define the initial setup of your server.
-console -game contagion -secure +map ce_barlowesquare +log on +ip 220.127.116.11 -port 27015 +exec server.cfg +rcon_password YOURPASS
- "-console" enables text base server display. The server can only be automatically restarted in text based mode.
- "-game contagion" loads the game.
- "-secure" enables VAC protection of your server (valve anti cheat). You can remove this command if you do not want to use VAC.
- map loads a specified map on server startup. You can change "ce_barlowesquare" to whatever map you want. This command should never be removed.
- "+log on" displays the output of information on the screen. You can turn optionally it off (+log off), but keeping it on makes it easier to debug any errors you might encounter.
- "+ip" should be the public IP of your server. This command should never be removed.
- "-port 27015" This is the default server port. Changing it is generally used when you host multiple servers on the same IP address as each server has to use its own port when using the same IP. This command should never be removed.
- "+exec server.cfg" simply executes your server.cfg file on server startup. If you run multiple servers from the same installation, you can specify other config files (eg. server1.cfg)
- "+rcon_password YOURPASS" sets your rcon password in the command line. It is crucial that you set it here and not in your server.cfg file because exploits exist that allow malicious players to download your server.cfg file and get your rcon password to wreak all kinds of havoc. Replace "YOURPASS" with a hard to guess password (preferably a mix of letters, numbers and symbols).
- Additional information about the command line parameters can be found here.
Step 9: FireDaemon Pro SettingsNow click on the Settings tab. If you DON'T want to see Contagion Dedicated Server running, uncheck the Interact with Desktop check box. You can optionally configure the FireDaemon Pro Service as the user you installed it as. In the Logon Account field type your username (eg. Administrator) and then enter the user's password twice in the Password and Confirm fields. You can change the Process Priority to allocate more CPU time to the dedicated server or specify which cores the dedicated server will run on.
Step 10: FireDaemon Pro LifecycleClick on the Lifecycle tab. Uncheck Graceful Shutdown.
Step 11: Run the FireDaemon Pro Service and Switch to Session 0Now click on the OK button to install and start Contagion Dedicated Server! If you are running Windows Vista or later your server will start on Session 0. You will need to switch desktops to Session 0 to see your server running.
Sample Contagion Dedicated Server Configuration
Below is an example Contagion Dedicated Service server.cfg file for your perusal.
// Hostname for server. hostname "Contagion Server" //Server password (Uncomment To Use) //sv_password PASSWD //Tags sv_tags // Set to lock per-frame time elapse host_framerate 0 // Set the pause state of the server setpause 0 // Control where the client gets content from // 0 = anywhere, 1 = anywhere listed in white list, 2 = steam official content only sv_pure 2 // Is the server pausable sv_pausable 0 // Type of server 0=internet 1=lan sv_lan 0 // The region of the world to report this server in. // -1 is the world, 0 is USA east coast, 1 is USA west coast // 2 south america, 3 europe, 4 asia, 5 australia, 6 middle east, 7 africa sv_region 0 sv_rcon_banpenalty 60 sv_rcon_maxfailures 10 sv_rcon_minfailures 5 sv_rcon_minfailuretime 45 // bandwidth rates/settings net_maxfilesize 64 sv_minrate 0 sv_maxrate 0 // Log Settings // // Enables logging to file, console, and udp < on | off >. log on // Log server information to only one file. sv_log_onefile 0 // Log server information in the log file. sv_logfile 1 // Log server bans in the server logs. sv_logbans 1 // Echo log information to the console. sv_logecho 1 // Client CVARS // // Restricts spectator modes for dead players //mp_forcecamera 0 // Disables Server-Side Cheats sv_cheats 0 // Enable Voice Communications sv_voiceenable 1 // Players can hear all other players, no team restrictions 0=off 1=on sv_alltalk 0 // Execute Banned Users exec banned_user.cfg exec banned_ip.cfg