Promote server
51 lines 5.9 KiB Markdown Source Rendered Raw Permalink History
---
title: "How to Install a CS 1.6 Server with LinuxGSM"
excerpt: "Install and manage a CS 1.6 server with LinuxGSM's csserver script, which wraps SteamCMD, tmux, and a self-healing monitor."
category: "installation"
tags: "linuxgsm, linux"
image: ""
read_time: "8 min read"
---
<p>LinuxGSM is a bash management script that wraps the whole lifecycle of a game server &mdash; install, start, stop, update, backup and monitor &mdash; behind one command. For CS 1.6 it drives SteamCMD to download app 90 and then manages the <code>hlds</code> process for you. The CS 1.6 server code in LinuxGSM is <strong><code>csserver</code></strong>. This guide installs it from scratch on a Debian/Ubuntu box.</p>
<h2>1. Create a dedicated user</h2>
<p>LinuxGSM refuses to run as root and it is right to &mdash; a game server should never run with root privileges. Create a service user first:</p>
<pre>sudo adduser csserver
sudo su - csserver</pre>
<p>Everything below runs as this unprivileged user, in its home directory.</p>
<h2>2. Install dependencies</h2>
<p>CS 1.6 is a 32-bit engine, so you need i386 libraries plus the tools LinuxGSM uses (<code>tmux</code>, <code>curl</code>). On a 64-bit Debian/Ubuntu host, enable i386 and install:</p>
<pre>sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y curl wget tmux lib32gcc-s1 lib32stdc++6</pre>
<p>LinuxGSM's own dependency checker will tell you exactly what is missing later, but these cover a standard CS 1.6 server. The 32-bit libs are the ones people forget, and their absence produces a silent failure to start.</p>
<h2>3. Download LinuxGSM and create the instance</h2>
<p>Fetch the bootstrap script and hand it the CS 1.6 server code. This does not download the game yet &mdash; it creates a tailored <code>csserver</code> management script:</p>
<pre>wget -O linuxgsm.sh https://linuxgsm.sh
chmod +x linuxgsm.sh
./linuxgsm.sh csserver</pre>
<p>You now have a <code>csserver</code> script in the home directory. Every operation from here is <code>./csserver &lt;command&gt;</code>.</p>
<h2>4. Install the server</h2>
<p>Run the install command. LinuxGSM checks dependencies, then invokes SteamCMD to pull down app 90:</p>
<pre>./csserver install</pre>
<p>This is the step that runs <code>app_update 90</code> under the hood &mdash; the same download covered manually in the <a href="/tutorials/install-steamcmd-linux">SteamCMD guide</a>. It downloads the full CS 1.6 server files into <code>serverfiles/</code>. If the <code>cstrike</code> folder comes down incomplete (a known Steam quirk on app 90), run <code>./csserver install</code> again &mdash; it resumes rather than restarts.</p>
<h2>5. Configure the server</h2>
<p>LinuxGSM keeps its settings separate from the game's own configs. The management config &mdash; ports, start parameters &mdash; lives here:</p>
<pre>lgsm/config-lgsm/csserver/csserver.cfg</pre>
<p>Copy the settings you want to override out of <code>_default.cfg</code> (never edit <code>_default.cfg</code> directly) into <code>csserver.cfg</code>. The in-game settings &mdash; hostname, rcon, cvars &mdash; still live in the normal <a href="/tutorials/setup-server-cfg-cs16">server.cfg</a> under <code>serverfiles/cstrike/</code>. LinuxGSM's <code>startparameters</code> line is where you set the map, maxplayers and port, mirroring the <a href="/tutorials/hlds-command-line-parameters">HLDS command-line parameters</a>.</p>
<h2>6. Start and monitor</h2>
<pre>./csserver start
./csserver details
./csserver monitor</pre>
<p><code>start</code> launches HLDS inside a <code>tmux</code> session; <code>details</code> prints the ports, IP and query status; <code>monitor</code> checks the server is alive and responding to A2S queries, restarting it if not. Add <code>./csserver monitor</code> to cron every few minutes and LinuxGSM becomes a self-healing watchdog. To reach the live console, <code>./csserver console</code> attaches to the tmux session &mdash; detach with the tmux prefix, not Ctrl-C, or you kill the server.</p>
<h2>7. Update and back up</h2>
<p>LinuxGSM wraps the maintenance jobs too. <code>./csserver update</code> re-runs SteamCMD to pull any CS 1.6 update, <code>./csserver backup</code> archives the server files, and <code>./csserver restart</code> cycles the process cleanly. Put <code>update</code> and <code>backup</code> on their own cron schedules so the server stays current and recoverable without you logging in. Everything LinuxGSM does is still plain SteamCMD and <code>hlds</code> underneath &mdash; the script just gives each step a memorable command and a log under <code>log/</code>.</p>
<h2>Troubleshooting</h2>
<ul>
<li><strong>"[ FAIL ] Checking dependencies"</strong> &mdash; a required library is missing. Let the installer list them, then <code>apt install</code> the named packages. The 32-bit libs are the usual culprit.</li>
<li><strong>Server installs but will not start</strong> &mdash; almost always missing <code>lib32gcc-s1</code> or <code>lib32stdc++6</code>. Check <code>log/console/csserver-console.log</code> for a loader error.</li>
<li><strong>"Counter Strike is not installed"</strong> &mdash; the SteamCMD download did not finish; the <code>cstrike</code> folder is incomplete. Re-run <code>./csserver install</code>.</li>
<li><strong>Refuses to run as root</strong> &mdash; by design. Switch to the unprivileged <code>csserver</code> user.</li>
<li><strong>Console detach kills the server</strong> &mdash; you pressed Ctrl-C inside the tmux console. Detach with the tmux prefix key sequence instead.</li>
</ul>
<h2>Verification</h2>
<p>Run <code>./csserver details</code> and confirm it reports the server running with a query port responding. From another machine, add the server's IP and port in the CS browser (favourites, add by address) and confirm it appears with the right map and player count. Then run <code>./csserver monitor</code> and confirm it reports the server healthy. Once monitor passes, wire it into cron so LinuxGSM restarts the server automatically if it ever dies.</p>