Add install-cs16-dedicated-server-linux-steamcmd/en.md
Browse Source
1 changed file
with 102 additions and 0 deletions
install-cs16-dedicated-server-linux-steamcmd/en.md
A
| @@ -0,0 +1,102 @@ | ||
| 1 | +--- | |
| 2 | +title: "How to Install a CS 1.6 Dedicated Server on Linux with SteamCMD (2026)" | |
| 3 | +excerpt: "A complete, current walkthrough for installing a Counter-Strike 1.6 dedicated server on a Linux VPS with SteamCMD, including the 32-bit libraries HLDS still needs." | |
| 4 | +category: "installation" | |
| 5 | +tags: "steamcmd, linux, hlds" | |
| 6 | +image: "" | |
| 7 | +read_time: "9 min read" | |
| 8 | +--- | |
| 9 | +<p>HLDS is a 32-bit binary from 2003 and it is still what App 90 gives you. Nothing about that has changed in 2026 — what changed is that a modern 64-bit Ubuntu or Debian install ships none of the 32-bit runtime it needs. Most of the "SteamCMD installed fine but the server won't start" reports come from that single gap. This guide installs the server the way it should be installed: as an unprivileged user, with the right multilib packages, and with a start command you can hand to systemd afterwards.</p> | |
| 10 | + | |
| 11 | +<h2>1. Create a dedicated user</h2> | |
| 12 | +<p>Never run a game server as root. A remote code execution bug in a 20-year-old netcode stack is not hypothetical.</p> | |
| 13 | +<pre>sudo adduser --disabled-password --gecos "" steam | |
| 14 | +sudo su - steam</pre> | |
| 15 | + | |
| 16 | +<h2>2. Enable multiarch and install the 32-bit runtime</h2> | |
| 17 | +<p>On Debian/Ubuntu:</p> | |
| 18 | +<pre>sudo dpkg --add-architecture i386 | |
| 19 | +sudo apt update | |
| 20 | +sudo apt install -y lib32gcc-s1 lib32stdc++6 libc6:i386 libncurses6:i386 libcurl4:i386 ca-certificates tar wget</pre> | |
| 21 | +<p>On older releases the package is <code>lib32gcc1</code> instead of <code>lib32gcc-s1</code>. If you skip this step, the server exits with:</p> | |
| 22 | +<pre>./hlds_linux: No such file or directory</pre> | |
| 23 | +<p>which is the kernel telling you the ELF interpreter <code>/lib/ld-linux.so.2</code> is missing — not that the file is missing. See <a href="/tutorials/fix-hlds-no-such-file-32bit">this fix</a> and <a href="/tutorials/install-32bit-libraries-cs16-linux">the full 32-bit dependency list</a>.</p> | |
| 24 | + | |
| 25 | +<h2>3. Install SteamCMD</h2> | |
| 26 | +<pre>mkdir -p ~/steamcmd && cd ~/steamcmd | |
| 27 | +wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | |
| 28 | +tar -xvzf steamcmd_linux.tar.gz | |
| 29 | +./steamcmd.sh +quit</pre> | |
| 30 | +<p>The first run self-updates and drops you back to the shell. If it loops on <code>Failed to load cached hosts file</code>, delete <code>~/Steam</code> and rerun.</p> | |
| 31 | + | |
| 32 | +<h2>4. Download App 90</h2> | |
| 33 | +<p>App 90 is "Half-Life Dedicated Server", and CS 1.6 is shipped as a mod inside it. It is an anonymous-login app, but it has a long-standing quirk: an anonymous <code>app_update 90</code> often stops after downloading only the base Half-Life files. The reliable form is to set the platform explicitly and to run the update twice.</p> | |
| 34 | +<pre>cd ~/steamcmd | |
| 35 | +./steamcmd.sh +force_install_dir /home/steam/hlds \ | |
| 36 | + +login anonymous \ | |
| 37 | + +app_set_config 90 mod cstrike \ | |
| 38 | + +app_update 90 validate \ | |
| 39 | + +quit</pre> | |
| 40 | +<p>Run the exact same command a second time. It is normal for the first pass to finish with <code>Success! App '90' fully installed.</code> and still be missing <code>cstrike/</code>; the second pass fills it in. If you instead get:</p> | |
| 41 | +<pre>Error! App '90' state is 0x402 after update job.</pre> | |
| 42 | +<p>re-run it — that state means the download was interrupted, and SteamCMD resumes cleanly. For <code>Failed to install app '90' (No subscription)</code> see <a href="/tutorials/fix-steamcmd-no-subscription">the dedicated fix</a>; it is almost always caused by logging in with a personal account instead of <code>anonymous</code>.</p> | |
| 43 | + | |
| 44 | +<h2>5. Verify the install</h2> | |
| 45 | +<pre>ls /home/steam/hlds/cstrike/liblist.gam | |
| 46 | +ls /home/steam/hlds/hlds_run /home/steam/hlds/hlds_linux</pre> | |
| 47 | +<p>All three must exist. <code>liblist.gam</code> is what tells the engine which game DLL to load; if it is absent, the mod did not download and you must repeat step 4.</p> | |
| 48 | + | |
| 49 | +<h2>6. Write a minimal server.cfg</h2> | |
| 50 | +<p>Create <code>/home/steam/hlds/cstrike/server.cfg</code>:</p> | |
| 51 | +<pre>hostname "My CS 1.6 Server" | |
| 52 | +rcon_password "change-this-to-something-long" | |
| 53 | +sv_password "" | |
| 54 | +sv_lan 0 | |
| 55 | +sv_contact "[email protected]" | |
| 56 | + | |
| 57 | +mp_timelimit 30 | |
| 58 | +mp_friendlyfire 0 | |
| 59 | +mp_autoteambalance 1 | |
| 60 | +mp_limitteams 2 | |
| 61 | +mp_startmoney 800 | |
| 62 | +mp_freezetime 3 | |
| 63 | + | |
| 64 | +sv_maxrate 25000 | |
| 65 | +sv_minrate 15000 | |
| 66 | +sv_maxupdaterate 101 | |
| 67 | +sv_minupdaterate 30 | |
| 68 | +sv_timeout 60 | |
| 69 | + | |
| 70 | +log on | |
| 71 | +mp_logmessages 1 | |
| 72 | +mp_logdetail 3</pre> | |
| 73 | +<p><strong><code>sv_lan 0</code> is mandatory</strong> — with <code>sv_lan 1</code> the server never heartbeats the master list and Steam clients are rejected with a LAN error. A full annotated file is in <a href="/tutorials/setup-server-cfg-cs16">the server.cfg guide</a>.</p> | |
| 74 | + | |
| 75 | +<h2>7. Start the server</h2> | |
| 76 | +<pre>cd /home/steam/hlds | |
| 77 | +./hlds_run -game cstrike -strictportbind -ip 0.0.0.0 -port 27015 \ | |
| 78 | + +map de_dust2 +maxplayers 20 +sv_lan 0</pre> | |
| 79 | +<p><code>hlds_run</code> is a shell wrapper that restarts <code>hlds_linux</code> after a crash and writes <code>debug.log</code>. <code>-strictportbind</code> makes the server fail loudly instead of silently taking port 27016 when 27015 is busy. Parameters are explained in <a href="/tutorials/hlds-command-line-parameters">the command line reference</a>.</p> | |
| 80 | + | |
| 81 | +<h2>8. Open the firewall</h2> | |
| 82 | +<p>CS 1.6 is UDP-only for gameplay; RCON also uses TCP on the same port number.</p> | |
| 83 | +<pre>sudo ufw allow 27015/udp | |
| 84 | +sudo ufw allow 27015/tcp | |
| 85 | +sudo ufw allow 26900/udp</pre> | |
| 86 | +<p>26900 is the outbound client port range used for master-server communication on some setups; it costs nothing to allow. Details: <a href="/tutorials/cs16-server-firewall-ports">which ports to open</a>.</p> | |
| 87 | + | |
| 88 | +<h2>Common errors</h2> | |
| 89 | +<ul> | |
| 90 | +<li><strong><code>Couldn't allocate dedicated server IP port</code></strong> — something already holds 27015. Check with <code>ss -lunp | grep 27015</code>.</li> | |
| 91 | +<li><strong><code>error while loading shared libraries: libstdc++.so.6: cannot open shared object file</code></strong> — you installed the 64-bit package. You need <code>lib32stdc++6</code>.</li> | |
| 92 | +<li><strong><code>Host_Error: Couldn't get DLL API from ./cstrike/dlls/cs.so!</code></strong> — the mod files are incomplete, or you copied a Windows <code>mp.dll</code> into a Linux install.</li> | |
| 93 | +<li><strong>Server starts but nobody can find it</strong> — <code>sv_lan</code> is 1, or the VPS provider blocks UDP. See <a href="/tutorials/fix-server-not-in-master-list">server not in the master list</a>.</li> | |
| 94 | +</ul> | |
| 95 | + | |
| 96 | +<h2>Verification</h2> | |
| 97 | +<p>From another machine:</p> | |
| 98 | +<pre>ss -lunp | grep 27015</pre> | |
| 99 | +<p>should show <code>hlds_linux</code> bound. Then in the console type <code>status</code> — you should see your map, hostname, and <code>players : 0 active (20 max)</code>. Finally, from a client, open the console and run <code>connect YOUR_IP:27015</code>. If you connect and spawn, the install is done.</p> | |
| 100 | + | |
| 101 | +<h2>Next steps</h2> | |
| 102 | +<p>Plain HLDS is the floor, not the ceiling. Replace the engine with <a href="/tutorials/install-rehlds-on-linux">ReHLDS</a>, add <a href="/tutorials/install-metamod-r">Metamod-r</a> and <a href="/tutorials/install-amx-mod-x-1-9">AMX Mod X</a>, and put the whole thing behind <a href="/tutorials/hlds-systemd-service">a systemd unit</a> so it survives a reboot.</p> | |
| 0 | 103 |









