56 ratings
Contagion Dedicated Server Setup (Extended)
By Knappy
This guide details the setup of a Contagion Dedicated Server
Special thanks to Frengler for his original guide!
Obtaining Server Files
This process is the same for all source engine games. If you already have the server files or have installed a SRCDS (SouRCe Dedicated Server) via SteamCMD before and know how to download server files, you can skip this.

Steam now uses SteamCMD (formerly HLDSUpdateTool) to download server files.

Download SteamCMD for your respective Operating System:

After you have downloaded SteamCMD, extract the steamcmd.exe to a folder on your server drive.

Note: In this guide the directory will be the root of the Hard Drive: E:\

Note: You can paste text to the CMD prompt:

Run the steamcmd.exe to install the tool's files, the dialog will appear installing files:

Note: Do not install server files within the SteamCMD folder.

While SteamCMD is downloading the tool, go ahead and setup your server directory. For the sake of this guide and ease of cd changes in the tool, I use the root of my drive: E:\Contagion

You can make a folder anywhere except within the SteamCMD folder!

Once SteamCMD has completed downloading it's files, the dialog box will resemble:

Since Contagion uses the same APPID for both the Client and Server files,
you will need to login using your steam credentials!

Note: You will need to login with an account that owns Contagion. The server files for Contagion cannot be downloaded anonymously!

If you are attempting to login from a remote computer, you will need to verify with the SteamGuard code which will be emailed to you. You will only need to do this once as SteamCMD will cache your credentials:
login yourusername

After you verify via SteamGuard, the promp will read: Steam>

Fun Time!

Assuming you have already created your server folder (E:\Contagion) send the following:
force_install_dir E:\Contagion ENTER app_update 238430 validate ENTER

Note: Use your server directory!

Note: Here is a list of all Steam Application ID's for reference to installing other server games.

This may take some time to download all the necessary files, when complete it will resemble:


This concludes obtaining the server files.
Port Forwarding
There are many resources out there for Port Forwarding. This guide is aimed at servers that are hosting on a provider or system other than the game client (also known as a Listen Server). If you are hosting your server on a game server provider, you don't need to worry about this as they will have already forwarded your ports.

Ports required for Steam

Port Foward[]

Open Port Check Tool[]
Refer to the Detailed Cfg[] for Cvar Explanations

For a list of console commands, see this
Server Configuration (server.cfg)
After installing your server, by default the server.cfg is not created thus it does not exist. You will need to create one.

For a collection of server.cfg examples for various games, see this[]

For a very detailed server.cfg that explains certain cvar's purpose, see this[]
Note: That server.cfg is not specifically for Contagion but it's an excellent resource.

To create a new server.cfg, create the cfg within a text editor such as notepad,
or Sublime Text[] and save the file as server.cfg

The file should be located at:

Basic Server cfg[][/b]
// Hostname for server. hostname "YOUR SERVER NAME" //Tags "keywords" used for searching in the serverbrowser sv_tags "" // Overrides the max players reported to prospective clients sv_visiblemaxplayers 8 // Maximum number of rounds to play before server changes maps mp_maxrounds 3 // 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 0 // Is the server pausable sv_pausable 0 // Type of server 0=internet 1=lan sv_lan 0 // Collect CPU usage stats sv_stats 1 // Execute Banned Users // exec banned_user.cfg exec banned_ip.cfg //writeid //writeip // Contact & Region // // Contact email for server sysop sv_contact // 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 // Rcon Settings // // Password for rcon authentication/control rcon_password "adminpassword" // Number of minutes to ban users who fail rcon authentication sv_rcon_banpenalty 1440 // Max number of times a user can fail rcon authentication before being banned sv_rcon_maxfailures 5 // 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 // Rate Settings // // Min bandwidth rate allowed on server, 0 == unlimited sv_minrate 0 // Max bandwidth rate allowed on server, 0 == unlimited sv_maxrate 20000 // Client CVARS // // Restricts spectator modes for dead players //mp_forcecamera 0 // toggles game cheats sv_cheats 0 // Communications // // enable voice communications sv_voiceenable 1 // Players can hear all other players, no team restrictions 0=off 1=on sv_alltalk 1
SourceMod & MetaMod
As of 6/24/2014 SourceMod and MetaMod work in limited capacity with Contagion.

Grab the latest development builds and install them to your server:


Be sure to install the addons & cfg folder where the existing addons folder is:

Adding Admins
Edit the admins_simple.ini file, which is located in:

You can use your Steam Name, however keep in mind that anyone can change their name to yours and connect to your server with admin flags. I suggest using your SteamID[]. You can type status in the console which will return all connected players SteamID's

//////////////////////////////// // Examples: (do not put // in front of real lines, as // means 'comment') // // "STEAM_0:1:16" "bce" //generic, kick, unban for this steam ID, no immunity // "!" "99:z" //all permissions for this ip, immunity value is 99 // "BAILOPAN" "abc" "Gab3n" //name BAILOPAN, password "Gab3n": gets reservation, generic, kick // //////////////////////////////// "STEAM_1:1:16622384" "99:z"

That is MY SteamID for example purposes, just replace it with your ID.

After you edit that, just upload the addons & cfg folders to your server where the existing addons & cfg folders are. Failure to copy these files to te right location will result in SourceMod failing to load.

After you have uploaded the files, restart the server and send this command:
sm plugins list

If Unknown Command sm is returned, then the files were not installed properly.[/h1]
SourceMod & MetaMod (Listen Servers)

If you are installing SourceMod & MetaMod to a Listen/Local Server, you MUST set the -insecure launch parameter otherwise when you attempt to connect:
Launching the Server
Now you have to create a shortcut for your dedicated server with the required parameters, go to your dedicated server folder and locate the file called "contagionds.exe" then right click on it and choose Create Shortcut, then right click on the created shortcut and choose Properties, in the shortcut tab you should have a Target bar, leave a space first then write the following parameters (the directory is just an example, do not write it!):

Example contagionds.exe launch parameter
A:\Contagion2\contagionds.exe -console -game "..\contagion\contagion" -ip +ip YOURDEDIIP +hostport 27024 +maxplayers 8 +exec server.cfg +map ch_cypruspark

Example contagionds_launch.bat
contagionds.exe -steam -game "..\contagion\contagion" -console -dedicated +map ch_cypruspark

Command Line Options

See this for more information on command line options.

Although map is a cvar it must be set within the launch otherwise the server will not load any map nor accept any connection:
ce_barlowesquare ce_roanokepd ce_LosMuertos ch_cypruspark ch_auroraestates ch_pioneerexpress ch_barlowesquare cx_auroraestates cx_barlowesquare cpc_barlowesquare cpc_pioneerexpress cpc_cypruspark cpo_roanokepd

Note:This only applies to dedicated servers.

Note: +exec is a parameter that can let you execute a specific cfg file when a server launches such as the server.cfg file.[/b]
Crash-Restart Script
This is optional!

The difference between this and the normal bat file is that it must be saved in the same location as contagionds.exe. You can always make a shortcut of this file and place it on your desktop to make it easier to find and launch.

:srcds echo (%time%) srcds started. start /wait contagionds.exe -console -game "..\contagion\contagion" -ip +ip YOURDEDIIP +hostport 27024 +maxplayers 8 +exec server.cfg +map ch_cypruspark echo (%time%) WARNING: srcds closed or crashed, restarting. goto srcds

Note: The above screenshot is for a different server, but is the same concept for Contagion Server
별다방별양 Feb 22, 2020 @ 1:46am 
I'm sorry, but I can't get a plug-in link or file. Thanks to you, I made a good server.
If you play one more game, the only way to connect to the server is to go straight to the 500 server?
Ratman Feb 18, 2019 @ 6:06pm 
I'm assuming if I've already installed the game then I already have the server files required, but that should be noted at the top of this tutorial for clarification.
Ratman Feb 18, 2019 @ 5:57pm 
These instructions duplicate all the game files into E:\Contagion when the game already exists within the Steam directory. Can't we just direct SteamCMD to the existing Contagion base directory so it doesn't eat up an extra ~15gb of hard drive space? Is there some reason that's not included as the default path in these instructions?
Dio Jan 7, 2017 @ 5:57pm 
Steam>force_install_dir E:\Contagion

Steam>app_update 238430 validate
ERROR! Failed to install app '238430' (Invalid platform)
Kotz Dec 5, 2016 @ 5:26pm 
Your Dropbox links are not working. :cgpout:
Mercury Nov 18, 2016 @ 2:19pm 
2 Years of trying and research. Its not working ! oh jesus. i spend so much time on this. reinstalled two times, tried many guides, but no one works for me. Always lan. I don't get it. Really. I watched a few tutorials how to forward my ports and i did it, but it seeme.. says that the port isnt open. Gave contagionds ports. Gave him all. Ports Should be open check. Server cfg check. simple server blach check. all done but its not working c:
Eugene_hatemaker Sep 19, 2016 @ 11:05pm 
It works , thank you!
But how to change the difficulty of the game?
Default difficulty - normal
Mercury Mar 2, 2016 @ 11:53pm 
Could it be that i cant host the server because of my RAM? Ive 8gb memory. Contagion use 4 Windows use 4 and how many ram is useing the server?
†SMK†~__proto__ Feb 11, 2016 @ 3:31am 
i need linux dedicated server :steamsad:
Mercury Feb 8, 2016 @ 2:03pm 
I come not forward with this. Last weeks i tryed to figured out what the problem is. The server is running as Lan Server. Sure i have written into the script sv_lan 0 and opened few ports. may not correct.. please help :/ i can also play on the server but its not actually online so my friend cant play with me :c