Join
Step-by-step guide · Linux · SteamCMD · SourceMod

Create a Counter-Strike: Source server

This guide explains how to create and host your own CS:S server on a Linux VPS: installing Valve's dedicated server with SteamCMD, configuration, opening ports, SourceMod plugins, automatic start and security. Allow about an hour.

Updated on 25/10/2026 · by Exception Multiservices

  1. What you need
  2. At home or on a VPS?
  3. Install SteamCMD and the server
  4. Configure the server (server.cfg)
  5. Start the server
  6. Open the ports
  7. Add Metamod and SourceMod
  8. Automatic start and updates
  9. Secure the server
  10. Going further
  11. Frequently asked questions

What you need

  • A Linux machine that is always on: a VPS (recommended) or a PC at home. This guide uses Ubuntu (LTS release).
  • 2 cores and 4 GB of memory are plenty for 24 to 32 players. The CPU matters more than memory: choose a high clock speed.
  • A good connection: about 30 to 50 KB/s upload per player. Hosting close to your players gives a better ping.
  • SSH access to the server (PowerShell on Windows, Terminal on macOS or Linux).
  • No need to buy the game for hosting: Valve's dedicated server is downloaded with SteamCMD using an anonymous login. Players, of course, need their own copy of Counter-Strike: Source.

At home or on a VPS?

At home

Fine for playing with friends, but your router must forward the ports, your IP address may change, upload speed is often low and the PC has to stay on day and night.

On a VPS (recommended)

A server rented in a data centre: fixed IP address, good bandwidth, online 24/7. Take a Linux VPS with 2 vCPUs and 4 GB of memory, located in your country or a neighbouring one, for example at OVHcloud.

Install SteamCMD and the server

Log in over SSH, then install SteamCMD, Valve's tool for downloading dedicated servers. The CS:S server is 32-bit: it needs the i386 libraries.

sudo dpkg --add-architecture i386
sudo add-apt-repository -y multiverse
sudo apt update
sudo apt install -y lib32gcc-s1 lib32stdc++6 steamcmd

Create a dedicated account for the game server: it must never run as root.

sudo useradd -m -s /bin/bash css
sudo -iu css

Download the Counter-Strike: Source dedicated server (app 232330). +force_install_dir must come before +login.

/usr/games/steamcmd +force_install_dir /home/css/serveur +login anonymous +app_update 232330 validate +quit

The download is a few gigabytes. Run the same command again for every game update Valve releases.

Configure the server (server.cfg)

Create the file /home/css/serveur/cstrike/cfg/server.cfg: it is read on every map change.

nano /home/css/serveur/cstrike/cfg/server.cfg
hostname "[EN] My CS:S server"
rcon_password "a-long-unique-password"
sv_password ""
sv_region 3
sv_lan 0
mp_timelimit 25
mp_roundtime 2.5
mp_freezetime 3
mp_friendlyfire 0
sv_alltalk 0
sv_allowupload 0
sv_allowdownload 1
log on
  • sv_region 3 = Europe (0 = US East coast, 1 = US West coast, 4 = Asia).
  • Empty sv_password = public server; set a password for a private server.
  • The map cycle is set in cstrike/cfg/mapcycle.txt, one map per line.

Start the server

First start by hand, to check that everything works:

cd /home/css/serveur
./srcds_run -game cstrike -console -port 27015 +maxplayers 24 +map de_dust2

When the console shows VAC secure mode is activated, the server is ready. In the game, open the console and type connect IP_ADDRESS:27015. Ctrl + C stops the server.

Open the ports

The game uses port 27015 (UDP for the game, TCP for the remote console). With the ufw firewall, always allow SSH before enabling it, or you will lose access to the server.

sudo ufw allow OpenSSH
sudo ufw allow 27015/udp
sudo ufw allow 27020/udp
sudo ufw enable

27020/udp is for SourceTV (spectators and demos), only if you enable it. Do not leave TCP port 27015 open to everyone: the remote console (RCON) does not need it if you use it from the server itself. At home, forward the same ports in your router.

Add Metamod and SourceMod

Metamod:Source and SourceMod add in-game administration (kick, ban, map change, votes) and let you install thousands of plugins.

  1. Download the stable Linux release from metamodsource.net, then from sourcemod.net.
  2. Extract both archives into /home/css/serveur/cstrike/: they create the addons folder.
  3. Make yourself an admin in cstrike/addons/sourcemod/configs/admins_simple.ini with your Steam ID:
"STEAM_0:1:12345678" "99:z"

Restart the server, connect and type !admin in chat (or sm_admin in the console) to open the admin menu. Plugins (.smx files) go into addons/sourcemod/plugins/.

Automatic start and updates

To make the server start on its own and restart after a crash, create a systemd service (first go back to your usual account with exit):

sudo nano /etc/systemd/system/css.service
[Unit]
Description=Counter-Strike: Source dedicated server
After=network-online.target

[Service]
User=css
WorkingDirectory=/home/css/serveur
ExecStart=/home/css/serveur/srcds_run -game cstrike -port 27015 +maxplayers 24 +map de_dust2
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now css
sudo systemctl status css

When Valve releases an update, players cannot connect until the server is updated: stop the service, run the SteamCMD command again as the css account, then restart.

sudo systemctl stop css
sudo -u css /usr/games/steamcmd +force_install_dir /home/css/serveur +login anonymous +app_update 232330 +quit
sudo systemctl start css

Secure the server

  • Never as root: the server runs under its own account, as in this guide.
  • A long, unique RCON password, never shared: it gives full control of the server.
  • SSH with keys, root and password login disabled, and fail2ban against password guessing.
  • Automatic system updates (unattended-upgrades) and regular backups of the cfg and addons folders.
  • Download plugins only from known sources (AlliedModders forum): a plugin has access to the whole server.

Going further: a complete server, without doing everything by hand

Once the server is online, the long part begins: a website for your players, rankings, admins with permissions, tracked sanctions, anti-cheat, backups, outage alerts, VPS security… CSS FZ Control does all of this for you.

  • Automatic installation on your VPS: CS:S server, SourceMod, website, admin area, firewall, backups and updates.
  • Live public website (map, players, monthly ranking) and an admin area where everything is set in one click.
  • Anti-Cador for balanced matches, the CSS FZ network against cheaters, in French, English or German.

Frequently asked questions

Do I need to buy Counter-Strike: Source to host a server?

No. Valve's dedicated server (app 232330) is downloaded with SteamCMD using an anonymous login. Only players need the game.

What machine do I need for a CS:S server?

A Linux VPS with 2 cores and 4 GB of memory is enough for 24 to 32 players. A fast CPU and hosting close to the players matter more than the amount of memory.

Which ports should I open for a Counter-Strike: Source server?

Port 27015 UDP for the game, and 27020 UDP if SourceTV is enabled. The remote console (RCON) uses port 27015 TCP: only open it if you need it from outside.

Can I host a CS:S server at home?

Yes, for playing with friends: you need to forward the ports in your router and keep the PC on. For a public server, a VPS is more reliable (fixed address, bandwidth, uptime).

How do I become admin of my CS:S server?

Install Metamod:Source and SourceMod, then add your Steam ID with the “z” flag in addons/sourcemod/configs/admins_simple.ini. The menu opens in game with !admin.

How do I update a Counter-Strike: Source server?

Stop the server, run SteamCMD again with app_update 232330, then restart. Without the update, players can no longer connect after a Valve update.