Add install-cs16-dedicated-server-windows/en.md
Browse Source
1 changed file
with 81 additions and 0 deletions
install-cs16-dedicated-server-windows/en.md
A
| @@ -0,0 +1,81 @@ | ||
| 1 | +--- | |
| 2 | +title: "How to Install a CS 1.6 Dedicated Server on Windows 10/11" | |
| 3 | +excerpt: "Install and configure a CS 1.6 dedicated server on Windows 10 or 11 with SteamCMD, including firewall rules, port forwarding and the errors specific to Windows." | |
| 4 | +category: "installation" | |
| 5 | +tags: "windows, hlds, server-setup" | |
| 6 | +image: "" | |
| 7 | +read_time: "8 min read" | |
| 8 | +--- | |
| 9 | +<p>A Windows CS 1.6 server is the fastest way to get something running, and it is perfectly fine for a LAN, a test box, or a small public server. It is not what you want for a busy 32-slot public — Windows HLDS is measurably slower per tick than <code>hlds_linux</code> and the tooling around it is worse. But the install is short and the failure modes are well understood.</p> | |
| 10 | + | |
| 11 | +<h2>1. Download SteamCMD</h2> | |
| 12 | +<p>Grab <code>steamcmd.zip</code> from Valve's developer wiki and extract it to a path with <strong>no spaces and no non-ASCII characters</strong> — for example <code>C:\steamcmd</code>. Paths like <code>C:\Users\Bogdan\Desktop\Neue Ordner\</code> break the HLDS console in ways that are not worth debugging.</p> | |
| 13 | +<p>Run it once so it self-updates:</p> | |
| 14 | +<pre>C:\steamcmd\steamcmd.exe +quit</pre> | |
| 15 | + | |
| 16 | +<h2>2. Install App 90</h2> | |
| 17 | +<p>Open <code>cmd.exe</code> (not PowerShell — the <code>+</code> arguments are fine either way, but PowerShell mangles some quoting) and run:</p> | |
| 18 | +<pre>C:\steamcmd\steamcmd.exe +force_install_dir C:\hlds ^ | |
| 19 | + +login anonymous ^ | |
| 20 | + +app_set_config 90 mod cstrike ^ | |
| 21 | + +app_update 90 validate ^ | |
| 22 | + +quit</pre> | |
| 23 | +<p>Run it a second time. App 90's anonymous download is notorious for finishing the base Half-Life content and skipping <code>cstrike\</code> on the first pass. When it is complete you must have:</p> | |
| 24 | +<pre>C:\hlds\hlds.exe | |
| 25 | +C:\hlds\cstrike\liblist.gam | |
| 26 | +C:\hlds\cstrike\dlls\mp.dll</pre> | |
| 27 | +<p>If <code>mp.dll</code> is missing, the mod did not install and no amount of configuration will help.</p> | |
| 28 | + | |
| 29 | +<h2>3. Configure the server</h2> | |
| 30 | +<p>Create <code>C:\hlds\cstrike\server.cfg</code> with Notepad (save as <em>All Files</em>, not <code>server.cfg.txt</code> — Explorer hides the extension by default, and this trips people up every single time):</p> | |
| 31 | +<pre>hostname "My CS 1.6 Server" | |
| 32 | +rcon_password "a-long-random-password" | |
| 33 | +sv_lan 0 | |
| 34 | +sv_password "" | |
| 35 | + | |
| 36 | +mp_timelimit 30 | |
| 37 | +mp_autoteambalance 1 | |
| 38 | +mp_friendlyfire 0 | |
| 39 | +mp_freezetime 3 | |
| 40 | + | |
| 41 | +sv_maxrate 25000 | |
| 42 | +sv_minrate 15000 | |
| 43 | +sv_maxupdaterate 101 | |
| 44 | +sv_minupdaterate 30 | |
| 45 | + | |
| 46 | +log on</pre> | |
| 47 | +<p>Turn on file extensions in Explorer (<em>View → Show → File name extensions</em>) before you do anything else. A <code>server.cfg.txt</code> is the single most common reason <a href="/tutorials/fix-server-cfg-not-executing">server.cfg settings do not apply</a>.</p> | |
| 48 | + | |
| 49 | +<h2>4. Create a start batch file</h2> | |
| 50 | +<p><code>C:\hlds\start.bat</code>:</p> | |
| 51 | +<pre>@echo off | |
| 52 | +cd /d C:\hlds | |
| 53 | +hlds.exe -console -game cstrike -insecure -port 27015 +map de_dust2 +maxplayers 20 +sv_lan 0 | |
| 54 | +pause</pre> | |
| 55 | +<p><code>-console</code> gives you the plain text console instead of the old MFC dialog window; it is far easier to read and to copy errors out of. Drop <code>-insecure</code> if you want VAC (it does very little for CS 1.6 today, but it removes the "not VAC secured" warning). <code>pause</code> keeps the window open so you can actually read the crash message instead of watching it vanish.</p> | |
| 56 | + | |
| 57 | +<h2>5. Windows Firewall</h2> | |
| 58 | +<p>Windows will pop a prompt the first time <code>hlds.exe</code> binds a socket, and people reflexively click <em>Cancel</em>. Add the rules explicitly instead. Open an <strong>Administrator</strong> PowerShell:</p> | |
| 59 | +<pre>New-NetFirewallRule -DisplayName "HLDS UDP 27015" -Direction Inbound -Protocol UDP -LocalPort 27015 -Action Allow | |
| 60 | +New-NetFirewallRule -DisplayName "HLDS TCP 27015" -Direction Inbound -Protocol TCP -LocalPort 27015 -Action Allow</pre> | |
| 61 | +<p>UDP 27015 is the game. TCP 27015 is RCON. If your server is at home behind a router, you also need to forward both to the machine's LAN IP — see <a href="/tutorials/run-cs16-server-behind-nat">running a server behind NAT</a>.</p> | |
| 62 | + | |
| 63 | +<h2>6. Optional: run it as a service</h2> | |
| 64 | +<p>HLDS has no service mode. If you want it to survive a reboot without a logged-in session, the practical options are Task Scheduler (trigger: <em>At startup</em>, run whether user is logged on or not, working directory <code>C:\hlds</code>) or a supervisor such as NSSM. Task Scheduler is enough for most people; just remember to set <strong>Start in</strong> to <code>C:\hlds</code> or HLDS will not find <code>cstrike</code> and will die with <code>Could not find liblist.gam</code>.</p> | |
| 65 | + | |
| 66 | +<h2>Common errors</h2> | |
| 67 | +<ul> | |
| 68 | +<li><strong><code>Could not launch game. Please ensure you have the latest version</code></strong> — you launched <code>hlds.exe</code> from the wrong working directory. Always <code>cd /d C:\hlds</code> first.</li> | |
| 69 | +<li><strong><code>Couldn't allocate dedicated server IP port 27015</code></strong> — another HLDS instance is running, or a Steam client is holding the port. Check with <code>netstat -ano | findstr 27015</code> and kill the PID.</li> | |
| 70 | +<li><strong>Server visible on LAN only</strong> — <code>sv_lan 1</code>, or your router is not forwarding UDP 27015. The internet list needs <code>sv_lan 0</code> and a reachable public UDP port.</li> | |
| 71 | +<li><strong>Console window closes instantly</strong> — you started it without <code>pause</code> and it crashed. Add <code>pause</code>, rerun, read the last line.</li> | |
| 72 | +<li><strong>Antivirus quarantines <code>hlds.exe</code></strong> — several engines flag Metamod/AMXX DLLs as trojans (false positive). Exclude <code>C:\hlds</code> before you install plugins.</li> | |
| 73 | +</ul> | |
| 74 | + | |
| 75 | +<h2>Verification</h2> | |
| 76 | +<p>In the HLDS console type <code>status</code>. You should see the map name, <code>players : 0 active (20 max)</code>, and your public IP. Then from a CS 1.6 client on another machine:</p> | |
| 77 | +<pre>connect YOUR_PUBLIC_IP:27015</pre> | |
| 78 | +<p>If it connects, the port is open and the mod loaded. To check the server is reaching the internet list, run <code>heartbeat</code> in the console and look for master-server traffic; if it never appears, read <a href="/tutorials/fix-server-not-in-master-list">why a server does not show in the internet list</a>.</p> | |
| 79 | + | |
| 80 | +<h2>Where to go next</h2> | |
| 81 | +<p>Windows HLDS can run the modern stack too: <a href="/tutorials/install-rehlds-on-windows">ReHLDS on Windows</a>, then <a href="/tutorials/install-metamod-r">Metamod-r</a> and <a href="/tutorials/install-amx-mod-x-1-9">AMX Mod X 1.9</a>. If you plan to actually grow the server, weigh the platforms first: <a href="/tutorials/cs16-server-windows-vs-linux">Windows vs Linux for a CS 1.6 server</a>.</p> | |
| 0 | 82 |









