Black Friday: Save 10% for life on all of our VPS plans, now through Cyber Monday

10% off on selected plans for as long as you keep the service · new orders · up to 10 uses per customer · ends Dec 1, 2026, 12:00 AM EST.

See plans
Guideschevron_rightServers

Servers · 8 min read · Updated

How to Host a Counter-Strike 2 Server on Linux

To host a Counter-Strike 2 server on Linux, create a cs2server user on Ubuntu, download LinuxGSM and run bash linuxgsm.sh cs2server then ./cs2server install. Put a Game Server Login Token (made for app ID 730) in its config so the server is listed, choose the game mode and map, open port 27015 over UDP and TCP, and add LinuxGSM's cron jobs for updates and restarts. Allow at least 60 GB of disk.

Which Server Size for CS2

VPS plans compared with a CS2 server's disk needs
PlanMemoryvCPUsDiskPrice
Bronze VPS6 GB375 GB$37.50/mo
Silver VPS8 GB4100 GB$46.50/mo
Gold VPS12 GB6150 GB$60.00/mo
Diamond VPS16 GB8200 GB$73.50/mo
Platinum VPS24 GB12300 GB$100.00/mo

Disk is the first limit: the same image asks for at least 60 GB free, and lists 2 CPUs and 2 GB of memory as its minimum, so every plan here can run one server. More players, plugins or several servers at once want more vCPUs. vCPUs on a VPS are shared threads of the host processor; for many servers at once, a dedicated server gives you every core. Choose the location nearest your players; see choosing a location by latency.

1. Create the User and Install LinuxGSM

LinuxGSM is a free, open-source tool that installs, updates and watches game servers. On Ubuntu, after securing the server:

sudo apt install -y curl tar nano
sudo adduser cs2server            # choose a strong password
sudo su - cs2server

Everything from here runs as cs2server, without sudo:

curl -Lo linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh cs2server
./cs2server install

The installer checks for missing packages first. If it lists some, install them from your own sudo account with the command it prints, then run ./cs2server install again as cs2server. The download is large, so the first install takes a while.

2. Add a Game Server Login Token

  1. Sign in at steamcommunity.com/dev/managegameservers with an account that owns CS2, has a phone number registered and is not limited.
  2. Create a token with app ID 730 (the game's ID, not the server's), and a memo such as the server's name.
  3. Put it in the instance config:
nano ~/lgsm/config-lgsm/cs2server/cs2server.cfg
gslt="YOUR_TOKEN"

Treat the token like a password: anyone holding it can run a server under your account.

3. Choose the Mode and Map

Add the mode and starting map to the start parameters in the same file, after LinuxGSM's own (copy its default line from _default.cfg in the same folder and extend it):

startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -authkey ${wsapikey} +exec ${selfname}.cfg +sv_setsteamaccount ${gslt} +game_type 0 +game_mode 1 +map de_dust2"
CS2 game modes, from LinuxGSM's documentation
Modegame_typegame_mode
Competitive01
Wingman02
Deathmatch12

Server settings such as the name and passwords go in the server's own config file; ./cs2server details shows where it is, along with the ports and the current settings.

4. Open the Port and Start

From your sudo account:

sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp

Then as cs2server:

./cs2server start
./cs2server details
./cs2server console      # leave with Ctrl+b, then d; Ctrl+c stops the server

If you turned on the firewall on your server's page in the dashboard, allow 27015 there too. In CS2, open the console and type connect 203.0.113.10:27015 (your server's address), or find it in the server browser once the token is in place.

5. Updates and Restarts

As cs2server, run crontab -e and add LinuxGSM's recommended jobs:

*/5 * * * * /home/cs2server/cs2server monitor > /dev/null 2>&1
*/30 * * * * /home/cs2server/cs2server update > /dev/null 2>&1
0 0 * * 0 /home/cs2server/cs2server update-lgsm > /dev/null 2>&1

monitor restarts the server if it has stopped, update checks for a new CS2 build every half hour, and update-lgsm keeps LinuxGSM itself current. Players cannot join an out-of-date server, so the update job matters.

Plugins, Workshop Maps and More Servers

  • Plugins: ./cs2server mods-install offers Metamod:Source and CounterStrikeSharp, the base most admin and match plugins need. After a CS2 update, run ./cs2server mods-update.
  • Workshop maps: add +host_workshop_map with the map's ID to the start parameters; collections need a Steam Web API key in wsapikey.
  • More servers: each needs its own port and its own token. Disk adds up quickly, so watch it with these commands.

Other games on the same server? See Rust, Satisfactory and Minecraft.

Common Questions

  • Do I need a Game Server Login Token?

    For a public server, yes. LinuxGSM's documentation says that without one the server will not appear on the Steam server list. Make it at steamcommunity.com/dev/managegameservers with app ID 730, from a Steam account that owns Counter-Strike 2, has a phone number registered and is not limited.

  • How much disk space does a CS2 server need?

    A lot for a game server: the community CS2 server image asks for at least 60 GB free, and more for mods and workshop maps. Its stated minimum for memory is only 2 GB, with 2 CPUs.

  • Which port does a CS2 server use?

    27015, over UDP for the game and TCP for queries, by default. Run ./cs2server details to see the ports your server actually uses.

  • Can I run more than one CS2 server on one machine?

    Yes, with a different port for each, and each needs its own Game Server Login Token: a token can only be used by one running server at a time.

Plans and prices

VPS Plans

KVM servers with NVMe storage and full root access in Ashburn and Dallas, built in minutes.

See all plans
  • Bronze

    3 vCPU · 6 GB RAM · 75 GB NVMe

    2 TB transfer

    $37.50/mo

    Configure inAshburnDallas
  • Silver

    4 vCPU · 8 GB RAM · 100 GB NVMe

    4 TB transfer

    $46.50/mo

    Configure inAshburnDallas
  • Gold

    6 vCPU · 12 GB RAM · 150 GB NVMe

    6 TB transfer

    $60.00/mo

    Configure inAshburnDallas
  • Diamond

    8 vCPU · 16 GB RAM · 200 GB NVMe

    8 TB transfer

    $73.50/mo

    Configure inAshburnDallas

Network port: 10 Gbps in Ashburn, VA, 50 Gbps in Dallas, TX. Pick the location when you configure.

Keep Reading

All guides