How to host a Counter-Strike server on a Linux VPS with SRCDS
Step-by-step tutorial to set up a dedicated Counter-Strike server (CS 1.6 or CS:GO) on a Linux VPS using SteamCMD, SRCDS, firewall and systemd.
Running your own Counter-Strike server on a Linux VPS gives full control over tick rate, plugins, custom maps and anti-cheat rules — things shared servers on game-as-a-service hosting usually don’t allow you to tune. This tutorial covers installing SRCDS (Source Dedicated Server) on an Ubuntu 24.04 VPS, focused on CS:GO (AppID 232330) and variants based on the same engine. The same steps, with AppID adjustments, work for CS 1.6 via HLDS.
Persona for this guide: developer or community owner already familiar with SSH and the Linux command line, looking to run a public or private server for a clan, scrims or community. Estimated execution time: 30 to 45 minutes from zero to first player connected, excluding the time to download Steam assets (3-4 GB for CS:GO).
We won’t cover Metamod/SourceMod plugins, external anti-cheat or web panels — the goal is to get the SRCDS binary running reliably with systemd, a configured firewall and able to appear in the public Steam server browser.
Prerequisites
You need a Linux VPS with Ubuntu 24.04 LTS, minimum 2 vCPUs and 2 GB of RAM for CS:GO (1 vCPU and 1 GB are enough for CS 1.6), 10 GB of free disk, root access or a user with sudo, and a GSLT (Game Server Login Token) generated at steamcommunity.com/dev/managegameservers if you want a public CS:GO server.
The VPS needs a dedicated public IPv4 — Steam servers don’t work behind shared NAT without explicit port forwarding, and most VPS hosting providers already deliver a dedicated IP by default. The main port will be UDP 27015. UDP blocking on generic providers is common, so confirm with provider support before continuing.
Ubuntu 24.04 LTS 27015 27015 232330 90 10 GB Prepare the system
SRCDS is a 32-bit binary, so even on a modern x86_64 VPS you need to enable the i386 architecture and install the compatible libraries. SteamCMD also depends on specific libstdc++ libraries.
Update system packages:
sudo apt update && sudo apt upgrade -yReboot only if the kernel was updated (sudo reboot). Otherwise, continue directly.
Enable 32-bit architecture and install dependencies:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y lib32gcc-s1 lib32stdc++6 libcurl4-gnutls-dev:i386 \
ca-certificates wget curl tar screen ufwThe :i386 packages are mandatory — SRCDS complains with a generic “library not found” error if they are missing, without saying which one.
Create a dedicated user for the server (never run SRCDS as root):
sudo useradd -m -s /bin/bash csserver
sudo passwd csserverRunning as root exposes the entire system if the server is exploited through some engine bug. A dedicated user isolates the process.
Install SteamCMD and download the server
SteamCMD is Valve’s official utility for installing and updating dedicated servers. It downloads content from the same CDN as the Steam client.
Switch to the csserver user and create the folder structure:
sudo su - csserver
mkdir -p ~/steamcmd ~/csgo-server
cd ~/steamcmdDownload and extract SteamCMD:
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz
rm steamcmd_linux.tar.gzThe first SteamCMD execution auto-updates the utility and downloads additional runtime — wait a few minutes.
Install the CS:GO Dedicated Server (AppID 232330):
./steamcmd.sh +force_install_dir /home/csserver/csgo-server \
+login anonymous \
+app_update 232330 validate \
+quitFor CS 1.6 (HLDS), use this instead:
./steamcmd.sh +force_install_dir /home/csserver/cs16-server \
+login anonymous \
+app_update 90 validate \
+quitThe download is roughly 3-4 GB for CS:GO and 300 MB for CS 1.6. If the connection drops mid-way, run the same command — SteamCMD resumes where it left off, and validate fixes corrupted files.
If you see “AppID 740 — Server is updating”, wait 30 seconds and run again. It’s SteamCMD itself downloading CS:GO dependencies in parallel.
Configure the firewall and ports
The server listens on UDP 27015 (game + Steam query). TCP 27015 is also used for RCON when enabled. Opening these ports in UFW is mandatory.
Configure UFW allowing SSH and CS ports:
exit # back to the sudo user
sudo ufw allow 22/tcp
sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp
sudo ufw --force enable
sudo ufw status numberedMake sure SSH (22/tcp) is allowed before enabling — otherwise you get disconnected and locked out.
UFW only controls the local firewall on the VPS. Several providers have a second external firewall at the network edge that needs to be adjusted in their panel. If the server comes up but nobody can connect, it’s almost always this.
Create the configuration file
The server.cfg file defines name, password (optional), game rules and network parameters. Without it, the server starts with Valve defaults.
Switch back to the csserver user and create the file:
sudo su - csserver
nano ~/csgo-server/csgo/cfg/server.cfgPaste a minimal working template:
hostname "My CS:GO Server"
rcon_password "CHANGE_TO_SOMETHING_STRONG"
sv_password ""
sv_lan 0
sv_region 255
mp_friendlyfire 0
sv_cheats 0
sv_pure 1
mp_autoteambalance 1
mp_limitteams 1
mp_maxrounds 30
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1sv_region 255 is worldwide; use specific values (0 = US East, 1 = US West, 2 = South America, 3 = Europe, 4 = Asia, 5 = Australia, 6 = Middle East, 7 = Africa) to filter by location in the Steam browser. The rcon_password should be long and unique; RCON exposed with a weak password is a common takeover vector.
Configure systemd so the server starts at boot
Running SRCDS in screen works for testing, but in production use systemd — automatic restart on crash, centralized logs via journalctl and start at VPS boot.
Create the systemd service (as root):
exit
sudo nano /etc/systemd/system/csgo.serviceContent:
[Unit]
Description=CS:GO Dedicated Server
After=network.target
[Service]
Type=simple
User=csserver
WorkingDirectory=/home/csserver/csgo-server
ExecStart=/home/csserver/csgo-server/srcds_run -game csgo -console -usercon \
+game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 \
-tickrate 128 -port 27015 +sv_setsteamaccount YOUR_GSLT_HERE \
-maxplayers_override 16
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.targetReplace YOUR_GSLT_HERE with the token generated at steamcommunity.com/dev/managegameservers. Without a valid GSLT, the server does not appear in the public CS:GO browser since 2016.
Enable and start the server:
sudo systemctl daemon-reload
sudo systemctl enable csgo.service
sudo systemctl start csgo.service
sudo systemctl status csgo.serviceThe status should show active (running) and a few lines of SRCDS startup logs.
Verification
Confirm that the server is responding on the correct port and visible externally.
Check the process and the port:
sudo ss -ulnp | grep 27015
sudo journalctl -u csgo.service -n 50 --no-pagerYou should see *:27015 in LISTEN UDP and logs showing the de_dust2 map loaded.
In the Steam client, open the console (~) and connect:
connect YOUR_VPS_IP:27015If it connects, the server is operational. For the public browser, go to “Community Servers” in the CS:GO menu — the server appears in 2-5 minutes after registration with a valid GSLT.
Troubleshooting
Server starts but doesn’t accept connections
Almost always it’s the provider’s external firewall (not UFW) blocking UDP 27015. Test with nmap -sU -p 27015 YOUR_IP from another machine. If it returns “filtered”, contact provider support.
”Server is enforcing secure connections, your client is not”
VAC disabled on the client or outdated version. For debugging on a local network without VAC, add -insecure to the ExecStart line, but never in public production.
Lag/spikes despite OK CPU
SRCDS is single-threaded — if one core is saturated by another process, the tick falls behind. Use htop and confirm that the core where SRCDS runs is below 70% during peak load. On a VPS with shared vCPU, request migration to a plan with dedicated CPU.
Next steps
With the base server operational, some common evolution paths:
- Install SourceMod + Metamod for plugins (admin, custom maps, anti-cheat plugin)
- Configure a workshop collection with competitive maps via
+host_workshop_collection - Add a second server on the same VPS on port 27016 for a pug/aim server
- Configure automatic backups of logs and configs with cron + rsync to remote storage
- Monitor performance with
systemd-cgtopor Netdata to visualize usage per instance
If you’re putting multiple servers into production, a Hostini VPS from the /jogos line already comes with a dedicated IP, no CPU oversell and UDP ports open by default — two common pain points when migrating from generic hosting to run competitive game servers at tick 128.
Frequently asked questions
What is the difference between HLDS and SRCDS for Counter-Strike?
HLDS (Half-Life Dedicated Server) is the binary used by CS 1.6 and mods based on the GoldSrc engine. SRCDS (Source Dedicated Server) runs CS:Source, CS:GO and — with adaptations via Steam — CS2. Installation via SteamCMD uses different AppIDs: 90 for HLDS/CS 1.6 and 232330 for CS:GO. CS2 currently has no stable public dedicated binary and is normally hosted on its own infrastructure.
How much RAM and CPU do I need for a stable CS server?
For CS 1.6 with up to 32 slots, 1 dedicated vCPU and 1 GB of RAM are enough. For CS:GO with 16-20 slots at tick 64, plan for 2 vCPUs and 2 GB of RAM. Tick 128 doubles CPU demand — prefer 3 GHz+ per core, since SRCDS is single-threaded per instance. Disk matters less: 10 GB covers installation and custom maps.
Why doesn't my server show up in the Steam browser even though it's running?
Three common causes: UDP port 27015 is blocked by the provider's firewall (not just by ufw on the VPS), the +sv_lan parameter is set to 1 (must be 0 for internet), or the server has no GSLT (Game Server Login Token) configured — mandatory for public CS:GO servers since 2016. Check each item before reinstalling.
Can I run multiple servers on the same VPS?
Yes. Each SRCDS instance runs on a different UDP port (27015, 27016, 27017, etc) and uses separate configs via the +port parameter. Each server consumes a full vCPU during peak load, so don't exceed N-1 instances where N is the number of VPS vCPUs, leaving headroom for the system.
What is tick rate and how do I increase it to 128?
Tick rate is how many times per second the server processes player input. CS:GO default is 64. For 128, add -tickrate 128 to the srcds_run startup parameters. Tick 128 improves shot precision and movement but requires faster CPU and more bandwidth per player (~30 KB/s vs 15 KB/s at tick 64).
How do I update the server when Valve releases a patch?
Run steamcmd again with the same installation command — it detects the difference and downloads only the delta. Stop systemd first (sudo systemctl stop csgo), update, and start it again. On public CS:GO servers, staying outdated makes the server disappear from the browser until it matches the current client version.